I am working with a Magento 1.9. I had added some products (Simple products) to my cart as a logged in user and saved it for checkout it later. But I haven't placed it as an order. I empty that cart.
Which are the tables affected by this process while I am emptying the cart? There is no changes in sales_flat_quote
and sales_flat_quote_items
, after doing this .But it is removed from my cart. How does Magento know that my cart is empty? Please help me.
Thanks in advance!
Best Answer
When you add product to the cart, magento will have entries in
sales_flat_quote
,sales_flat_quote_item
andsales_flat_quote_address
ie: Carts are saved to the
sales_flat_quote
tableThe items in the basket are saved to
sales_flat_quote_item
, linked by the quote'sentity_id
Most of the entries in
sales_flat_quote_address
will be null when you create the cart. later it will be updated on checkout with proper addresses.So when you remove a product from the cart, that product will be removed from the
sales_flat_quote_item
anditem_qty,item_count
andprices
will be removed from thesales_flat_quote
This is the usual working flow. If you are not working on production please do truncate your quote tables and add product to the cart to see this changes. I think you might have missed the changes. Please do check the updated date of entries and you will definitely see the difference.