I want to use the same "Sort By" functionality (product name, price, date added, etc) that's found on the All Products page (index.php?main_page=products_all) on the index listing or product listing (whatever it's called when you click on a category to view it's products). Currently it has the "Filter Results by" and the A-Z list and I want to replace that one. I'm not quite sure how to do this.
I'm looking at this code in includes/templates/my_own_template/templates/tpl_index_product_list.php:
I tried pasting the below line from tpl_products_all_default.php into the first page and it creates the form but the functionality isn't working:Code:<?php // draw cPath if known if (!$getoption_set) { echo zen_draw_hidden_field('cPath', $cPath); } else { // draw manufacturers_id echo zen_draw_hidden_field($get_option_variable, $_GET[$get_option_variable]); } // draw typefilter if (isset($_GET['typefilter']) && $_GET['typefilter'] != '') echo zen_draw_hidden_field('typefilter', $_GET['typefilter']); // draw manufacturers_id if not already done earlier if ($get_option_variable != 'manufacturers_id' && isset($_GET['manufacturers_id']) && $_GET['manufacturers_id'] > 0) { echo zen_draw_hidden_field('manufacturers_id', $_GET['manufacturers_id']); } // draw sort echo zen_draw_hidden_field('sort', $_GET['sort']); // draw filter_id (ie: category/mfg depending on $options) if ($do_filter_list) { echo zen_draw_pull_down_menu('filter_id', $options, (isset($_GET['filter_id']) ? $_GET['filter_id'] : ''), 'onchange="this.form.submit()"'); } // draw alpha sorter require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_PRODUCT_LISTING_ALPHA_SORTER)); ?>
Where do I go from here?Code:<?php require($template->get_template_dir('/tpl_modules_listing_display_order.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_listing_display_order.php'); ?>
Thanks!



