Alrighty, I think I've got it.
2 sql statements: First one to setup an Email configuration field to hold the test emails, and one for the query builder. This is set up to use email addresses, but you could adapt it to use customer id's if you'd rather.
If you use prefixes in your database, you'll want to change the tables accordingly (but don't change the TABLE_CUSTOMERS, etc ones...zencart replaces with proper table names).
Code:
INSERT INTO configuration
(configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, )
VALUES ('Newsletter Email Test Group', 'NEWSONLY_SUBSCRIPTION_TEST_GROUP', '', 'Enter email address, separated with a comma, of customers you would like to include in the test group.', 12, 40, now(), now() );
INSERT INTO query_builder
(query_category, query_name, query_description, query_string)
VALUES ('email,newsletters', 'Newsletter Test Group',
'Returns name and email address of Customer Accounts designated in Email configuration.',
'SELECT c.customers_firstname, c.customers_lastname, c.customers_email_address FROM TABLE_CUSTOMERS as c LEFT JOIN TABLE_CONFIGURATION as q on LOCATE( c.customers_email_address, q.configuration_value) >= 1 WHERE configuration_key = ''NEWSONLY_SUBSCRIPTION_TEST_GROUP'' ');
After inserting, you'll want to enter email addresses that match your test accounts.
Bookmarks