Results 1 to 7 of 7
  1. #1
    Join Date
    May 2004
    Location
    UK
    Posts
    478
    Plugin Contributions
    0

    Default Product Sort order - descending

    Hiya

    For some odd reason I seem to have our products in descending order - ie each product has its own sort value and its showing them 800 first to 0 last - when its usually the other way round!

    I cannot see where I might have done this to switch it back - as I would like 0 & 1 shown before 800 (product sort value)

    (I know that you can change the sort to name and / or price etc using 1a 1d, 2a 2d etc etc but we really would like to have it as 0-800 and there is no value to change from ascending to descending - in that area that I can see)

    Any ideas??

    (I thought that you could default to 20a or 20d but then realised that it ignores that and gives me the 800-1 sort ...)

    (http://www.maximonsolutions.com/shop...-mobile-radios shows the discontinued ones first when we need them last)

    Thank you
    Sarah

  2. #2
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: Product Sort order - descending

    Have you tried removing any sort order by leaving as blank instead of 20a? A default install will sort by sort number if there is no sort order "designation" provided.

    This is controlled by the filters in includes/index_filters
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    May 2004
    Location
    UK
    Posts
    478
    Plugin Contributions
    0

    Default Re: Product Sort order - descending

    Quote Originally Posted by mc12345678 View Post
    Have you tried removing any sort order by leaving as blank instead of 20a? A default install will sort by sort number if there is no sort order "designation" provided.

    This is controlled by the filters in includes/index_filters
    Yes its currently blank already and seems to sort it backwards to normal!

  4. #4
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: Product Sort order - descending

    Quote Originally Posted by SarahL View Post
    Yes its currently blank already and seems to sort it backwards to normal!
    Just looked through the code and there is a place where the "normal" sort order could be reversed, don't know if that is what happened for/to you...

    If you only have three files in the includes/index_filters directory, then take a look at default_filter.php

    Towards the "bottom" lines 104 and 105 read like this in a vanilla install:

    Code:
    //       $listing_sql .= " order by p.products_sort_order desc, pd.products_name"; 
              $listing_sql .= " order by p.products_sort_order, pd.products_name";
    With a comment above that reads:
    Code:
    // sort by products_sort_order when PRODUCT_LISTING_DEFAULT_SORT_ORDER is left blank 
    // for reverse, descending order use:
    And so perhaps, the first line has been uncommented and the second commented? (swapping of // from the first line to the second)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    May 2004
    Location
    UK
    Posts
    478
    Plugin Contributions
    0

    Default Re: Product Sort order - descending

    thank you! I will certainly go take a look at that code

  6. #6
    Join Date
    May 2004
    Location
    UK
    Posts
    478
    Plugin Contributions
    0

    Default Re: Product Sort order - descending

    THANK YOU!

    That sorted it - I had swapped it previously using that code and totally forgot in in my notes!!

    thank you so much

  7. #7
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: Product Sort order - descending

    Quote Originally Posted by SarahL View Post
    THANK YOU!

    That sorted it - I had swapped it previously using that code and totally forgot in in my notes!!

    thank you so much
    Glad that's all it was. :) happy zenning!
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. v139h Main page, display order descending?
    By lissa in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 27 Jan 2013, 07:00 PM
  2. v151 Product Sort within Category - having problems changing the default sort order
    By Don Wagner in forum Customization from the Admin
    Replies: 4
    Last Post: 21 Oct 2012, 03:03 AM
  3. Sort by dated added descending.... working on 2 sites but not my third :(
    By alma in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 20 Dec 2007, 01:07 AM
  4. Product Listing Descending Sort Order
    By wolf99 in forum Basic Configuration
    Replies: 3
    Last Post: 24 Feb 2007, 05:42 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR