Jump to content

Database table not cleared when deleting items with customized text


kellmann

Recommended Posts

Hi

I'm running Prestashop 1.6.1.13. Everything's fine except one strange thing. I have a few items with customization text. If a customer puts one of these items in the cart, and of course enters the customization text, and then deletes the item from the cart, the tables ps_customization and ps_customized_data are not cleared. This results in the customer getting the "old" values back in the cart ifthey put the same item back in the cart. Then there's multiple lines of the same item, with the old values. All of the items are added to the item summary, buth the total is correct.

How do I force Prestashop to delete the customized text when the customer removes the item from the cart?

Another thing. If I delete the cart from Admin > Customers > Shopping Carts, the tables are cleared as the should be. But not if the customer removes the item himself.

/Carl

Link to comment
Share on other sites

  • 4 years later...
  • 2 weeks later...
On 9/4/2019 at 7:26 PM, kellmann said:

How do I force Prestashop to delete the customized text when the customer removes the item from the cart?

 

Hi,

I think this behavior might not be configurable through the admin panel, so you may need to implement custom code to address this issue.

  • You'll need to find the code responsible for removing items from the cart and determine where the customization data is being handled.
  • Then you can modify it to also delete the customization data associated with the item being removed from the cart. This might involve deleting entries from the ps_customization and ps_customized_data tables
  • After making the necessary changes, thoroughly test the functionality to ensure that customization data is properly cleared when an item is removed from the cart.

NOTE Regarding the issue with customization data not being cleared when deleting the cart from the admin panel versus when the customer removes the item themselves, it could indicate a discrepancy in how the deletion process is handled in these different scenarios. You may need to investigate further to understand why this difference exists and whether it requires additional customization to address.

Thanks!

Edited by AddWeb Solution (see edit history)
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...