Jump to content

How to avoid removing cart after logout


dannielhendrix

Recommended Posts

Hi

I have an issue with a shopping cart, its Empty after user Logout/Login. Here is sequence of the issue:

1. I create a shopping cart as a "registered user", then I LOGOUT without completing the order.

2. If I login once again with the same user, my shopping cart is EMPTY, so the user must add all products once again.

Since I see that prestashop save data regarding the shopping carts and which user what has added, why this data are not show to my registered users once they logout/login?

PS: Yes 'Re-display cart' is activated

Link to comment
Share on other sites

  • 2 years later...

PrestaShop replace the saved cart with a new cart, when the customer adds an item into the cart before logging in.
That's the logic of PrestaShop. And that logic is still present in PrestaShop version 9.x.

The module “Merge Carts – Prevent Lost Shopping Carts on Login” will fix this and merge the old saved cart with the newly created one.

promo_image_w300.png.2a5cfa64fe230cd3a1d828e231b3be55.png

“Merge Carts” is available at:
https://addons.prestashop.com/en/social-login-connect/96287-merge-carts-prevent-lost-shopping-carts-on-login.html

You can try the demo at:
https://www.bulletproof.se/_demos/mergecarts/
(btw, the demo is darn easy to use. It's got some cool features, and it's super easy to create an account and log in).

I explain the logic of how PrestaShop handles carts and how the module “Merge Carts” will fix it in this video:
https://youtu.be/mXKQUnPAjw8

Link to comment
Share on other sites

3 hours ago, redrum said:

PrestaShop replace the saved cart with a new cart, when the customer adds an item into the cart before logging in.
That's the logic of PrestaShop. And that logic is still present in PrestaShop version 9.x.

The module “Merge Carts – Prevent Lost Shopping Carts on Login” will fix this and merge the old saved cart with the newly created one.

promo_image_w300.png.2a5cfa64fe230cd3a1d828e231b3be55.png

“Merge Carts” is available at:
https://addons.prestashop.com/en/social-login-connect/96287-merge-carts-prevent-lost-shopping-carts-on-login.html

You can try the demo at:
https://www.bulletproof.se/_demos/mergecarts/
(btw, the demo is darn easy to use. It's got some cool features, and it's super easy to create an account and log in).

I explain the logic of how PrestaShop handles carts and how the module “Merge Carts” will fix it in this video:
https://www.oyodental.nl/category-107-b0-Verlichting-Tandartspraktijk.html

I see, thanks for the guide.

Link to comment
Share on other sites

On 12/2/2022 at 8:18 PM, dannielhendrix said:

Hi

I have an issue with a shopping cart, its Empty after user Logout/Login. Here is sequence of the issue:

1. I create a shopping cart as a "registered user", then I LOGOUT without completing the order.

2. If I login once again with the same user, my shopping cart is EMPTY, so the user must add all products once again.

Since I see that prestashop save data regarding the shopping carts and which user what has added, why this data are not show to my registered users once they logout/login?

PS: Yes 'Re-display cart' is activated monkey mart

When a user logs out, the shopping cart data may not be properly saved or re-associated with the user upon logging back in. Here are a few suggestions to troubleshoot this issue:

Check Cart Persistence Settings: Ensure that the settings for cart persistence are correctly configured in your PrestaShop back office. Sometimes, additional configurations may be needed to retain the cart data.

Session Management: Verify that your server’s session management is functioning properly. If sessions are not being maintained, it may cause the cart to reset upon logout.

Debugging: Enable debugging mode in PrestaShop to see if any errors are logged when the cart is being saved or retrieved. This might give you insight into what is going wrong.

Module Conflicts: Check for any third-party modules that may interfere with the cart functionality. Temporarily disabling these modules can help identify if they are causing the issue.

Custom Code: If you have custom code or overrides in place, review them to ensure they are not affecting the cart behavior during login/logout.

If the issue persists after trying these steps, consider reaching out to PrestaShop support or the community forums for further assistance.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...