I’d like to remove all products from cart and additional user informations (like shipping method etc.) when user logout OR closes the browser.
With logout there are no problems ... it’s easy to modify logout method but in the second case ...
I could remove that informations before login but I cannot make it because it could happen that user (before login) added some products to the cart - so I cannot remove them.
I have analyzed the DB structure and I see that in the table: sales_quote_entity there are a few records:
“main” record which contains main quote informations - it’s parent record for others.
Other records are responsible for products, payment info, address info etc. - these are child records for “main” record.
I could easily remove “child” records but ... I don’t think that it’s good idea but I don’t have any other solution.
Do you know any good solution of my problem ?
with best regards,