Zen Cart Logo
Forums / Addon Admin Tools / Email address exporter - specific countries / specific month?

Email address exporter - specific countries / specific month?

Views: 6,092

Results 1 to 2 of 2
19 Mar 2019, 4:49 PM
#1
bonheddwr avatar

bonheddwr

Zen Follower

Join Date:
Jun 2007
Location:
Cymru
Posts:
124
Plugin Contributions:
0

Email address exporter - specific countries / specific month?

Hi I have installed the Email Address Exporter plugin. I understand that it is possible to create a new list in the dropdown on the /email_export.php admin page by going to 'query_builder' in phpMyAdmin. All good so far. What I want is to create a new query to download the email addresses of active customers who have subscribed to the newsletter in a specific country (USA in this case) over the past 12 months. I already have this minus USA, so I guess I need to add that I just want to download email addresses of those based in the USA. Is this possible?

select c.customers_email_address, c.customers_lastname, c.customers_firstname from TABLE_CUSTOMERS c, TABLE_ORDERS o where c.customers_newsletter = '1' AND c.customers_id = o.customers_id and o.date_purchased > subdate(now(),INTERVAL 12 MONTH) GROUP BY c.customers_email_address order by c.customers_lastname, c.customers_firstname ASC

Secondly, is it possible to create a query to download the email address of active subscribers for a specific month/year?

I've searched the forums anc cannot seem to find the answer, therefore I hope somone can help. Many thanks.

20 Mar 2019, 9:45 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Email address exporter - specific countries / specific month?

For the customer's of a country, would probably be able to do that with zone information. Would need to determine what address record to use, whether it is their "base" address, their shipping address for a particular set of orders, or even perhaps the payment address. Or the entry_country_id for a specific address book related entry.

For the active in a given month, if not mistaken there isn't any table that specifically tracks every usage/login to the site, but there is a record of the last time a custommer was active. It seems that a separate table would need to be created to track each individual usage if that were deemed so important to be able to access...