This is new in v1.3.x ... and did not exist in the v1.2.x series ...
I do not have a v1.2.7 laying about, but in v1.3 this is what is in the:
/includes/modules/pages/index/header_php.php
PHP Code:
// query the database based on the selected filters
$listing = $db->Execute($listing_sql);
// if only one product in this category, go directly to the product page, instead of displaying a link to just one item:
// if filter_id exists the 1 product redirect is ignored
if (SKIP_SINGLE_PRODUCT_CATEGORIES=='True' and (!isset($_GET['filter_id']) and !isset($_GET['alpha_filter']))) {
if ($listing->RecordCount() == 1) {
zen_redirect(zen_href_link(zen_get_info_page($listing->fields['products_id']), ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing->fields['products_id']));
}
}
Perhaps this will help you adapt your old, acient, buggy and heavily security patched out dated code to work with this feature available in the nice, new, code with all of the neat new features that your code lacks ...
Bookmarks