Cart items for logged in user

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
sijueraju
Posts: 4
Joined: 27 Mar 2017, 07:33

Cart items for logged in user

Post by sijueraju » 30 Mar 2017, 10:45

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?

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

Re: Cart items for logged in user

Post by aimeos » 31 Mar 2017, 12:50

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.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

sijueraju
Posts: 4
Joined: 27 Mar 2017, 07:33

Re: Cart items for logged in user

Post by sijueraju » 03 Apr 2017, 08:45

Thank you for your reply. Is there any option to save the cart details in database instead of session ?

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

Re: Cart items for logged in user

Post by aimeos » 03 Apr 2017, 20:55

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.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

columbo
Advanced
Posts: 123
Joined: 09 Oct 2019, 09:42

Re: Cart items for logged in user

Post by columbo » 24 Jun 2020, 09:55

Hi, could you solve that? How?
I'm facing a similar question but have no clue how to solve it..

cnoelker
Advanced
Posts: 140
Joined: 20 Feb 2016, 18:21

Re: Cart items for logged in user

Post by cnoelker » 10 Jul 2020, 07:48

I would love this feature, too.

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

Re: Cart items for logged in user

Post by aimeos » 11 Jul 2020, 11:36

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?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

cnoelker
Advanced
Posts: 140
Joined: 20 Feb 2016, 18:21

Re: Cart items for logged in user

Post by cnoelker » 13 Jul 2020, 07:31

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.

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

Re: Cart items for logged in user

Post by aimeos » 14 Jul 2020, 10:21

OK, understood. We want to rework the order domain for the 2021.x versions and will keep that in mind.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

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

Re: Cart items for logged in user

Post by aimeos » 29 Sep 2023, 09:19

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.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply