Keep basket even when user logs out and logs back in?
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!
Keep basket even when user logs out and logs back in?
Laravel framework version: 10.16.1
Aimeos Laravel version: 2023.04.*
PHP Version: 8.2.8
Environment: Linux
Hello,
Is it possible to store the basket even after the user logged out and logged back in?
How can I do it?
Thanks
Aimeos Laravel version: 2023.04.*
PHP Version: 8.2.8
Environment: Linux
Hello,
Is it possible to store the basket even after the user logged out and logged back in?
How can I do it?
Thanks
Re: Keep basket even when user logs out and logs back in?
Clarification:
1) The basket should be lost, but stored in the user's account when he user logs out.
2) The basket should be loaded when the user logs back in.
1) The basket should be lost, but stored in the user's account when he user logs out.
2) The basket should be loaded when the user logs back in.
Re: Keep basket even when user logs out and logs back in?
Currently it's not possible but the basket of the customer is stored in the mshop_order_basket table. There's currently just no way to get it back after re-login and you need to implement that yourself.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Keep basket even when user logs out and logs back in?
What is the relation between the mshop_order_basket table and the basket stored in the session?
Can the session with the basket just be restored when the user logs back in?
I really don't know how I should go about this.
Can you give a more detailed response?
Thanks.
Can the session with the basket just be restored when the user logs back in?
I really don't know how I should go about this.
Can you give a more detailed response?
Thanks.
Re: Keep basket even when user logs out and logs back in?
The session basket is stored as serialized value in the mshop_order_basket table and you can use its manager to retrieve them again. If customers are logged in, their customer ID is stored along with the serialized basket too. To load the last basket after login, you have to use the manager to get the latest basket for the current customer ID in the Laravel controller handling logins.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star