There are 2 possible dropdowns depending on the arrangement of your categories and manufacturers plus the alpha sorter ...
Which of these are you trying to remove?
There are 2 possible dropdowns depending on the arrangement of your categories and manufacturers plus the alpha sorter ...
Which of these are you trying to remove?
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
The trick here is when to remove it as this is set based on the value of:
$do_filter_list
That changes based on:
1 go through via manufactuer and get filter on Categories
2 go through via category and get filter on Manufactuerers
This is setup in the file:
/includes/index_filters/default_filter.php
There isn't an override for this file nor a switch for that dropdown ...
The code around line 166 controls this:
PHP Code:$do_filter_list = false;
$filterlist = $db->Execute($filterlist_sql);
if ($filterlist->RecordCount() > 1) {
$do_filter_list = true;
if (isset($_GET['manufacturers_id'])) {
$getoption_set = true;
$get_option_variable = 'manufacturers_id';
$options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES));
} else {
$options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS));
}
while (!$filterlist->EOF) {
$options[] = array('id' => $filterlist->fields['id'], 'text' => $filterlist->fields['name']);
$filterlist->MoveNext();
}
}
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Using your templates and overrides directory copy the file:
/includes/templates/template_default/template/tpl_index_product_list.php
to your overrides directory and lines 37-83 run it:
PHP Code:<?php
$check_for_alpha = $listing_sql;
$check_for_alpha = $db->Execute($check_for_alpha);
if ($do_filter_list || ($check_for_alpha->RecordCount() > 0 && PRODUCT_LIST_ALPHA_SORTER == 'true')) {
$form = zen_draw_form('filter', zen_href_link(FILENAME_DEFAULT), 'get') . '<label class="inputLabel">' .TEXT_SHOW . '</label>';
?>
<?php
echo $form;
echo zen_draw_hidden_field('main_page', FILENAME_DEFAULT);
echo zen_hide_session_id();
?>
<?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));
?>
</form>
<?php
}
?>
<br class="clearBoth" />
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
The simple answer is:
Admin-Configuration-Product Listing;
`Include Product Listing Alpha Sorter Dropdown = false
Yes that removes the Alpha Sorter but not the Categories and Manufactuerers Dropdowns ...
Thanks for the info ...![]()
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!