Page 1 of 1

Cart items for logged in user

Posted: 30 Mar 2017, 10:45
by sijueraju
Hi,
I have a doubt. Suppose if a logged-in front end user adds products to his cart(Without doing the checkout or any further steps). Is it possible to view the same products in the cart if the same user logged-in from a separate machine?

Re: Cart items for logged in user

Posted: 31 Mar 2017, 12:50
by aimeos
Don't think so because the basket is only persisted in the user session and if users logs into from another machine, they will get another session ID and therefore another session.

Re: Cart items for logged in user

Posted: 03 Apr 2017, 08:45
by sijueraju
Thank you for your reply. Is there any option to save the cart details in database instead of session ?

Re: Cart items for logged in user

Posted: 03 Apr 2017, 20:55
by aimeos
You can overwrite the getSession()/setSession() methods of the order base manager to store the basket somewhere else:
https://github.com/aimeos/aimeos-core/b ... se.php#L92

If your customers are always logged in, you could even store the basket just like ever other order in the mshop_order_base* tables using its load()/store() methods.

Re: Cart items for logged in user

Posted: 24 Jun 2020, 09:55
by columbo
Hi, could you solve that? How?
I'm facing a similar question but have no clue how to solve it..

Re: Cart items for logged in user

Posted: 10 Jul 2020, 07:48
by cnoelker
I would love this feature, too.

Re: Cart items for logged in user

Posted: 11 Jul 2020, 11:36
by aimeos
What are your use cases for that?
Is it only to store a basket for a user permanently or would you like to perform further actions on abandoned user carts?

Re: Cart items for logged in user

Posted: 13 Jul 2020, 07:31
by cnoelker
My main use case is that a logged in user can prepare a cart, then log out and come back later for the checkout process.
We have created a B2B shop and a cart often consist of more than 100 articles. It's a really bad user experience if the cart is gone...
Any additional actions (e.g. deleting abandoned carts after a number of days or sending a reminder to customers) would be a nice extra.

Re: Cart items for logged in user

Posted: 14 Jul 2020, 10:21
by aimeos
OK, understood. We want to rework the order domain for the 2021.x versions and will keep that in mind.

Re: Cart items for logged in user

Posted: 29 Sep 2023, 09:19
by aimeos
Customers are able to save baskets and view them in their accounts since 2022.10.
Baskets are also persisted automatically in the database but not restored after login at the moment.