My cart page is broken because of disabled products in the cart. The disabled products remained in the cart for some of my customer in below scenario:
- Customer added product (enabled product) in his cart and left the cart.
- The product was disabled next day as it was out-of-stock.
- Customer returned back after a week using the same session/cart.
- Since the product that was already in his cart was disabled the cart page is some how broken.
I want to remove those disabled product from quote items when ever cart is loaded for the customer.Please let me know what observer i can use to know the cart is loaded or any other better way to resolve the issue?
Whenever there is disabled product in the cart, the sales_flat_quote_item table has only one record (for configurable only) for the product. In normal case this table will have two records one as configurable and another as simple for each quote. I actually wanted to remove such single record line form the table caused because of disabled products but i do not want to do this through SQL.