Sort customer email pulldown list differently
Someone please help me on this, its doing my brain in.
In the coupon admin > email coupon page, on the drop down list I desperatly need the list of customers to be in Decending order by customer id.
by default they are alphabetical, but I have thousands of customers and regualry have the need to send coupons to new customers.
I have found the part that cretaes the drop down which is this:
<tr>
<td class="main"><?php echo TEXT_CUSTOMER; ?> </td>
<td><?php echo zen_draw_pull_down_menu('customers_email_address', $customers, $_GET['customer']);?></td>
</tr>
<tr>
and $customers was defined above by:
$customers = get_audiences_list('email');
I assumed that this was all done in the query_builder, but to me it looks like those querys only call the grouped emails for like:
All Customers
customers in last 3 months etc..
I cant find the query that ends up listing the customers individually ?
please can someone point me in the right direction so that I can change the order that they are listed please.
Many Thanks
Phil
Re: Sort customer email list differently
/includes/functions/audience.php:
Code:
"order by customers_lastname, customers_firstname, customers_email_address");
NOTE: changing this will affect ALL pages where email dropdown choices are offered, NOT JUST your coupon admin page.
Re: Sort customer email list differently
Quote:
Originally Posted by
DrByte
/includes/functions/audience.php:
Code:
"order by customers_lastname, customers_firstname, customers_email_address");
NOTE: changing this will affect ALL pages where email dropdown choices are offered, NOT JUST your coupon admin page.
you diamond! thanks doc!
Re: Sort customer email list differently
Quote:
Originally Posted by
DrByte
/includes/functions/audience.php:
Code:
"order by customers_lastname, customers_firstname, customers_email_address");
NOTE: changing this will affect ALL pages where email dropdown choices are offered, NOT JUST your coupon admin page.
ok am I being daft?
I have changed it to:
PHP Code:
"order by customers_id, customers_lastname, customers_firstname, customers_email_address DESC"
but its showing the oldest customers first??
Re: Sort customer email pulldown list differently
oh this seems to work:
PHP Code:
"order by customers_id DESC"
is that right??