So, for those of you who have the COWOA mod installed and want to suppress emails to COWOA customers, you can make these changes. I'm only using the Contact customers without purchase and Review reminder mods, but I'm sure you can get what you need from this to use with the other mods.
For Contact customers without purchase in nopurchase.php change this (starting at line 71)
PHP Code:
$query_raw = "select c.customers_firstname, c.customers_lastname, c.customers_id, c.customers_email_address
from " . TABLE_CUSTOMERS. " c, " . TABLE_CUSTOMERS_INFO . " ci
left join " . TABLE_ORDERS . " o
on (o.customers_id = ci.customers_info_id) " .
( (MAILBEEZ_NOPURCHASE_CB == 'True') ?
" left join " . TABLE_CUSTOMERS_BASKET . " cb
on (cb.customers_id = ci.customers_info_id) " : '' ) . "
where o.customers_id is NULL " .
( (MAILBEEZ_NOPURCHASE_CB == 'True') ?
" and cb.customers_id is NOT NULL " : '' ) . "
and ci.customers_info_id = c.customers_id
and ci.customers_info_date_account_created <= '" . $date_passed . "'
and ci.customers_info_date_account_created > '" . $date_skip . "' ";
to:
PHP Code:
$query_raw = "select c.customers_firstname, c.customers_lastname, c.customers_id, c.customers_email_address, c.COWOA_account
from " . TABLE_CUSTOMERS. " c, " . TABLE_CUSTOMERS_INFO . " ci
left join " . TABLE_ORDERS . " o
on (o.customers_id = ci.customers_info_id) " .
( (MAILBEEZ_NOPURCHASE_CB == 'True') ?
" left join " . TABLE_CUSTOMERS_BASKET . " cb
on (cb.customers_id = ci.customers_info_id) " : '' ) . "
where o.customers_id is NULL " .
( (MAILBEEZ_NOPURCHASE_CB == 'True') ?
" and cb.customers_id is NOT NULL " : '' ) . "
and ci.customers_info_id = c.customers_id
and c.COWOA_account = '0'
and ci.customers_info_date_account_created <= '" . $date_passed . "'
and ci.customers_info_date_account_created > '" . $date_skip . "' ";
For Review Reminder in nopurchase.php change this (starting at line 72)
PHP Code:
$query_raw = "select c.customers_firstname, c.customers_lastname, o.orders_id,
o.customers_id, c.customers_email_address, o.date_purchased, s.date_added as status_date
from " . TABLE_ORDERS . " o, " . TABLE_CUSTOMERS . " c, " . TABLE_ORDERS_STATUS_HISTORY . " s
where o.customers_id = c.customers_id
and o.orders_id = s.orders_id
and o.orders_status = s.orders_status_id
and s.orders_status_id = '" . (int)$status . "'
and s.date_added <= '" . $date_passed . "'
and s.date_added > '" . $date_skip . "'
order by o.orders_id ASC";
to
PHP Code:
$query_raw = "select c.customers_firstname, c.customers_lastname, c.COWOA_account, o.orders_id,
o.customers_id, c.customers_email_address, o.date_purchased, s.date_added as status_date
from " . TABLE_ORDERS . " o, " . TABLE_CUSTOMERS . " c, " . TABLE_ORDERS_STATUS_HISTORY . " s
where o.customers_id = c.customers_id
and c.COWOA_account = '0'
and o.orders_id = s.orders_id
and o.orders_status = s.orders_status_id
and s.orders_status_id = '" . (int)$status . "'
and s.date_added <= '" . $date_passed . "'
and s.date_added > '" . $date_skip . "'
order by o.orders_id ASC";
Bookmarks