If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / Help getting Product Sorter Mod working with manufactuers listing

Help getting Product Sorter Mod working with manufactuers listing

Started by philip937 on 25 Mar 2013, 12:39 PM · Views: 535

Results 1 to 3 of 3
25 Mar 2013, 12:39 PM
#1
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Help getting Product Sorter Mod working with manufactuers listing

i'm using this code on my product listing pages which is great.

<?php 
/** 
 * Module Template 
 * 
 * @package templateSystem 
 * @copyright Copyright 2003-2006 Zen Cart Development Team 
 * @copyright Portions Copyright 2003 osCommerce 
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 
 * @version $Id: tpl_modules_additional_listing_display_order.php 3369 2006-04-03 23:09:13Z drbyte $ 
 */ 
?> 
<?php 
// NOTE: to remove a sort order option add an HTML comment around the option to be removed 
?> 

<div id="sorter"> 
<label for="disp-order-sorter"><?php echo TEXT_INFO_SORT_BY; ?></label> 
<?php 
  echo zen_draw_form('sorter_form', zen_href_link($_GET['main_page']), 'get'); 
  echo zen_draw_hidden_field('main_page', $_GET['main_page']); 
  echo zen_draw_hidden_field('cPath', $cPath); 
  // draw cPath if known 
  if (!$getoption_set) 
    echo zen_draw_hidden_field('cPath', $cPath); 
  echo zen_hide_session_id(); 
?> 
    <select name="sort" onchange="this.form.submit();" id="disp-order-sorter"> 
<?php if ($_GET['sort'] != PRODUCT_LISTING_DEFAULT_SORT_ORDER) { ?> 
    <option value="<?php echo PRODUCT_LISTING_DEFAULT_SORT_ORDER; ?>" <?php echo ($_GET['sort'] == PRODUCT_LISTING_DEFAULT_SORT_ORDER ? 'selected="selected"' : ''); ?>><?php echo PULL_DOWN_ALL_RESET; ?></option> 
<?php } // reset to store default ?> 
    <option value="1a" <?php echo ($_GET['sort'] == '1a' ? 'selected="selected"' : ''); ?>><?php echo TEXT_INFO_SORT_BY_PRODUCTS_NAME; ?></option> 
    <option value="1d" <?php echo ($_GET['sort'] == '1d' ? 'selected="selected"' : ''); ?>><?php echo TEXT_INFO_SORT_BY_PRODUCTS_NAME_DESC; ?></option> 
    <option value="3a" <?php echo ($_GET['sort'] == '3a' ? 'selected="selected"' : ''); ?>><?php echo TEXT_INFO_SORT_BY_PRODUCTS_PRICE; ?></option> 
    <option value="3d" <?php echo ($_GET['sort'] == '3d' ? 'selected="selected"' : ''); ?>><?php echo TEXT_INFO_SORT_BY_PRODUCTS_PRICE_DESC; ?></option> 
    </select></form></div> 

however, I have noticed that it doent work when viewing manufactuers product listings.. assumably because the above code is doing stuff with cPath etc where that is not relevant for the manufacturers view.

Can anyone advise how I can write the above to either work with either or a seperate one that will work with manufactueres and I will just run different codes baseed on the current view.

Many thanks

Phil Rogers
A problem shared is a problem solved.

2 Apr 2013, 3:07 PM
#2
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Re: Help getting Product Sorter Mod working with manufactuers listing

anyone at all? really could do with getting this working :(

Phil Rogers
A problem shared is a problem solved.

8 Apr 2013, 9:45 AM
#3
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Re: Help getting Product Sorter Mod working with manufactuers listing

Been playing with this for a while and still don't have a solution to the problem. Hoping one of you gurus can help?

Phil Rogers
A problem shared is a problem solved.