Re: Dynamic Filter [Support Thread]
Quote:
Originally Posted by
Wilkesy
Hi,
Always forget about the error logs.
The error shows
PHP Fatal error: Cannot redeclare zen_create_random_value() (previously declared in /home/rattanga/public_html/includes/functions/functions_general.php:626) in /home/rattanga/public_html/includes/functions/password_funcs.php on line 86
I am running Zencart 1.5.1
there are som differences btween the functions_general.php of 1.5.0 and 1.5.1
use the default functions_genral.php from ZC 1.5.1
Just merge the parts below:
find
PHP Code:
function zen_get_all_get_params($exclude_array = '', $search_engine_safe = true) {
if (!is_array($exclude_array)) $exclude_array = array();
$exclude_array = array_merge($exclude_array, array(zen_session_name(), 'main_page', 'error', 'x', 'y'));
$get_url = '';
if (is_array($_GET) && (sizeof($_GET) > 0)) {
reset($_GET);
while (list($key, $value) = each($_GET)) {
if (is_array($value) || in_array($key, $exclude_array)) continue;
if (strlen($value) > 0) {
$get_url .= zen_sanitize_string($key) . '=' . rawurlencode(stripslashes($value)) . '&';
}
}
}
replace by:
PHP Code:
function zen_get_all_get_params($exclude_array = '', $search_engine_safe = true) {
if (!is_array($exclude_array)) $exclude_array = array();
$exclude_array = array_merge($exclude_array, array(zen_session_name(), 'main_page', 'error', 'x', 'y'));
$get_url = '';
if (is_array($_GET) && (sizeof($_GET) > 0)) {
reset($_GET);
while (list($key, $value) = each($_GET)) {
// bof dynamic filter 1 of 3
if ( (!in_array($key, $exclude_array)) && (strlen($value) > 0 || is_array($value) && array_filter($value) ) && ($key != 'main_page') && ($key != zen_session_name()) && ($key != 'error') && ($key != 'x') && ($key != 'y') ) {
// eof dynamic filter 1 of 3
if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) {
// die ('here');
$get_url .= $key . '/' . rawurlencode(stripslashes($value)) . '/';
} else {
// bof dynamic filter 2 of 3
if (is_array($value)) {
foreach($value as $arr){
$get_url .= zen_sanitize_string($key) . '[]=' . rawurlencode(stripslashes($arr)) . '&';
}
} else {
// eof dynamic filter 2 of 3
$get_url .= zen_sanitize_string($key) . '=' . rawurlencode(stripslashes($value)) . '&';
// bof dynamic filter 3 of 3
}
// eof dynamic filter 3 of 3
}
}
}
}
1 Attachment(s)
Re: Dynamic Filter [Support Thread]
Is there a way to control the display of prices in the filter,
instead of
Attachment 12172
to the following,
$25 -- $50
$51 -- $75
$76 -- $100
$100 and over
Re: Dynamic Filter [Support Thread]
Quote:
Originally Posted by
Kevin205
Is there a way to control the display of prices in the filter,
instead of
Attachment 12172
to the following,
$25 -- $50
$51 -- $75
$76 -- $100
$100 and over
Not that I know of. It would be useful :)
Also keep in mind that the price used/shown in the filter is the one without tax/vat.
Re: Dynamic Filter [Support Thread]
Quote:
Originally Posted by
Design75
Not that I know of. It would be useful :)
Also keep in mind that the price used/shown in the filter is the one without tax/vat.
cant you set the price limits in the admin settings for dynamic filter?
Re: Dynamic Filter [Support Thread]
Re: Dynamic Filter [Support Thread]
Quote:
Originally Posted by
Kevin205
I don't think you can.
Maximum Number of Price Ranges ??
Re: Dynamic Filter [Support Thread]
Quote:
Originally Posted by
philip937
Maximum Number of Price Ranges ??
Yes you can, but on the front end the box is showing the ranges in prices excluding tax. So you get price ranges that make no sense.
Re: Dynamic Filter [Support Thread]
Hi ,
I've just noticed after introducing manufacturers the following error for dynamic filter:
[05-Apr-2013 20:37:49 UTC] PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '), 'Y', 'N') as flag FROM manufacturers WHERE manufacturers_id IN (1,2) ORDER BY' at line 1 :: SELECT manufacturers_id, manufacturers_name, IF(manufacturers_id IN(), 'Y', 'N') as flag FROM manufacturers WHERE manufacturers_id IN (1,2) ORDER BY manufacturers_name in C:\xampp\htdocs\zencart\includes\classes\db\mysql\query_factory.php on line 120
Anyone knows how to fix it?
The code is here:
$manufacturers = $db->Execute("SELECT manufacturers_id, manufacturers_name, IF(manufacturers_id IN(" . implode(',', $filteredManufacturers) . "), 'Y', 'N') as flag" .
" FROM " . TABLE_MANUFACTURERS .
" WHERE manufacturers_id IN (" . implode(',', $unfilteredManufacturers) . ")" .
" ORDER BY manufacturers_name");
Re: Dynamic Filter [Support Thread]
My appologizes for my maybe incorrect English, i hope you will understand me.
I have a problem with the dynamic filter. As i understand, you made this filter.
The search by price option, are prices excluding VAT/TAX.
So with a search from 10 till 20, products above 20 (we have 21% tax). So a product with a price of 24 will be shown in the list 10 till 20.
We have been scripting a while now, but can't figure out how we can get to filter for prices including tax.
Is there a way to solve this problem?
Re: Dynamic Filter [Support Thread]
Does anyone know of its possible to get Dynamic filter to take into account sale and special prices when filtering by price? It seems to only filter to the products base price currently??
Thanks