Results 1 to 4 of 4

change default product sort order

This is a discussion on change default product sort order within the Custom Mods and Hacks forums, part of the osCmax V2.5 Forums category; I would like the product default sort order to be Price (low to high) on the product listing page. I ...

      
  1. #1
    Member
    Join Date
    Jul 2011
    Posts
    95
    Rep Power
    3


    Default change default product sort order

    I would like the product default sort order to be Price (low to high) on the product listing page. I am using the grid product display. I have looked at product_listing_col.php and see the options but cannot figure out how to change the default selection. How can I do this?

    thanks,

    Dan

  2. #2
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    3,121
    Rep Power
    55


    Default Re: change default product sort order

    Try changing in product_listing_cols and product_listing:

    tep_draw_pull_down_menu('sort', $sort_array, $_GET['sort'], 'onChange="this.form.submit();"')

    to

    tep_draw_pull_down_menu('sort', $sort_array, (isset($_GET['sort']) ? $_GET['sort'] : '4a'), 'onChange="this.form.submit();"')

    Not tested or tried but should work!

    Regards.
    pgmarshall
    _______________________________

  3. #3
    Member
    Join Date
    Jul 2011
    Posts
    95
    Rep Power
    3


    Default Re: change default product sort order

    thanks for your response. I tried it on both product_listing_cols and product_listing but it did not work on either one. It still is sorting by Product Name (a-z) as the selected sort. I also tried it with Display Best Sellers sort turned on and off in admin/product listing and that made no difference.

  4. #4
    Member
    Join Date
    Jul 2011
    Posts
    95
    Rep Power
    3


    Default Re: change default product sort order

    I deleted all but the options for sorting by price in the sort box in product_listing_cols but it still defaults to sorting by Product Name (A - Z) even though they are no longer options. I viewed source and it showed:

    <select name="sort" onChange="this.form.submit();">
    <option value="4a">Price (Low - High)</option>
    <option value="4d">Price (High - Low)</option>
    </select></form>

    I then switched to the list format where I did not remove the options and viewing source showed:

    <select name="sort" onChange="this.form.submit();">
    <option value="0d">Bestsellers</option>
    <option value="3a" SELECTED>Product Name (A-Z)</option>
    <option value="3d">Product Name (Z-A)</option>
    <option value="4a">Price (Low - High)</option>
    <option value="4d">Price (High - Low)</option>
    </select></form>


    There must be another area where this option is selected. Does anyone have any ideas?

    Dan

Similar Threads

  1. Default Sort Order by Price
    By ptrau in forum Store Administration
    Replies: 1
    Last Post: 08-06-2011, 11:27 AM
  2. Change Order Status Sort Order
    By GPMaina in forum osCmax v2 Customization/Mods
    Replies: 3
    Last Post: 12-08-2009, 11:06 PM
  3. product default sort order?
    By blackhawk in forum osCmax v2 Customization/Mods
    Replies: 5
    Last Post: 10-20-2009, 08:18 AM
  4. change default order number system
    By Rod1mu5 in forum osCmax v2 Customization/Mods
    Replies: 4
    Last Post: 12-16-2007, 06:11 AM
  5. Change sort order on new products
    By Lord in forum osCommerce 2.2 Modification Help
    Replies: 2
    Last Post: 03-23-2005, 02:05 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
  •