Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2013
    Posts
    2
    Plugin Contributions
    0

    Default Need to add sort drop down to sub category product listings....

    I have tried to search for this and only find incomplete threads or no answers at all.

    Would like to add the sort from this page: http://thewholesomehearth.authsafe.c...w&disp_order=3

    to these pages also....http://thewholesomehearth.authsafe.c...x&cPath=31_102

    I can add the code to the page that makes it appear but when i select the sort order it just redirects me to the home page....

    Any help on this is greatly and sincerely appreciated.

    Thanks in advance
    Tom

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

    Default Re: Need to add sort drop down to sub category product listings....

    Quote Originally Posted by tomlcuneo View Post
    I have tried to search for this and only find incomplete threads or no answers at all.

    Would like to add the sort from this page: http://thewholesomehearth.authsafe.c...w&disp_order=3

    to these pages also....http://thewholesomehearth.authsafe.c...x&cPath=31_102

    I can add the code to the page that makes it appear but when i select the sort order it just redirects me to the home page....

    Any help on this is greatly and sincerely appreciated.

    Thanks in advance
    Tom
    Couple of options come to mind, one is to duplicate the files "affected" and reference them, or to modify the way the existing function(s) work. Yes, the categories are referenced by a main_page = index; therefore, selecting the filter returns back to index (homepage), the thing here is though there are parameters associated that need to be addressed...

    Not entirely sure the "safest" route, but, the following code in includes/templates/YOUR_TEMPLATE/templates/tpl_modules_listing_display_order.php could be modified from:

    Code:
     echo zen_draw_form('sorter_form', zen_href_link($_GET['main_page']), 'get');
     echo zen_draw_hidden_field('main_page', $_GET['main_page']);
    to:
    Code:
     echo zen_draw_form('sorter_form', zen_href_link($_GET['main_page'], $parameters), 'get');
     echo zen_draw_hidden_field('main_page', $_GET['main_page']);
    Alternatively, could use a check to see the value of main_page and get the appropriate information from that condition and or additional checks of values set on the get environment instead of always passing the $parameters. The next thing would be to go back and copy/duplicate includes/templates/YOUR_TEMPLATE/templates/tpl_modules_listing_display_order.php and includes/templates/YOUR_TEMPLATE/templates/tpl_product_listing_standard.php giving each a name that relates to your categories filtering, modify the call in the product_listing_standard file, then in the includes/modules/pages/index/main_template_vars.php (or subsequent individual file) reference the newly generated version of the product_listing_standard file... This way, only the index would use the new file, but still may need to be limited to the case(s) desired.

    All of the above is untested and unfortunately only from ideas/concepts and code review..
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. Replies: 8
    Last Post: 13 Feb 2013, 04:06 PM
  2. Category and Sub Category Multiple Drop Down Menus
    By jason_dm in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 22 Oct 2009, 05:43 AM
  3. Can I add new product type filter to New Products drop down sort?
    By rwoody in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 17 Dec 2008, 08:42 PM
  4. Replies: 0
    Last Post: 28 Jul 2008, 09:59 PM
  5. Add Sort Drop Down to Product Listing?
    By hanzj in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 15 Apr 2008, 08:37 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