Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    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
    66,363
    Blog Entries
    7
    Plugin Contributions
    274

    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!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    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
    966
    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
    966
    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
    966
    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. v138a Divide Customer Email List?
    By KittieMD in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 2
    Last Post: 7 May 2012, 09:18 PM
  2. v139h Sort customer list Alphabetically
    By I wish I could in forum Installing on a Linux/Unix Server
    Replies: 3
    Last Post: 27 Jan 2012, 01:32 AM
  3. Sort Customer List
    By soxophoneplayer in forum General Questions
    Replies: 1
    Last Post: 12 Oct 2011, 03:40 PM
  4. Extracting Email list from Customer list
    By rdsbaker in forum General Questions
    Replies: 8
    Last Post: 10 Jun 2010, 11:03 AM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR