It's interesting, I just replaced the "includes/functions/functions_general.php" from the mod with my backed up file and it started working again.
And I know there are differences between the two.
Printable View
It's interesting, I just replaced the "includes/functions/functions_general.php" from the mod with my backed up file and it started working again.
And I know there are differences between the two.
Ya, but now you may have problems with users creating accounts or resetting passwords etc.
You replied to my sorting manufactures post. Is this what you are having issues with? I only ask because I intended to post this as a new thread but it somehow ended up being part of this thread. Apologies if not and for any confusion.
If it is regarding sorting manufacturers please post your code and ill take a look. I'm not site why that would cause any issues in those files you mentioned.
My 1.5.1 didn't merge very well. Try using the 1.5.1 original file as a template and use the properly merged code which seems to work provided by DrByte here:
http://www.zen-cart.com/showthread.p...44#post1188244
Hi Phil - I was replying to Dynamic Filter [Support Thread] and not to Sorting Manufacturers on Dynamic Filter Sidebox . Sorry I didn't realize the title could be revised.
I am trying to install "Dynamic Filter v1.0" in a perfectly working Zen 1.5.1. I am having a terrible time trying to figure out what I am doing wrong!
Following is the error I am getting, plus a nice white page on a previously working test site.
I had installed Products Listing Sorter v1.1 and I thought that was conflicting with Dynamic Filter v1.0. So I removed it and I am still getting the above error.PHP Code:
[23-Feb-2013 13:46:13] PHP Fatal error: Cannot redeclare zen_create_random_value() (previously declared in
/home/content/***/html/cart/includes/functions/functions_general.php:626) in
/home/content/***/html/cart/includes/functions/password_funcs.php on line 86
I have followed exactly as per the instructions.
DrByte replied saying that I have to merge the files in /includes/functions/functions_general.php
As I am looking at the /includes/functions/functions_general.php file from Dynamic Filter v1.0 mod and comparing it to the original file of my working site, there is a vast amount code changes. And I don't think it's just a matter of doing a merge with some line of code.
There is a lot of line of code otherwise, I would have copied it here.
And I can't figure out where to start looking for other errors, if any?
I am stuck. :frusty:
What files did dynamic filter override on your install?
If I remember correctly on mine te main two were the functions general and the default filter (I think)
Both I think were out of date from the 1.5.1 files ment they needed merging instead of simply replacing.
Did you try using the clean 1.5.1 functions general file with DrBytes updated and merged function which affects dynamic filter in the post with link I made above?
Failing this its got to be either a mod somewhere conflicting or you haven't merged a file correctly somewhere.
Might be worth fully removing dynamic filter and starting over just to double check?
I can confirm that I have it working fine on 1.5.1 the only change I had to make was the functions general code in that post (but this was just to rectify warnings not because it wasn't working) which is why I think you have something wrong going on
I just noticed that even thought in the install section of the mod says
Attachment 11990Quote:
Modified Core Files
A few core Zen Cart files must be modified to work with the Dynamic Filter module.
If any of the core files this distribution uses have already been modified (because of another third party module being installed for example) then the changes for the respective files should be applied manually by copying across the appropriate sections of code required for the Dynamic Filter module. These sections are clearly marked (with “// bof dynamic filter x of x” and “// eof dynamic filter x of x” comments) within the sample files provided in this distribution and should be easy enough to copy across, especially if a “diff” software package (such as DiffMerge or WinMerge) is used.
The modified files can be found within the 'core file overrides' folder in the distribution as follows.
In the supplied mod file /includes/functions/functions_general.php there are other line with code changes. That are not commented with “// bof dynamic filter x of x” and “// eof dynamic filter x of x” comments. So I would not know what to merge. :yuck:
The commented bit is the only bit that needs merging. Any other differences are because the file is an old version. So hence you need to use your fresh 1.5.1 copy of te file and just update the function detailed In The post linked in where DrByte amended the function that was commented as described above.
If you still get problems it's because you have other mods that have modified the functions general file
Overrides are:
The mod has the following overrides, which I have added.
It also askes you to add a template override includes/index_filters/YOUR_TEMPLATE/default_filter.phpQuote:
includes/classes/split_page_results.php
includes/functions/functions_general.php
includes/modules/pages/advanced_search_result/header_php.php
includes/modules/pages/featured_products/header_php.php
includes/modules/pages/products_all/header_php.php
includes/modules/pages/products_new/header_php.php
includes/modules/pages/specials/header_php.php
includes/modules/pages/specials/main_template_vars.php
The only thing I have not done is to addto includes/init_includes/init_canonical.php file, Since I am getting a white page, am not even there yet.PHP Code:
[B]$excludeParams[] = DYNAMIC_FILTER_PREFIX . 'Colour';[/B]
Ok so first things first.
Do any of the files that have be overridden been modified by any of your other mods?
Secondly, starting to come back to me now. Pretty sure almost all if not all of the header files were out of date? Check the file version compared to the dynamic filter ones, I think I had to merge them.
Don't worry about cannonical, that doesn't do anything at this stage. All it will do is ensure that your canonical links in the source are correct when the filters are applied.
So you use the 1.5.1 file and change this function re written by DrByte
http://www.zen-cart.com/showthread.p...44#post1188244
That should be the only function in the file that is changed for dynamic filter and that version DrByte rewrote works fine for dynamic filter
OK then in:
(1) Code from the mod - Creating the error and the white page.
PHP Code:
function zen_get_all_get_params($exclude_array = '', $search_engine_safe = true) {
if (!is_array($exclude_array)) $exclude_array = array();
$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
}
}
}
}
while (strstr($get_url, '&&')) $get_url = str_replace('&&', '&', $get_url);
while (strstr($get_url, '&&')) $get_url = str_replace('&&', '&', $get_url);
return $get_url;
}
(2)DrBytes revision:
(3)Code from my backup working site before Dynamic FilterPHP Code:
function zen_get_all_get_params($exclude_array = 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 (!in_array($key, $exclude_array)) {
if (!is_array($value)) {
if (is_string($value) && strlen($value) > 0) {
$get_url .= zen_sanitize_string($key) . '=' . rawurlencode(stripslashes($value)) . '&';
}
} else {
foreach(array_filter($value) as $arr){
$get_url .= zen_sanitize_string($key) . '[]=' . rawurlencode(stripslashes($arr)) . '&';
}
}
}
}
}
while (strstr($get_url, '&&')) $get_url = str_replace('&&', '&', $get_url);
while (strstr($get_url, '&&')) $get_url = str_replace('&&', '&', $get_url);
return $get_url;
}
I just have to replace (3) with (2)?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)) . '&';
}
}
}
while (strstr($get_url, '&&')) $get_url = str_replace('&&', '&', $get_url);
while (strstr($get_url, '&&')) $get_url = str_replace('&&', '&', $get_url);
return $get_url;
}
Correct replace with (2) make sure you are doing this in a clean v1.5.1 functions general file
however I'm pretty sure that is not what is causing your error as I did not face the same thing. All this code change did was stopped some error log warnings.
I suspect that the problem is with other files that haven't merged properly.
You need to check the override files vs the version revisions of the 1.5.1 files they override. If they are older then they need to be merged. Will be going to bed very soon so won't be able to reply for a while. Just take it step by step one file at a time. The key is to ensure you are using the same files as version 1.5.1 uses and merge the changes dynamic filter makes.
On the plus side, I didn't find it hard to merge any of them apart from the functions general one to make it all good which DrByte kindly stepped in a did for us.
Phil You are the best. That did it.
It now works. No more white page. It seems to be functioning properly also. with no other revisions. I will let you know if I see other problems.
now I have to add the following to /includes/classes/shopping_cart.php line 1904-1906:
as DrByte recommends. Doctor knows best.PHP Code:
// zen_redirect(zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action', 'notify', 'main_page'))));
// zen_redirect(zen_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, zen_get_all_get_params(array('action', 'notify', 'main_page'))));
zen_redirect(zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action', 'notify', 'main_page'))));
@DrByte, this revision should be it. Correct? And I should not have the following issue?
Thank you DrByte.
Glad to hear it. Yes I will be adding that code also when I get around to it. The Dr knows best as you say. Glad you got it sorted. Still worth treble checking that all your files are up to date.
Take care :-)
Correct.
I do not see the top category, but I see it filtered by Brand and Price (This top category does not have any sub-categories.)I do not see the top category, or any other filter in (This has sub-categories.)PHP Code:
index.php?main_page=index&cPath=1
.PHP Code:
index.php?main_page=index&cPath=2
Is there any way to see all the categories including the top category filterable in the side box, in the filter area? As you see it inPHP Code:
index.php?main_page=products_all
There are only various views when you see the category filter.
Products new and products all, probably search (though not got to testing that yet) and manufacturers pages.
There would be no point having filter by category when you are already viewing a category. Similarly on manufacters pages category filter shows but manufacters filter does not.
I think there is a point to it.
Let say you have a top category T-Shirts and you have 20 different brand of T-Shirts as sub-categories. With one of the T-shirt styles being V-Neck.
If you click on the top category T-Shirts, you will get 20 sub-category (brands) below the T-Shirts, under the categories window (in the left Cat window). As it is now.
So how would you filter, if you are looking for v-neck T-shirts among T-shirts->and 20 manufacturer?
Unless I am missing something or doing something wrong, top categories should be filterable also.
Again the filter is being utilized in
andPHP Code:
index.php?main_page=products_all
I don't understand why it can't be invoked in the top categories?PHP Code:
index.php?main_page=products_new
Unless I'm missing something it's sounds like you want it to filter the subcategories. It will only filter products.
Post a link to the site and ill take a look see if I can understand what you mean
I can't it is being tested on a local server.
Screenshot??
Here you go.
Attachment 12001
so you have both brand/manufacturer Arrow AND a category called Arrow??
so when you are at category level you see the sub cat arrow, and there are no products so therefore nothing to filter.
if what you are saying is that you want a filter to be able to filter categories that contain products with Vnecks then thats some serios additional coding and way above my abilty.
Hi All,
Ive just done an install of this mod on a clean version of Zencart but something isnt happening. Admin works fine but the fron end just shows a colpeltely blank screen. I have gone through and verified all of the files for the upload. where should i start?
Paul
Ive just gone through every file deleting to see if it affects the shop and the functions_general.php file is the reason. There is something in here that is causing to shop not to load properly.
Paul
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:
findreplace 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)) {
if (is_array($value) || in_array($key, $exclude_array)) continue;
if (strlen($value) > 0) {
$get_url .= zen_sanitize_string($key) . '=' . rawurlencode(stripslashes($value)) . '&';
}
}
}
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
}
}
}
}
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
I don't think you can.
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");
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?
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
Could you check, via phpMyAdmin, the products table and see if the Products with Sales/Specials are reflecting those amounts where the field:
products
products_price_sorter
are different ... as in the Sale/Special Price should be in the products_price_sorter ...
If the field:
products_price_sorter
does not contain the Sale/Special Price, do you import your products or manage them all manually in your Zen Cart Admin, as in you do not use Easy Populate or similar programs ...
From what I can tell, this is using the products_price_sorter field and the install I have on a play site seems to be working when Sale/Special are used ...
As long as the master_categories_id are setup right, the the fix for the Products Price Sorter in the Store Manager should update that field properly ...
The Products Price Sorter needs to update prices based on Products Price, Specials and SaleMaker and utilizes the master_categories_id in the process ...
The idea behind the products_price_sorter is it holds the base price or displayed price that is pre-calculated in the Zen Cart Admin to avoid the waste of time in the Catalog in making things like sorting by Price faster ...
The Update for the Products Price Sorter is to update this field and is especially needed in most cases of using an Importer or some other processes that might change prices and is not addressed by the default Zen Cart code ...
The master_categories_id is utilized for many things, including how SaleMaker is calculated, Discount Coupons, Products Price Sorter are managed etc.
A zen site running 1.5.1 is using a link checker to verify his site's link and on the following urls,
http: //Domain.com/index.php?main_page=products_all&disp_order=1&fltCategory[]=19
http: //Domain.com/index.php?main_page=products_all&disp_order=1&fltCategory[]=20
http: //Domain.com/index.php?main_page=products_new&disp_order=6&fltCategory[]=19
http: //Domain.com/index.php?main_page=products_new&disp_order=6&fltCategory[]=20
http: //Domain.com/index.php?main_page=products_new&disp_order=6&fltPrice[]=128.01--178&fltCategory[]=19
http: //Domain.com/index.php?main_page=products_new&disp_order=6&fltPrice[]=128.01--178&fltCategory[]=20
http: //Domain.com/index.php?main_page=products_new&disp_order=6&fltPrice[]=128.01--178&fltCategory[]=21
http: //Domain.com/index.php?main_page=products_new&disp_order=6&fltPrice[]=128.01--178&fltCategory[]=22
http: //Domain.com/index.php?main_page=products_new&disp_order=6&fltPrice[]=128.01--178&fltCategory[]=23
mostly happening on Category[]=19, 20, 21, 22, & 24
he is getting the following warning on lower left hand corner of the page. And the page shows the header info, left category box and the rest is white.
WARNING: An Error occurred, please refresh the page and try again.
Page displays the same when page is refreshed.
It seems to be coming from the dynamic filter. On this site when selecting New Products or All Products and clicking on any of categories 19, 20, 21, 22, 23 & 24.
Any one with any ideas?
Hey Phil when I use the filter this appears [].
I tried using %5B%5D and it goes back to [].
This is crazy.
I have just installed the module on a test system ( 1.5.0 ) and only Filter by price option is visible on left side . I would like to see also Filter by manufacturer , what should I check for ?
Bingo ! thank you so much
Have to insist with some issue . This module is compatible with v 1.5.1 ? After tried to install on last version I had this error : PHP Fatal error: Cannot redeclare zen_create_random_value() (previously declared in /var/www/vhosts/xxxxxx.xxx/httpdocs/xxxxxxxx/includes/functions/functions_general.php:626) in /var/www/vhosts/ xxxxxx.xxx /httpdocs/ xxxxxxxx /includes/functions/password_funcs.php on line 86
seems is using version 1.5.0 of functions_general.php . What should I change ?
I think there is an error on tpl_dynamic_filter.php file :
At the end of start *****attribute link/check boxes****** section you always have 2 more div's if no attributes founded . I had to create a conditional if :
if ($attributes->fields['products_options_name'] != '') {
$content .= '</div></div>';
}
Anyone else had this issue ?
I would like to filter only products_quantity > 0 . Can you help me please ?
I need to display filters on other section of my website . I think I need to extrapolate the code and put it when needs . Can you help me to find out how to extrapolate the filter sidebox part in order to paste the code in the section I need ?
thank you in advance .
Can anyone give me a hint ?
Solved , thx anyway .. was stupid easy ..
Thank you very much for posting this mod!
The mod works great on my product listings.
But I can't get it to work on my products_all, products_new and my featured products page. Could somebody please take a look for me?
My website address is: www.12bead.com
Greetings,
Paul
Thank you very much for posting this mod!
The mod works great on my product listings.
But I can't get it to work on my products_all, products_new and my featured products page. Could somebody please take a look for me?
My website address is: www.12bead.com
Greetings,
Paul
i can see the filter on the products all page
yes, but that's all it does so far.
It doesn't filter. It keeps displaying all the products when you try to filter the list.
I can see that the Dynamic filter is working, but it doesn't display the filtered list on:
- advanced_search
- products_all
- products_new
- featured products
On my category pages everything works fine. Does anybody have a solution for this problem? I really want to use this mod.
Paul
I'm having this problems too . Now I'm using it only on categories listing . This module has a lot of potential and filtering is fundamental for ecommerce business .
Does anybody know what file zencart uses for the all/featured product list?
I have turned Dynamic Filter on for the all products page. Perhaps somebody can have a quick look?
My Debug Log gives comes up with two problems:
- [11-May-2013 13:43:05] PHP Warning: extract() expects parameter 1 to be array, null given in /var/www/vhosts/12bead.com/httpdocs/includes/templates/12bead/common/html_header.php on line 50
[11-May-2013 13:43:05] PHP Warning: extract() expects parameter 1 to be array, null given in /var/www/vhosts/12bead.com/httpdocs/includes/templates/12bead/common/html_header.php on line 51
- [11-May-2013 13:43:19] PHP Fatal error: Call to undefined function buildArrayQueryParameter() in /var/www/vhosts/12bead.com/httpdocs/includes/classes/class.CeonURIMappingHandlerBase.php on line 656
I confirm when CEON mapping is disabled filters are working on all products page . We have a big problem here , this blocks me to release this module on production site . Zencart developers please give a hand here , cause this module is essential .
Totally agree, this module really should be default future.Quote:
this module is essential
I think this happening for pages that are not transformed by URI like http://www.mystore.com/mystore/index...e=products_all how can I tell to ceon module to convert this pages ( specials , products_new also ) ?
I confirm Is working on products_all page once link page converted by CEON module and my problem is solved for this page . I still have one question : By default this module convert products_all page or my installation of the module is wrong ?
I had the same. Only fix was to generate urls for all the listing pages, small price to pay for the functionality though hey
I still can't use Dynamic Filter for the all_products page (only categories works fine). Even when I turn off CEON URI mapping the filter won't work. What do I need to do to fix this. How can I alter the listing pages which might fix this for me?
Paul
Hi Phil,
Thanks for your response. I tried that yesterday, but it had no effect.
If CEON uri mapping is on it generates this link:
- http://www.12bead.com/?disp_order=3&fltPrijs[]=&fltMateriaal[]=&fltVorm[]=&fltType[]=&fltKleur[]=Blauw&fltMerk[]=&fltLengte[]=&fltBreedte[]=&fltDikte-Hoogte[]=&fltDiameter[]=&fltGatmaat[]=&fltAantalGaten[]=&fltLood-Nikkelvrij[]=&fltCategorie[]=&fltDiversen[]=
==> zencart goes to the home page
If CEON uri mapping is off it generates this link:
- http://www.12bead.com/index.php?main_page=products_all&disp_order=3&fltPrijs[]=&fltMateriaal[]=&fltVorm[]=&fltType[]=&fltKleur[]=Blauw&fltMerk[]=&fltLengte[]=&fltBreedte[]=&fltDikte-Hoogte[]=&fltDiameter[]=&fltGatmaat[]=&fltAantalGaten[]=&fltLood-Nikkelvrij[]=&fltCategorie[]=&fltDiversen[]=
==> it keeps displaying all the products and it doesn't filter the displayed list. The Dynamic filter sidebox seems to be filtering though.
paul
What have you set your products all page URL to?
I'm looking at your site and you don't have a URL generated for products_all
You will need to generate one. Either by using the CEON manager if you have it or you will have to manually set it in the database table
at the moment I don't have a uri mapping for the all_products page.
Yesterday I set it to: products_all (in the main_page field).
Hmm strange, not sure what else to suggest then
I have created a uri mapping for the products_all page. In dutch it is: alle_producten. In english it is: all_products.
I noticed that it displays my discounted products first although the list is sorted to price. It should display cheaper products first. Perhaps this causes my problems?
I just tried your filter. Works fine.
Looks like you have your default sort order set to price low to high but its not stopping the dynamic filter from working.
There is a setting in the admin somewhere where you can choose which you have as the default sort order
Hi Phil,
It really doesn't work fine.
It keeps showing all the 3310 products when you try to filter.
The address is now: http://www.12bead.com/alle_producten
I think you have some sort of code conflict caused by one off the many errors on your page. Maybe you should resolve them first.
You are loading two different versions of jquery (1.7.1 and 1.6.4)
You are loading the back to top script twice.
and you are loading multiple instances of google analytics, one is even after the </html> tag
Thank you for your input. I will try to fix those problems first.
I think I solved the tax problem
In includes/templates/YOUR_TEMPLATE/sideboxes/tpl_dynamic_filter.php find
and replace withPHP Code:
if ($end < $max) $text = $currency_symbol . round($start * $conversion_rate) . ' -- ' . $currency_symbol . round($end * $conversion_rate);
else $text = $currency_symbol . round($start * $conversion_rate) . ' and over';
It works for me, but some further testing is needed, before releasing an update for this modulePHP Code:
if ($end < $max)
{
$text = $currency_symbol . round((zen_add_tax($start, $products_tax)) * $conversion_rate) . ' -- ' . $currency_symbol . round((zen_add_tax($end, $products_tax)) * $conversion_rate);
}
else
{
$text = $currency_symbol . round((zen_add_tax($start, $products_tax)) * $conversion_rate) . ' and over';
}
If this works, the next step is to replace the hard-coded text for language defines, to make this mod multilingual
Hi philip,
I know you reported this a while back, but since i am updatig this module, I thought to give you an update on this.
The more/less button works fine when using jquery 1.4.4, but with higher versions it stops. Now we need to find out why :)
The other updates to be included for now are all the code bugfixes / improvements reported in this thread since version 1.1 was released.
Has anyone encountered similar errors with Dynamic Filter v1.0, when using ' for feet and " for inches and filtering for attribute size?
Example Attribute Size: with value 1'-4" x 2'-6"
Quote:
[25-May-2013 18:09:05 America/Denver] 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 '71"", GROUP_CONCAT(CONCAT(REPLACE(po.products_options_name, " ", ""), pov.produc' at line 7 :: SELECT DISTINCT p.products_id, p.products_type, p.master_categories_id,
p.manufacturers_id, p.products_price, p.products_tax_class_id, pd.products_description, IF(s.status = 1,
s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status =1, s.specials_new_products_price,
p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping,
p.products_qty_box_status FROM zen_products p LEFT JOIN zen_specials s on p.products_id = s.products_id LEFT JOIN zen_products_description pd on p.products_id = pd.products_id JOIN zen_products_to_categories p2c on p.products_id = p2c.products_id JOIN zen_products_attributes p2a on p.products_id = p2a.products_id JOIN zen_products_options po on p2a.options_id = po.products_options_id JOIN zen_products_options_values pov on p2a.options_values_id = pov.products_options_values_id WHERE p.products_status = 1
and pd.language_id = '1'
and p2c.categories_id = '17' GROUP BY p.products_id HAVING ( FIND_IN_SET("Size:51" x 71"", GROUP_CONCAT(CONCAT(REPLACE(po.products_options_name, " ", ""), pov.products_options_values_name)))) in /MyPath/includes/classes/db/mysql/query_factory.php on line 120
Resolved
If using jquery 1.6.0 or newer, change the contents of file includes\templates\YOUR_TEMPLATE\jscript\dynamic_filter\jquery.dynamic_filter.mi n.js
toCode:$("div.dynamicfilterContent").eq(0).ready(function(){$('ul.dFilterExpand').each(function(){if($(this).attr("scrollHeight")>130)$(this).height(130).siblings('a.dFilterToggle').show();});$("a.dFilterToggle").click(function(){if($(this).siblings("ul.dFilterExpand").height()==130){$('.dFilterToggleImg',$(this)).attr('src',$('.dFilterToggleImg').attr('src').replace('_more','_less')).attr('alt','Less').attr('title','Less');$(this).html($(this).html().replace("More","Less"));$(this).siblings("ul.dFilterExpand").animate({height:$(this).siblings("ul.dFilterExpand").attr("scrollHeight")},"slow");}else{$('.dFilterToggleImg',$(this)).attr('src',$('.dFilterToggleImg').attr('src').replace('_less','_more')).attr('alt','More').attr('title','More');$(this).html($(this).html().replace("Less","More"));$(this).siblings("ul.dFilterExpand").animate({height:130},"slow");}
return false;});});
.attr("scrollHeight") becomes .prop("scrollHeight") (2x)Code:$("div.dynamicfilterContent").eq(0).ready(function(){$('ul.dFilterExpand').each(function(){if($(this).prop("scrollHeight")>130)$(this).height(130).siblings('a.dFilterToggle').show();});$("a.dFilterToggle").click(function(){if($(this).siblings("ul.dFilterExpand").height()==130){$('.dFilterToggleImg',$(this)).attr('src',$('.dFilterToggleImg').attr('src').replace('_more','_less')).attr('alt','Less').attr('title','Less');$(this).html($(this).html().replace("More","Less"));$(this).siblings("ul.dFilterExpand").animate({height:$(this).siblings("ul.dFilterExpand").prop("scrollHeight")},"slow");}else{$('.dFilterToggleImg',$(this)).attr('src',$('.dFilterToggleImg').attr('src').replace('_less','_more')).attr('alt','More').attr('title','More');$(this).html($(this).html().replace("Less","More"));$(this).siblings("ul.dFilterExpand").animate({height:130},"slow");}
return false;});});
Basically what happens is that the single and double are entered in to the query, and thus causing errors. We need to figure a way to tell the script to add an escape to certain characters before adding them to the query.
It shouldn't be that difficult, but my skills are still limited, and am learning on the way :)
Same here.
I tried escaping the " and or '. No luck.
The only thing that does not produce an error, is the following format:
But try to tell a shop owner to look at the following and do your additions, deletions, edits and audits and etc.Quote:
1& #39;-2& #34; x 1& #39;-2& #34;
How is that for head spin?Quote:
5&# 39;-7& #34; x 3& #39;-11& #34;
1& #39;-2& #34; x 1& #39;-2& #34;
12& #39;-4& #34; x 6& #39;-6& #34;
1&# 39;-2& #34; x 1& #39;-2& #34;
2&# 39;-9& #34; x 5& #39;-3& #34;
.
.
.
I am trying to figure out a way also.
Thanks.
ps. Spaces between & and # are left out, so it displays here.