user gets account creation email but cannot login
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 21
- Joined: 12 Oct 2015, 12:31
user gets account creation email but cannot login
Hey,
So the user get's an email with their password and username however when I look into the users table there isn't anything.
Do I need to configure anything?
I noticed symfony users FOS do I need to do any such integration?
Oliver
So the user get's an email with their password and username however when I look into the users table there isn't anything.
Do I need to configure anything?
I noticed symfony users FOS do I need to do any such integration?
Oliver
Re: user gets account creation email but cannot login
The demo (http://laravel.demo.aimeos.org) stores the new user accounts like expected. Which version of the aimeos-laravel package are you using?obayesshelton wrote: So the user get's an email with their password and username however when I look into the users table there isn't anything. Do I need to configure anything?
Can you please check that the Aimeos migrations for the "users" table have been executed? There must be around 29 columns in this table.
No, Laravel already includes the necessary functionality for user registration and login. In Symfony, you need an extra bundle for this.obayesshelton wrote: I noticed symfony users FOS do I need to do any such integration?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

Re: user gets account creation email but cannot login
Hi,
I am trying to add some fields to Users table like: taxpayerid, phone's area code, neighborhood. And edit some fields: Address1 to Street, Address2 to Number, Address3 to complement.
As I am still learning, I'm taking baby steps, and decided to add only taxpayer id to figure out the whole process for adding the new field.
I've created a setup task to add taxpayerid to mshop_order_base_address:
But now I am a bit lost...
You said:
In pure laravel, I would need to add the `taxpayerid` field to $fillable array in User model, add the input to the form in view and make sure that the Controller passes the value to the model.
What about in aimeos? I've managed to have the field added to my DB. What are the next steps to make it work for the final user?
Thanks
I am trying to add some fields to Users table like: taxpayerid, phone's area code, neighborhood. And edit some fields: Address1 to Street, Address2 to Number, Address3 to complement.
As I am still learning, I'm taking baby steps, and decided to add only taxpayer id to figure out the whole process for adding the new field.
I've created a setup task to add taxpayerid to mshop_order_base_address:
Code: Select all
<?php
namespace Aimeos\MW\Setup\Task;
class OrderAddTaxPayerIdColumn extends Base
{
private $table_name = 'mshop_order_base_address';
private $migrate = array(
'mysql' => 'ALTER TABLE "mshop_order_base_address" ADD "taxpayerid" VARCHAR(32) NOT NULL COLLATE utf8_bin AFTER "title"',
);
private $rollback = array(
'mysql' => 'ALTER TABLE "mshop_order_base_address" ADD "taxpayerid" VARCHAR(32) NOT NULL COLLATE utf8_bin AFTER "title"',
);
/**
* Returns the list of task names which this task depends on.
*
* @return array List of task names
*/
public function getPreDependencies()
{
return array('OrderRenameTables');
}
/**
* Returns the list of task names which depends on this task.
*
* @return array List of task names
*/
public function getPostDependencies()
{
return array('TablesCreateMShop');
}
public function migrate()
{
$this->msg('Adding taxpayerid column to order base address table', 0);
$schema = $this->getSchema('db-order');
if (isset($this->migrate[$schema->getName()])
&& $schema->tableExists($this->table_name) === true
&& $schema->columnExists($this->table_name, 'taxpayerid') === false
) {
$this->execute($this->migrate[$schema->getName()]);
$this->status('done');
} else {
$this->status('OK');
}
}
public function rollback()
{
$this->msg('Rollback: Adding taxpayerid column to order base address table', 0);
$schema = $this->getSchema('db-order');
if (isset($this->rollback[$schema->getName()])
&& $schema->tableExists($this->table_name) === true
&& $schema->columnExists($this->table_name, 'taxpayer_id') === true
) {
$this->execute($this->rollback[$schema->getName()]);
$this->status('done');
} else {
$this->status('OK');
}
}
}
You said:
So now i need to find a way to add `taxpayerid` field to users table.Can you please check that the Aimeos migrations for the "users" table have been executed? There must be around 29 columns in this table.
In pure laravel, I would need to add the `taxpayerid` field to $fillable array in User model, add the input to the form in view and make sure that the Controller passes the value to the model.
What about in aimeos? I've managed to have the field added to my DB. What are the next steps to make it work for the final user?
Thanks
Re: user gets account creation email but cannot login
I've found the following partial: .
But everything is hard coded, Am I looking in the wrong place?
Thanks
Code: Select all
client/html/templates/common/partials/address-default.php
But everything is hard coded, Am I looking in the wrong place?
Thanks
Re: user gets account creation email but cannot login
What do you want to achieve? Add a new user address column whose value is added to the address of each order?
In this case, your setup task for the "mshop_order_base_address" table is correct (besides the rollback section). For the Laravel user table you can create a Laravel migration scripts because that table is managed by Laravel, not by Aimeos.
The next steps are to extend the customer and order base address items and add the get/set Methods for the new property. Extend their managers as well an overwrite the saveItem() and createItemBase() methods to save the new property and use your new item class.
In a last step, you should adapt the address partial you've found and extend the checkout standard address billing/delivery classes to add the input of the customers to the address object in the basket.
BTW: It doesn't make much sense to rename columns. The address* columns are named so to be generic enough for every area in the world. For the tax payer ID, there's already a field called "vatid".
In this case, your setup task for the "mshop_order_base_address" table is correct (besides the rollback section). For the Laravel user table you can create a Laravel migration scripts because that table is managed by Laravel, not by Aimeos.
The next steps are to extend the customer and order base address items and add the get/set Methods for the new property. Extend their managers as well an overwrite the saveItem() and createItemBase() methods to save the new property and use your new item class.
In a last step, you should adapt the address partial you've found and extend the checkout standard address billing/delivery classes to add the input of the customers to the address object in the basket.
BTW: It doesn't make much sense to rename columns. The address* columns are named so to be generic enough for every area in the world. For the tax payer ID, there's already a field called "vatid".
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

Re: user gets account creation email but cannot login
I've done some progress here, and now I need to update this line:
https://github.com/aimeos/ai-client-htm ... d.php#L472
But I'm not being able to overwrite it in my extension. I've created a file located at `ext/my-ext/client/html/src/Client/Html/Checkout/Standard/Address/Billing/Standard.php`.
Copied the whole file, edited the line 472 to, set breakpoints in both files and the file from `ai-client-html` is getting called. How can I load my custom file?
Thanks for your help, I wouldn't evolve without your commitment
https://github.com/aimeos/ai-client-htm ... d.php#L472
But I'm not being able to overwrite it in my extension. I've created a file located at `ext/my-ext/client/html/src/Client/Html/Checkout/Standard/Address/Billing/Standard.php`.
Copied the whole file, edited the line 472 to
Code: Select all
$params['order.base.address.company'] = '';
Thanks for your help, I wouldn't evolve without your commitment

Re: user gets account creation email but cannot login
Classes are not overwritten by copying them. Instead, you have to extend from the class (name it e.g. Myext.php and extend from Standard.php), overwrite only the part you want to change (the checkSalutation() method) and configure the new class name so the factory will create your new class instead:
https://aimeos.org/docs/Configuration/C ... lling/name
We want your knowledge to increase so you will be able to share your experience here in the future
https://aimeos.org/docs/Configuration/C ... lling/name
We want your knowledge to increase so you will be able to share your experience here in the future

Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

Re: user gets account creation email but cannot login
I'll be glad to help here in the Forums 
I was able to extend `Standard.php` using https://aimeos.org/docs/Configuration/C ... lling/name
Now my problem is extending Items and Managers, I just re-read the docs about this and found no reference on how to extend them...
Tried to set the following option on config/shop.php but no luck yet...
My new class: `ext/my-ext/lib/custom/src/Mshop/Common/Item/Address/AddressBase.php`:
Inside the class I've overwritten `fromArray` but it never gets touched.
What am I missing here?
Thanks.

I was able to extend `Standard.php` using https://aimeos.org/docs/Configuration/C ... lling/name
Now my problem is extending Items and Managers, I just re-read the docs about this and found no reference on how to extend them...
Tried to set the following option on config/shop.php but no luck yet...
Code: Select all
'mshop' => array(
'common' => array(
'item' => array(
'address' => array(
'name' => 'AddressBase'
...
Code: Select all
namespace Aimeos\MShop\Common\Item\Address;
/**
* Abstract class for address items.
*
* @package MShop
* @subpackage Common
*/
class AddressBase
extends \Aimeos\MShop\Common\Item\Address\Base
implements \Aimeos\MShop\Common\Item\Address\Iface
{
...
What am I missing here?
Thanks.

Re: user gets account creation email but cannot login
First, you shouldn't name a class "...Base" because that name is already used for abstract classes.
The, extend your new class from the standard class because it already contains everything you need besides your new properties:
To use your new item class, overwrite the createItemBase() method in your new manager.
The, extend your new class from the standard class because it already contains everything you need besides your new properties:
Code: Select all
class Myext extends \Aimeos\MShop\Customer\Item\Address\Standard
{
}
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

Re: user gets account creation email but cannot login
I've changed my files but the core's `fromArray` method is still called in `vendor/aimeos/aimeos-core/lib/mshoplib/src/MShop/Order/Item/Base/Address/Standard.php`...
`ext/my/myext/lib/custom/src/Mshop/Order/Item/Base/Address/CustomAddress.php`
`config/shop.php`
I just can't find out what I am missing here. 
`ext/my/myext/lib/custom/src/Mshop/Order/Item/Base/Address/CustomAddress.php`
Code: Select all
namespace Aimeos\MShop\Order\Item\Base\Address;
class CustomAddress extends \Aimeos\MShop\Order\Item\Base\Address\Standard
implements \Aimeos\MShop\Order\Item\Base\Address\Iface
{
public function fromArray(array $list)
{
...
Code: Select all
'mshop' => array(
'order' => array(
'item' => array(
'address' => array(
'name' => 'CustomAddress'
)
)
),
...
