Results 1 to 10 of 10
  1. #1
    Join Date
    Jul 2005
    Location
    Brooklyn NY
    Posts
    507
    Plugin Contributions
    0

    help question how do I get my whats new page to list in order of date?

    http://www.gottagreatgift.com/
    How can I get my whats new page or my whats new category to list the products by the date it was added not by alphabetically.

  2. #2
    Join Date
    May 2010
    Location
    WA State
    Posts
    1,678
    Plugin Contributions
    3

    Default Re: how do I get my whats new page to list in order of date?

    Configuration/New Listing/Display Product Display - Default Sort Order

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: how do I get my whats new page to list in order of date?

    You appear to be using a Category for your New Products so it is using the setting for the Product Listing ...

    However, you are trying to make 1 Category use a different default sort order than all of the others ...

    The Product Listing is not designed for a sort order by date, without customizing the code ...

    To then make it so 1 Category sorts one way, and all other categories sort another way would require further customization ...

    There is a New Products page that you could use where you can set the Sort Order separate from the Categories in the Product Listing ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: how do I get my whats new page to list in order of date?

    One thing you could do is if you are sorting, for example, your Product Listing by Product Name, you could customize the file:
    /includes/index_filters/default_filter.php

    and change the code around line 120 to read:
    Code:
            case 'PRODUCT_LIST_NAME':
            if ($current_category_id == 210) {
              $listing_sql .= " order by p.products_date_added, pd.products_name " . ($sort_order == 'd' ? 'desc' : '');
            } else {
              $listing_sql .= " order by pd.products_name " . ($sort_order == 'd' ? 'desc' : '');
            }
    and that would make that one category for category 210, where that is the products master_categories_id sort first by date then by name ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Jul 2005
    Location
    Brooklyn NY
    Posts
    507
    Plugin Contributions
    0

    Default Re: how do I get my whats new page to list in order of date?

    this is what I have added but nothing has changed

    // if set to nothing use products_sort_order and PRODUCTS_LIST_NAME is off
    if (PRODUCT_LISTING_DEFAULT_SORT_ORDER == '') {
    $_GET['sort'] = '20a';
    }
    } else {
    $sort_col = substr($_GET['sort'], 0 , 1);
    $sort_order = substr($_GET['sort'], 1);
    $listing_sql .= ' order by ';
    switch ($column_list[$sort_col-1]) {
    case 'PRODUCT_LIST_MODEL':
    $listing_sql .= "p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
    break;
    case 'PRODUCT_LIST_NAME':
    if ($current_category_id == 210) {
    $listing_sql .= " order by p.products_date_added, pd.products_name " . ($sort_order == 'd' ? 'desc' : '');
    } else {
    $listing_sql .= " order by pd.products_name " . ($sort_order == 'd' ? 'desc' : '');
    }
    break;
    case 'PRODUCT_LIST_MANUFACTURER':
    $listing_sql .= "m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
    break;
    case 'PRODUCT_LIST_QUANTITY':
    $listing_sql .= "p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
    break;
    case 'PRODUCT_LIST_IMAGE':
    $listing_sql .= "pd.products_name";
    break;
    case 'PRODUCT_LIST_WEIGHT':
    $listing_sql .= "p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
    break;
    case 'PRODUCT_LIST_PRICE':
    // $listing_sql .= "final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
    $listing_sql .= "p.products_price_sorter " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
    break;
    }
    }
    }

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: how do I get my whats new page to list in order of date?

    What is the setting on your Product Listing for the Sort Order? Is it set for the Product Name?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  7. #7
    Join Date
    Jul 2005
    Location
    Brooklyn NY
    Posts
    507
    Plugin Contributions
    0

    Default Re: how do I get my whats new page to list in order of date?

    where would I find that

    the Display Product Listing Default Sort Order is blank

  8. #8
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: how do I get my whats new page to list in order of date?

    I do not use the add on that you are but look to see what the settings are for the fields that you have turned on ...

    What is Product Name set to?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  9. #9
    Join Date
    Jul 2005
    Location
    Brooklyn NY
    Posts
    507
    Plugin Contributions
    0

    Default Re: how do I get my whats new page to list in order of date?

    Display Product Name is set to 2

  10. #10
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: how do I get my whats new page to list in order of date?

    Try setting the Sort Order to 2a and see what happens ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

Similar Threads

  1. Replies: 1
    Last Post: 21 Mar 2013, 10:01 AM
  2. IE(Problem) with the whats new list
    By fR4G in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 27 Oct 2009, 07:41 PM
  3. How to toggle between Whats New Box and Whats New on Main page?
    By Asdesign in forum Basic Configuration
    Replies: 0
    Last Post: 12 Aug 2009, 06:37 PM
  4. How Do I Make Whats New Show in Center Collum on Home Page?
    By DieselMinded in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 8 May 2009, 09:04 AM
  5. Can't get rid of Whats New, Reviews, Featured Links
    By Nick1973 in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 1 Oct 2008, 03:54 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