Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    901
    Plugin Contributions
    0

    Default 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; ?>&nbsp;&nbsp;</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

  2. #2
    Join Date
    Jan 2004
    Posts
    59,807
    Blog Entries
    4
    Plugin Contributions
    133

    Default 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.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    901
    Plugin Contributions
    0

    Default Re: Sort customer email list differently

    Quote Originally Posted by DrByte View Post
    /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!

  4. #4
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    901
    Plugin Contributions
    0

    Default Re: Sort customer email list differently

    Quote Originally Posted by DrByte View Post
    /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??

  5. #5
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    901
    Plugin Contributions
    0

    Default Re: Sort customer email pulldown list differently

    oh this seems to work:

    PHP Code:
    "order by customers_id DESC" 
    is that right??

 

 

Similar Threads

  1. email customer... create new list
    By kitcorsa in forum General Questions
    Replies: 5
    Last Post: 11 Mar 2011, 10:43 AM
  2. Extracting Email list from Customer list
    By rdsbaker in forum General Questions
    Replies: 8
    Last Post: 10 Jun 2010, 11:03 AM
  3. Issue w/ Customer Account Create DOB / Date of Birth Pulldown Mod
    By Donn in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 18 Feb 2009, 10:33 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •