Jump to content

Issue with Cart Deletion Causing Major Bug


Fiverrpromotion

Recommended Posts

Hi,

I’m using a module that helps me delete data from the database, which is supposed to free up space. This module gives me a URL that I use with another cron job module to manage the deletions.

One of the things I decided to delete is "carts without orders." The module deletes carts that are older than a certain number of days. However, after running this process, something is not working properly. Specifically, users with open carts at the time of deletion seem to be having issues with adding products to their carts now.

Here’s what happens:

From the front end, when a user tries to add a product to the cart, the product is technically added, but the cart looks empty. The same thing happens if they try again—nothing seems to work.

In the database, I can see that a new cart is created in the ps_cart table, and the product, along with its quantity, is added in the ps_cart_product table. But with each attempt, a new row is added, yet the cart stays empty on the front end.

From what I can tell, a new cart is being created in the database, but the front end isn’t showing it. The cart is still empty, and the number next to the cart icon doesn’t change. It’s like the session is stuck on the old cart, even though it was deleted, and the session isn’t updating with the new cart. I tried clearing cookies, but nothing changed.

Does anyone know what’s going on? I really need help with this!

Thanks.

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...