Exporting Customers with orders
I am trying to export a customer list via phpmyadmin. I need to emails and names of customers that have ordered recently.
I can export zen_customer and it gives me all I need beside telling me if they have ever placed an order or not. Where is the order count stored for a customer? In zen admin I can see the customers number of logins and number of orders. Where is it stored? I would think I can merge the two tables somehow to create a list like I need.
Thanks
Re: Exporting Customers with orders
Have you tried email address exporter? There are a few built-in filters and adding a filter into the proper database table is fairly straighforward and people here (smarter than me) are good at helping with that
We added one for customers whose order total dollar value >$10 and dormant over 3 months and subscribed
There's one for active customers who have spent money within the past 3 months and subscribed
https://www.zen-cart.com/downloads.php?do=file&id=6
Re: Exporting Customers with orders
OK thanks. This add on worked out fine. I had to edit the sql to get the 24 month range but was no problem.
Re: Exporting Customers with orders
I'm assuming you found the "query_builder" table where you can edit or add new filters
One we added and use frequently to sort the freeloaders from the customers who spend money.
Code:
select o.date_purchased, c.customers_email_address, c.customers_lastname, c.customers_firstname from TABLE_CUSTOMERS c, TABLE_ORDERS o WHERE c.customers_id = o.customers_id AND
o.order_total > 10 AND
c.customers_newsletter = 1 GROUP BY c.customers_email_address HAVING max(o.date_purchased) <= subdate(now(),INTERVAL 3 MONTH) ORDER BY c.customers_lastname, c.customers_firstname ASC