a user in multiple stores

Help for integrating the Laravel package
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!
JuanMRuiz
Posts: 5
Joined: 23 Apr 2020, 05:59

a user in multiple stores

Post by JuanMRuiz » 28 Apr 2020, 01:37

Hello
How can I use the same user in different stores ?since registering a client in one store does not allow me to buy in the others
Greetings and thanks

User avatar
aimeos
Administrator
Posts: 8648
Joined: 01 Jan 1970, 00:00

Re: a user in multiple stores

Post by aimeos » 28 Apr 2020, 07:09

The 2020.04 release can work with customers from the users table in all sites if the siteid is an empty string (is also the default value).
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

JuanMRuiz
Posts: 5
Joined: 23 Apr 2020, 05:59

Re: a user in multiple stores

Post by JuanMRuiz » 28 Apr 2020, 08:12

Hi, thanks for your response. well but when it is the null value it does not bring me the collection address how can I bring the collection address regardless of the site?

JuanMRuiz
Posts: 5
Joined: 23 Apr 2020, 05:59

Re: a user in multiple stores

Post by JuanMRuiz » 28 Apr 2020, 18:22

how can i avoid saving the siteid when i finish a purchase


if( ( $code = $view->param( 'code' ) ) !== null )
{
$serviceCntl = \Aimeos\Controller\Frontend::create( $context, 'service' );
$orderItem = $serviceCntl->updateSync( $view->request(), $code, $orderid );
}
else
{
$orderCntl = \Aimeos\Controller\Frontend::create( $context, 'order' );
$orderItem = $orderCntl->get( $orderid, false );
}


the $ orderitem as I call it so it doesn't end up with unfinished order status

User avatar
aimeos
Administrator
Posts: 8648
Joined: 01 Jan 1970, 00:00

Re: a user in multiple stores

Post by aimeos » 29 Apr 2020, 09:18

The delivery addresses are currently stored with the site ID they are saved with. The billing address is part of the user account and therefore available without siteid by default.

If you don't want to store the site ID in the order, you have to overwrite the saveItem()/saveItems()/store() methods in the order managers: https://github.com/aimeos/aimeos-core/t ... er/Manager
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply