Querying MySQL for Abandoned Cart Information

Please LogIn to Reply!

Post By: admin | 26-01-2012 06:35 Reply

 

Hi,

I want to run a SQL query to determine information about abandoned shopping carts.

How would you suggest that I find abandoned carts in the database?

From what I can tell, it looks like I would query the sales_flat_quote table, but what would I need in the “where” clause to determine whether a particular row can be considered abandoned?

Thanks.

 

1) You can get your abandoned carts at Reports->Shopping Carts -> Abandoned Carts

You can find your rows with this query but if you have an older site or a REALLY busy site, I WOULD NOT RUN THIS QUERY. IT IS REALLY BIG

SELECT FROM sales_flat_quote_item where item_id not in (SELECT quote_item_id FROM sales_flat_order_item)

If you run that query on a busy site you will seriously slow it down for 30 minutes

 Signature 

Brent W. Peterson
Chief Magento Evangelist at Wagento.com a Magento Silver Partner
==========
Follow me on Twitter @brentwpeterson

**Always remember to backup before trying anything new

`Reply Or Comment!
Please LogIn to Reply!