I am working on those filters,they should be back later this evening or tomorrow :cool:.
Printable View
I attempted to install this mod and hit a snag once I tried to run the SQL install.
Upon inspecting it with my weak programming skills I have to ask, is the SQL install still correct?
For example all the lines in the INSERT INTO configuration VALUES section appear...off (incorrect NULL at beginning, extra "", etc.)
The first two lines are:
INSERT INTO configuration VALUES
(NULL, 'Enable on Category Pages', 'FILTER_CATEGORY', 'Yes', 'Enable the filter on category pages?', @cid, '10', now(), now(), NULL, "zen_cfg_select_option(array('Yes', 'No'),"),
If I change it to the following it works:
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES
('Enable on Category Pages', 'FILTER_CATEGORY', 'Yes', 'Enable the filter on category pages?', @cid, '10', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),'),
Any chance you can point me in the right direction with this mod? https://www.zen-cart.com/downloads.php?do=file&id=2038
I installed it and it ordered my products perfectly but it breaks the dynamic filter with this error message in my logs.
PHP Fatal error: 1054:Unknown column 'in_name' in 'order clause' :: SELECT p.products_id, p.products_price_sorter, p.master_categories_id, p.manufacturers_id FROM products p LEFT JOIN manufacturers m USING(manufacturers_id) LEFT JOIN products_description pd on p.products_id = pd.products_id JOIN products_to_categories p2c on p.products_id = p2c.products_id JOIN categories c on p2c.categories_id = c.categories_id LEFT JOIN meta_tags_products_description mtpd ON mtpd.products_id= p2c.products_id AND mtpd.language_id = 1 WHERE (p.products_status = 1
AND pd.language_id = 1 AND ((pd.products_name LIKE '%mighty%'
OR p.products_model
LIKE '%mighty%'
OR m.manufacturers_name
LIKE '%mighty%' OR (mtpd.metatags_keywords
LIKE '%mighty%'
AND mtpd.metatags_keywords !='') OR (mtpd.metatags_description
LIKE '%mighty%'
AND mtpd.metatags_description !='') OR pd.products_description
LIKE '%mighty%') )) GROUP BY p.products_id order by in_name DESC, p.products_sort_order, pd.products_name ==> (as called by) /home/account/public_html/includes/templates/template1/sideboxes/tpl_dynamic_filter.php on line 63 <== in /home/account/public_html/includes/classes/db/mysql/query_factory.php on line 167
FWIW, the referenced plugin uses the advanced_search_result page's notifiers to set the various elements of the database query. It appears that the Dynamic Filter is removing the portion that's added to the select clause by the "Search: Prioritize Matching Names" processing.
hi. what can i do the dynamic filter add Categories breadcrumb?
now is Home > Categories
but i want Home > red Categories > Categories
the red is selected. pls help me .thanks.
zen cart 1.51
If someone could shed some light or offer some opinion on the following I would be grateful.
I use this mod, it works, I love it.
But something, somewhere, at some time, has occurred because,
I want to filter on newly added options but when I add an option name & values, add these to products, filtering on them returns no results.
Ie. working perfectly on old options, returns zero results on new ones.
I can only assume that having installed this mod on an older version of Zencart (1.3...), something to do with upgrading the cart itself (currently 1.54) is causing an issue because I can't imagine why else some would work and some wouldn't.
I have reinstalled the latest version of this mod as per the instructions in this thread. I also built a 1.55 site from scratch and added some products/filters to check it (or I) was installing correctly, they work fine.
So basically, what would/could prevent a newer option from filtering, something database related? I don't really know where to start looking.
I should add, that the number in brackets on the filter suggests that valid options are being counted, they just aren't returned when selected.
I really need to get this working. It's been bugging me for ages and preventing me from moving forward. And I would be happy to pay for a solution.
By what mechanism would this NOT work, (remove the spaces)
http://one stop glasses .co .uk/index.php?main_page=index&cPath=55&fltLens_Width[]=51
When this does,
http://one stop glasses .co. uk/index.php?main_page=index&cPath=55&fltColour[]=Black
I've spoken to to my web hosts/designers but they don't work with Zencart, there is a danger of the site being rebuilt with Opencart which would be a tragedy as the above is my only real problem.
There's nothing in it since 2016. Do I need to enable it?
Last entry as below,
[01-Mar-2016 09:46:57 ....public_html/includes/functions/functions_general.php on line 63
The first 40 or so, up to around
http://one stopglasses.co.uk/index.php?main_page=product_info&cPath=55&products_id=998
Apart from the fact that I set up Head Width filter a couple of years ago, no.
Hi
This is a brillant plugin - many thanks.
Summary: In my implementation the plugin only returns products with 32 or less products_attributes records.
Is this just me or has anyone else come across it? I've searched similar postings on this thread but not found any, so my apologies if this has already been covered and solved before.
Symptoms: go to a category and then 'narrow your results', say by selecting a colour. The result that comes back includes all matching products EXCEPT for those with more than 32 products_attributes.
Solving the problem: I deleted a few of the product_attributes from one of the products affected, taking the number down to 27, and it worked. That product now appears in the 'refine your results' page.
How I investigated: I spent three days, on and off, checking everything I could think of including the code, walking through the generated SQL, our data, and removing then re-installing the code, and couldn't find anything. Then I realised that this only happened to products with a large number of product_attributes.
Could it be a configuration issue? I couldn't see a maximum products_attributes variable but there may be one.
Any ideas welcome?
BTW (since some people may ask) we do need more than 32 variants for some of the products.
Zencart 1.5.5a
Database: MySQL 5.5.5-10.1.22-MariaDB
PHP Version: 5.6.30 (Zend: 2.6.0)
PHP Memory Limit: 128M
We have been running live on zencart since around 2010.
I have had a minor breakthrough. I think.
I noted that all my attributes up to option ID '35' filter fine, ones after that do not.
I have some missing options IDs where I have deleted old attributes, so in phpmyadmin I copied a row and gave it an id of '2', set up test products and attributes of that ID and it seems to search fine.
Whatever works eh?
Can this mod filter on read only attributes as well?
Brilliant. Seems it will be just what I need. Do I need any specific settings in the mod to work with read only attributes? And are the attributes set in the completely standard manner within ZC?
Which is the most up to date version?
The one from the downloads section, or this one on github.
https://github.com/Zen4All-nl/Zen-Ca...tribute_filter
The one found on this site is fully tested, and supported. The one found on github is my development mod, as far as I remember it is working, but have not done anything with it, for a (to) long time.
You can use Read-only attribute without any special settings. Sometimes it is handy to hide them on the shop side product info pages, using css.
I've installed the mod from zc downloads but it is only showing filter options for price and manufacturer even though I have at least 4 read only attributes set up on each product in the category. The attributes are displaying correctly on the product page.
I also noticed that if I set it to display dropdown-multi the centre column is displaying BELOW the left column. If I switch to checkbox-multi it correctly displays the center column next to the left column.
It seems that there are some issues surrounding Products With Attributes Stock module which is installed, but no variants are currently set on it.
If i deliberately break the SQL query in includes/templates/MY_TEMPLATE/sideboxes/tpl_dynamic_filter.php so that the (defined('TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK') ? becomes (defined('TABLE_PRODUCTS_WITH_ATTRIBUTES_STOC') ? ie, unable to be found, I see all my read only attributes.
Surely it doesn't rely on SBA being fully set up if installed before the dynamic filter can be used?
Is this a bug in the dynamic filter mod, or something else that is having negative impact on the filter?
Thanks for any help on this.
Hi, just a single website on a Cloud server, plenty of memory etc. I can adjust resources as much as I want if that would help. Which ones should I look at?
Server OS: Linux 3.10.0-229.14.1.el7.centos.onapp.x86_64
HTTP Server: Apache
PHP Version: 5.6.30 (Zend: 2.6.0)
PHP Memory Limit: 128M
Database: MySQL 5.5.5-10.1.22-MariaDB
Database Data Size: 95,400 kB
Database Index Size: 24,807 kB
Does anyone have a website where a single product has more than 32 product attributes? And if so, does that product get returned when you use the 'narrow your results' function?
I installed this on ZC 1.5.3 and getting followings are not working
Filter Results by: Manufacturer
Filter Results by: Item Starting with..... (A-Z)
on category page.
Hi,
is it posible to add ajax automatic filter after click to any attribute ?
+1 on wanting ajax on the dynamic filter for checkbox multi.
I'd happily pay someone to add this functionality. It is available on a woo commerce version
Is this compatible with zen Cart v1.5.5e? See this notice on the plugin page "NOTE: BE VERY CAREFUL TO ONLY USE A COMPATIBLE VERSION ON YOUR SITE" which worries me just a bit. Also if it is compatible with v1.5.5e, anyone running it with the Dual Pricing module without issue?
I'm using it on zc 1.5.5e. When setting up (Aug 2016) I found it not compatible with Stock by Attributes mod that was current version at the time. I only used the latter for a few products so I found it better for me to remove SbyA and have Dynamic Filters.
There was an issue I had with sorting by price on my live site that I didn't have on my test site. It was addressed in this post: https://www.zen-cart.com/showthread....en#post1260429 I confirmed that the correct mods were set in my test site but not in my server site. I didn't follow through with my host as it wasn't a priority on my to do list.
I'm using Responsive Sheffield Blue 2.0 template, and there were errors being logged from Dynamic Filters not playing nice with the template's (very old) Currencies mod. I stripped that mod out and went with the resident zc Currencies sidebox. Would have preferred to keep currencies in the header, but wasn't a deal breaker for me.
I found that every product needed to have at least one (read only) attribute - otherwise products without would muck up the entire site appearance (found this out while testing with just a few items; problem went away when I completed applying the filter attribs or 'turned off' products not yet updated.
Lastly, I had difficulty with the install sql. Maybe something peculiar to my database - something I mucked up maybe - I had to manually insert gID number that was created by the zen_configuration part into the zen_admin_pages part of the sql. Don't know what that was all about, but the fix worked.
Thank you soxophoneplayer for your detailed response. In this day and age I feel a dynamic product sorter is a must for a store, so I am really glad to see this addon. Will try this if my paid theme does not come with its own sorter.
I had Dynamic Filter installed for years, and when I switched to a new template it stop working, by this I mean, it's not responding to admin settings, for instance under my main categories, it's listing all the products, instead of filtering just a few, as it supposes to do
Of course this is just an excerpt as I don't want to show more than 11000 links here, as a few suffices ... as an example, but my point is why is this huge list in the source code, even when my settings are these? >>>HTML Code:<span>Shop</span>
</a>
<!--bof-optional categories tabs navigation display-->
<ul class="sub-menu">
<li><a class="category-top" href="https://www.theoutletseason.com/scentia/womens-perfumes-c-1/">Women's Perfumes</a>
<ul class="sub--sub-menu">
<li><a href="https://www.theoutletseason.com/scentia/je-reviens-by-worth-for-women-pure-perfume-12-oz-p-1.html">je reviens by Worth for Women Pure Perfume 1/2 oz</a></li>
<li><a href="https://www.theoutletseason.com/scentia/je-reviens-by-worth-for-women-eau-de-toilette-spray-1-oz-p-2.html">je reviens by Worth for Women Eau De Toilette Spray 1 oz</a></li>
<li><a href="https://www.theoutletseason.com/scentia/je-reviens-by-worth-for-women-eau-de-toilette-spray-25-oz-p-3.html">je reviens by Worth for Women Eau De Toilette Spray 2.5 oz</a></li>
<li><a href="https://www.theoutletseason.com/scentia/je-reviens-by-worth-for-women-pure-perfume-1-oz-p-4.html">je reviens by Worth for Women Pure Perfume 1 oz</a></li>
<li><a href="https://www.theoutletseason.com/scentia/je-reviens-by-worth-for-women-mini-edp-23-oz-p-5.html">je reviens by Worth for Women Mini EDP .23 oz</a></li>
<li><a href="https://www.theoutletseason.com/scentia/je-reviens-by-worth-for-women-eau-de-toilette-spray-33-oz-p-6.html">je reviens by Worth for Women Eau De Toilette Spray 3.3 oz</a></li>
<li><a href="https://www.theoutletseason.com/scentia/courtesan-by-worth-for-women-eau-de-parfum-spray-3-oz-p-8.html">Courtesan by Worth for Women Eau De Parfum Spray 3 oz</a></li>
<li><a href="https://www.theoutletseason.com/scentia/maja-by-myrurgia-for-women-talcum-powder-7-oz-p-10.html">Maja by Myrurgia for Women Talcum Powder 7 oz</a></li>
<li><a href="https://www.theoutletseason.com/scentia/maja-by-myrurgia-for-women-eau-de-toilette-spray-17-oz-p-11.html">Maja by Myrurgia for Women Eau De Toilette Spray 1.7 oz</a></li>
<li><a href="https://www.theoutletseason.com/scentia/maja-by-myrurgia-for-women-eau-de-toilette-spray-34-oz-p-12.html">Maja by Myrurgia for Women Eau De Toilette Spray 3.4 oz</a></li>
<li><a href="https://www.theoutletseason.com/scentia/promesa-by-myrurgia-for-women-eau-de-parfum-spray-34-oz-p-13.html">Promesa by Myrurgia for Women Eau De Parfum Spray 3.4 oz</a></li>
<li><a href="https://www.theoutletseason.com/scentia/maja-by-myrurgia-for-women-3-soap-cakes-49-oz-p-14.html">Maja by Myrurgia for Women 3 Soap Cakes 4.9 oz</a></li>
Attachment 17294
To my understanding the limit should be 15 links, and not all 11,000+ as it's the case now ...
Hi. please, help me. I do not want to display all attributes on my site for filtering. how can i disabled text attributes?
Thank you. Can I disable size attribute in dynamic filter only for one category of products?
If I understand your question correctly - in your admin panel: catalog: Attributes Controller if you open/display that category and delete the size attribute from each of the products in that category they wouldn't exist for the Dynamic Filter to pick up. If there are many products in that category, I'm not sure if you could do mass changes via EZPopulate or similar - I've not tried that.
I had trouble getting the price to display for zen cart 1.5.4 using dynamic filters.
I found a sql file that seems to work. So if anyone is have issue showing the price use this script below. Hopefully this helps other zen cart users
Code:SELECT @cid:=configuration_group_id
FROM configuration_group
WHERE configuration_group_title= 'Dynamic Filter';
DELETE FROM configuration WHERE configuration_group_id = @cid;
DELETE FROM configuration_group WHERE configuration_group_id = @cid;
INSERT INTO configuration_group VALUES (NULL, 'Dynamic Filter', 'Dynamic Filter Settings', '1', '1');
SET @cid=last_insert_id();
UPDATE configuration_group SET sort_order = @cid WHERE configuration_group_id = @cid;
INSERT INTO configuration (configuration_id, configuration_title, configuration_key , configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function)
VALUES (NULL, 'Enable on Category Pages', 'FILTER_CATEGORY', 'Yes', 'Enable the filter on category pages?', @cid, '10', now(), now(), NULL, "zen_cfg_select_option(array('Yes', 'No'),"),
(NULL, 'Enable on All Products Page', 'FILTER_ALL', 'Yes', 'Enable the filter on all products page?', @cid, '20', now(), now(), NULL, "zen_cfg_select_option(array('Yes', 'No'),"),
(NULL, 'Enable on New Products Page', 'FILTER_NEW', 'Yes', 'Enable the filter on new products page?', @cid, '30', now(), now(), NULL, "zen_cfg_select_option(array('Yes', 'No'),"),
(NULL, 'Enable on Featured Products Page', 'FILTER_FEATURED', 'Yes', 'Enable the filter on featured products page?', @cid, '40', now(), now(), NULL, "zen_cfg_select_option(array('Yes', 'No'),"),
(NULL, 'Enable on Specials Page', 'FILTER_SPECIALS', 'Yes', 'Enable the filter on specials page?', @cid, '50', now(), now(), NULL, "zen_cfg_select_option(array('Yes', 'No'),"),
(NULL, 'Enable on Search Page', 'FILTER_SEARCH', 'Yes', 'Enable the filter on advanced search page?', @cid, '60', now(), now(), NULL, "zen_cfg_select_option(array('Yes', 'No'),"),
(NULL, 'Filter Style', 'FILTER_STYLE', 'Link', 'How are the filters to be applied?<br /><br /><strong>Link</strong> - Each option is a link; Only one filter can be applied at a time.<br /><strong>Dropdown (Single)</strong> - Each option is part of a drop down list; Only one filter can be applied at a time.<br /><strong>Dropdown (Multi)</strong> - Each option is part of a drop down list; Multiple filters can be applied at a time.<br /><strong>Checkbox (Single)</strong> - Each option is a checkbox; Only one filter can be applied at a time.<br /><strong>Checkbox (Multi)</strong> - Each option is a checkbox; Multiple filters can be applied at a time.', @cid, '70', now(), now(), NULL, "zen_cfg_select_option(array('Link', 'Dropdown - Single', 'Dropdown - Multi', 'Checkbox - Single', 'Checkbox - Multi'),"),
(NULL, 'Disabled Options Method', 'FILTER_METHOD', 'Greyed', 'How are the unavailable filter options to be disabled?<br /><br /><strong>Greyed</strong> - Grey out the unavailable options.<br /><strong>Hidden</strong> - Hide the unavailable options.', @cid, '80', now(), now(), NULL, "zen_cfg_select_option(array('Greyed', 'Hidden'),"),
(NULL, 'Options Box Style', 'FILTER_OPTIONS_STYLE', 'Scroll', 'Which style of box should be used when the maximum number of options has been reached?<br /><br /><strong>Scroll</strong> - Scroll box.<br /><strong>Expand</strong> - Expanding box with More/Less link.<br /><br /><strong>Note: This option is only applicatble with Link or Checkbox filter styles.</strong>', @cid, '90', now(), now(), NULL, "zen_cfg_select_option(array('Scroll', 'Expand'),"),
(NULL, 'Maximum Number of Options', 'FILTER_MAX_OPTIONS', '9', 'What is the maximum number of options to be displayed before scroll bar/More link is visible?<br /><br /><strong>Note: This option is only applicatble with Link or Checkbox filter styles.</strong>', @cid, '100', now(), now(), NULL, NULL),
(NULL, 'Enable Price filter', 'SHOW_FILTER_BY_PRICE', 'Yes', 'Enable the price filter?', @cid, '105', now(), now(), NULL, "zen_cfg_select_option(array('Yes', 'No'),"),
(NULL, 'Maximum Number of Price Ranges', 'FILTER_MAX_RANGES', '5', 'What is the maximum number of price range groups?<br /><br /><strong>Note: This can be overridden by the Maximum Price Range parameter</strong>', @cid, '110', now(), now(), NULL, NULL),
(NULL, 'Minimum Price Range', 'FILTER_MIN_PRICE', '10', 'What is the minimum gap in the price ranges?<br />Set as zero to deactivate.', @cid, '120', now(), now(), NULL, NULL),
(NULL, 'Maximum Price Range', 'FILTER_MAX_PRICE', '800', 'What is the minimum gap in the price ranges?<br />Set as zero to deactivate.', @cid, '130', now(), now(), NULL, NULL),
(NULL, 'Include Options', 'FILTER_OPTIONS_INCLUDE', '', 'Enter the list of option IDs to be included in the filter, separated by commas (i.e. 1,2,3)<br />Only the option numbers listed here will appear in the filter.<br />Leave blank to deactivate.', @cid, '140', now(), now(), NULL, NULL),
(NULL, 'Exclude Options', 'FILTER_OPTIONS_EXCLUDE', '', 'Enter the list of option IDs to be excluded from the filter, separated by commas (i.e. 1,2,3)<br />The option numbers listed here will <strong>not</strong> appear in the filter.<br />Leave blank to deactivate.', @cid, '150', now(), now(), NULL, NULL),
(NULL, 'Google Event Tracking', 'FILTER_GOOGLE_TRACKING', 'No', 'Use Google Event Tracking?<br /><br /><strong>No</strong> - Do not use Google Event Tracking<br /><strong>ga.js</strong> - Use traditional ga.js Google Event Tracking method<br /><strong>Asynchronous</strong> - Use new asynchronous Google Event Tracking method<br /><br /><strong>Note: Requires Google Analytics Code</strong>', @cid, '160', now(), now(), NULL, "zen_cfg_select_option(array('No', 'ga.js', 'Asynchronous'),");
/*
zencart 1.5 mods
*/
DELETE FROM admin_pages WHERE page_key='configDynamicFilter';
INSERT INTO admin_pages (page_key,language_key,main_page,page_params,menu_key,display_on_menu,sort_order) VALUES ('configDynamicFilter','BOX_CONFIGURATION_DYNAMIC_FILTER','FILENAME_CONFIGURATION',CONCAT('gID=',@cid), 'configuration', 'Y', @cid);
Should this module work in ZC1.5.5? It doesn't seem to get along very well. The install query has incorrect numbers of columns. I got that worked out, but then there are quite a few error logs thrown and many broken pages. I really like the filter and would like to use it, but can't seem to get it all worked out.
If it's not supposed to work in 1.5.5, are there any plans to release a new version in the near future?
Thank You,
John
I'm using with zc 1.5.5e. I had to fiddle a bit with the sql install. The mod did not work for me with Stock by Attributes mod so I had to take that mod out. The attributes assigned and used with the Dynamic Filters mod must all be set to 'read only' (which is why it wouldn't play nice with SbyA).
Main problem with the sql install for me was that the db column didn't want to create properly. Here is sql modification I used. To get the gID to work I had to make up a number (I just made one up based on last number used).
Code:/*
zencart 1.5 mods modified by Doug to insert page parms and sort order using number generated in config_group. Otherwise doesn't work.
*/
DELETE FROM zen_admin_pages WHERE page_key='configDynamicFilter';
INSERT INTO zen_admin_pages (page_key,language_key,main_page,page_params,menu_key,display_on_menu,sort_order) VALUES ('configDynamicFilter','BOX_CONFIGURATION_DYNAMIC_FILTER','FILENAME_CONFIGURATION',CONCAT('gID=2825'), 'configuration', 'Y', 2825);
I just went ahead and built my own dynamic filter module again. no biggie. just a couple php files and a jquery file.
Thanks, John
I have the mod (good work by the way) working in 1.5.5e, i downloaded 1.5.5f and tried the mod but it does not display fine.
The theme i am using is the Responsive Classic Template, out of the box. Displays page ok before filter activates, when activated it looks like single boxes or columns going down the page. click home or go to other page then all works.
css is messed up, is anyone working on 1.5.5e/f (e works fine) f not so fine
can't seen to get to work with read only attributes, I've added the option ids in the settings - am I missing soemthing really obvious
Hi,
I am rebuilding my website with 1.5.5f. but am having display issues with the filter, i have a working 1.5.5e.
If understand you correctly do this..
what i did is go to catalog ->Option Name Manager
create names for items, I sell IT so i added #Cores and CPU Socket Type. leave as dropdown
then goto Catalog -> Option Values choose the named value and then add a Option Value.
now go to Catalog -> Attributes Controller. choose a Catagory from the pulldown, choose a product, click display, this adds it underneath.
then assign options by clicking one under "Adding new attributes", choose option from right window then click insert.
repeat for as many attributes that you want to create or assign to a product.
Thanks but I already have the attributes added to my products, however the attributes which are read only don't appear in the filter
That's what I thought which is why am confused, my dropdown attributes are showing but not my read only ones
'Somewhere' I read that the filters would work with only a single stock by attribute used, but I was unable to accomplish this - the filters would behave in very strange ways and cause template to go whacky and adding a product with attributes to the cart would add 2 products instead. I ended up removing SbyA altogether as I didn't have many products using it anyway. Another thing I found with the filters - EVERY product had to have at least one read-only attribute assigned of the product listing page would go whacky.
To deal with the SbyA products I have I simply created new products - ie one product large, one product medium, one product small etc instead of a single product with the size attributes. But as I mentioned, I only have a few of such products so it wasn't a big deal. It would be a lot of work if many products.
Hi there, right now I have the dynamic filter enabled to filter by price.
However, out of the 5 options, only the 1st option is available to activate.
The other 4 are disabled and greyed out.
Would appreciate it if someone could advise as to how I can enable all the filter options. Thanks!
If Zen Cart is set "main page - opens with category" it is possible to have the filter active?
I am currently using Zen cart Dynamic filters. I was experiencing errors in my server log "max_user_connections".
To solve this issue--see below . If anything should change i will update this post...
i changed
/includes/modules/pages/advanced_search_result/header_php.php
Code:// bof dynamic filter 2 of 4
$from_str = "FROM " . TABLE_PRODUCTS . " p" .
" LEFT JOIN " . TABLE_MANUFACTURERS . " m USING(manufacturers_id)" .
" LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.
products_id" .
" JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c on p.products_id = p2c.products_id" .
" JOIN " . TABLE_CATEGORIES . " c on p2c.categories_id = c.categories_id" .
" LEFT JOIN " . TABLE_META_TAGS_PRODUCTS_DESCRIPTION . " mtpd ON mtpd.products_id= p2c.products_id AND mtpd.language_id = :languagesID" .
($filter_attr == true ? " JOIN " . TABLE_PRODUCTS_ATTRIBUTES . " p2a on p.products_id = p2a.products_id" .
" JOIN " . TABLE_PRODUCTS_OPTIONS . " po on p2a.options_id = po.products_options_id" .
" JOIN " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov on p2a.options_values_id = pov.products_options_values_id" .
(defined('TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK') ? " JOIN " . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " p2as on p.products_id = p2as.products_id " : "") : '');
// eof dynamic filter 2 of 4
$from_str = $db->bindVars($from_str, ':languagesID', $_SESSION['languages_id'], 'integer');
if ((DISPLAY_PRICE_WITH_TAX == 'true') && ((isset($_GET['pfrom']) && zen_not_null($_GET['pfrom'])) || (isset($_GET['pto']) && zen_not_null($_GET['pto'])))) {
if (!$_SESSION['customer_country_id']) {
$_SESSION['customer_country_id'] = STORE_COUNTRY;
$_SESSION['customer_zone_id'] = STORE_ZONE;
}
$from_str .= " LEFT JOIN " . TABLE_TAX_RATES . " tr
ON p.products_tax_class_id = tr.tax_class_id
LEFT JOIN " . TABLE_ZONES_TO_GEO_ZONES . " gz
ON tr.tax_zone_id = gz.geo_zone_id
AND (gz.zone_country_id IS null OR gz.zone_country_id = 0 OR gz.zone_country_id = :zoneCountryID)
AND (gz.zone_id IS null OR gz.zone_id = 0 OR gz.zone_id = :zoneID)";
$from_str = $db->bindVars($from_str, ':zoneCountryID', $_SESSION['customer_country_id'], 'integer');
$from_str = $db->bindVars($from_str, ':zoneID', $_SESSION['customer_zone_id'], 'integer');
}
// Notifier Point
$zco_notifier->notify('NOTIFY_SEARCH_FROM_STRING');
// bof dynamic filter 3 of 4
$where_str = " WHERE (p.products_status = 1
AND pd.language_id = :languagesID
";
// bof dynamic filter 3 of 4
to change it to
Code:// bof dynamic filter 2 of 4
$from_str = "FROM " . TABLE_PRODUCTS . " p" .
" LEFT JOIN " . TABLE_MANUFACTURERS . " m USING(manufacturers_id)" .
" LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id
AND pd.language_id = :languagesID
" .
" JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c on p.products_id = p2c.products_id" .
" JOIN " . TABLE_CATEGORIES . " c on p2c.categories_id = c.categories_id" .
" LEFT JOIN " . TABLE_META_TAGS_PRODUCTS_DESCRIPTION . " mtpd ON mtpd.products_id= p2c.products_id AND mtpd.language_id = :languagesID" .
($filter_attr == true ? " JOIN " . TABLE_PRODUCTS_ATTRIBUTES . " p2a on p.products_id = p2a.products_id" .
" JOIN " . TABLE_PRODUCTS_OPTIONS . " po on p2a.options_id = po.products_options_id" .
" JOIN " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov on p2a.options_values_id = pov.products_options_values_id" .
(defined('TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK') ? " JOIN " . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " p2as on p.products_id = p2as.products_id " : "") : '');
// eof dynamic filter 2 of 4
$from_str = $db->bindVars($from_str, ':languagesID', $_SESSION['languages_id'], 'integer');
if ((DISPLAY_PRICE_WITH_TAX == 'true') && ((isset($_GET['pfrom']) && zen_not_null($_GET['pfrom'])) || (isset($_GET['pto']) && zen_not_null($_GET['pto'])))) {
if (!$_SESSION['customer_country_id']) {
$_SESSION['customer_country_id'] = STORE_COUNTRY;
$_SESSION['customer_zone_id'] = STORE_ZONE;
}
$from_str .= " LEFT JOIN " . TABLE_TAX_RATES . " tr
ON p.products_tax_class_id = tr.tax_class_id
LEFT JOIN " . TABLE_ZONES_TO_GEO_ZONES . " gz
ON tr.tax_zone_id = gz.geo_zone_id
AND (gz.zone_country_id IS null OR gz.zone_country_id = 0 OR gz.zone_country_id = :zoneCountryID)
AND (gz.zone_id IS null OR gz.zone_id = 0 OR gz.zone_id = :zoneID)";
$from_str = $db->bindVars($from_str, ':zoneCountryID', $_SESSION['customer_country_id'], 'integer');
$from_str = $db->bindVars($from_str, ':zoneID', $_SESSION['customer_zone_id'], 'integer');
}
// Notifier Point
$zco_notifier->notify('NOTIFY_SEARCH_FROM_STRING');
// bof dynamic filter 3 of 4
$where_str = " WHERE (p.products_status = 1 ";
// bof dynamic filter 3 of 4
This adds the text in red and modifies the text/row(s) in blue.
I just added a bunch of products to my site about 100,000 items. I noticed that the search feature and dynamic filter runs a little slow. Does anyone have any recommendations on how to speed it up.
Hello, Im getting error when instaling the install.SQL on zencart 1.5.6
Here is the LOG file
I know the version of Dynamic filter is for zencart 1.5.4 but didnt have problems with 1.5.5f, and the problem seems to be in the sql.HTML Code:/adm/sqlpatch.php?action=execute, IP address:
#1 trigger_error() called at [//includes/classes/db/mysql/query_factory.php:171]
#2 queryFactory->show_error() called at [/includes/classes/db/mysql/query_factory.php:143]
#3 queryFactory->set_error() called at [//includes/classes/db/mysql/query_factory.php:270]
#4 queryFactory->Execute() called at [//adm/sqlpatch.php:295]
#5 executeSql() called at [//adm/sqlpatch.php:739]
[23-Jan-2019 13:25:48 Europe/Sofia] PHP Fatal error: 1136:Column count doesn't match value count at row 1
Every help is appreciated.
Kind regards.
Something changed in the database between versions or the addition of another module that affects the same database table. The error is telling you there are mismatching column quantities between the SQL and the database table. For instance, it might be trying to insert values into 13 columns but the database only has 12. The best way to find the discrepancy is to look at the SQL statement in the dynamic filter module and compare that to the database table to see where you need to change it. It's generally a pretty easy fix, either adding a column to the table or an extra comma to the SQL statement.
Could you post the contents of that install.sql file?
Hello, yes:
Indeed there is missing col, i investigated a litle. My older version of zencart has 11 cols and the new 1.5.6 has 12 cols.HTML Code:SELECT @cid:=configuration_group_id
FROM configuration_group
WHERE configuration_group_title= 'Dynamic Filter';
DELETE FROM configuration WHERE configuration_group_id = @cid;
DELETE FROM configuration_group WHERE configuration_group_id = @cid;
INSERT INTO configuration_group VALUES (NULL, 'Dynamic Filter', 'Dynamic Filter Settings', '1', '1');
SET @cid=last_insert_id();
UPDATE configuration_group SET sort_order = @cid WHERE configuration_group_id = @cid;
INSERT INTO configuration VALUES
(NULL, 'Enable on Category Pages', 'FILTER_CATEGORY', 'Yes', 'Enable the filter on category pages?', @cid, '10', now(), now(), NULL, "zen_cfg_select_option(array('Yes', 'No'),NULL,"),
(NULL, 'Enable on All Products Page', 'FILTER_ALL', 'Yes', 'Enable the filter on all products page?', @cid, '20', now(), now(), NULL, "zen_cfg_select_option(array('Yes', 'No'),NULL,"),
(NULL, 'Enable on New Products Page', 'FILTER_NEW', 'Yes', 'Enable the filter on new products page?', @cid, '30', now(), now(), NULL, "zen_cfg_select_option(array('Yes', 'No'),NULL,"),
(NULL, 'Enable on Featured Products Page', 'FILTER_FEATURED', 'Yes', 'Enable the filter on featured products page?', @cid, '40', now(), now(), NULL, "zen_cfg_select_option(array('Yes', 'No'),NULL,"),
(NULL, 'Enable on Specials Page', 'FILTER_SPECIALS', 'Yes', 'Enable the filter on specials page?', @cid, '50', now(), now(), NULL, "zen_cfg_select_option(array('Yes', 'No'),NULL,"),
(NULL, 'Enable on Search Page', 'FILTER_SEARCH', 'Yes', 'Enable the filter on advanced search page?', @cid, '60', now(), now(), NULL, "zen_cfg_select_option(array('Yes', 'No'),NULL,"),
(NULL, 'Filter Style', 'FILTER_STYLE', 'Link', 'How are the filters to be applied?<br /><br /><strong>Link</strong> - Each option is a link; Only one filter can be applied at a time.<br /><strong>Dropdown (Single)</strong> - Each option is part of a drop down list; Only one filter can be applied at a time.<br /><strong>Dropdown (Multi)</strong> - Each option is part of a drop down list; Multiple filters can be applied at a time.<br /><strong>Checkbox (Single)</strong> - Each option is a checkbox; Only one filter can be applied at a time.<br /><strong>Checkbox (Multi)</strong> - Each option is a checkbox; Multiple filters can be applied at a time.', @cid, '70', now(), now(), NULL, "zen_cfg_select_option(array('Link', 'Dropdown - Single', 'Dropdown - Multi', 'Checkbox - Single', 'Checkbox - Multi'),NULL,"),
(NULL, 'Disabled Options Method', 'FILTER_METHOD', 'Greyed', 'How are the unavailable filter options to be disabled?<br /><br /><strong>Greyed</strong> - Grey out the unavailable options.<br /><strong>Hidden</strong> - Hide the unavailable options.', @cid, '80', now(), now(), NULL, "zen_cfg_select_option(array('Greyed', 'Hidden'),NULL,"),
(NULL, 'Options Box Style', 'FILTER_OPTIONS_STYLE', 'Scroll', 'Which style of box should be used when the maximum number of options has been reached?<br /><br /><strong>Scroll</strong> - Scroll box.<br /><strong>Expand</strong> - Expanding box with More/Less link.<br /><br /><strong>Note: This option is only applicatble with Link or Checkbox filter styles.</strong>', @cid, '90', now(), now(), NULL, "zen_cfg_select_option(array('Scroll', 'Expand'),NULL,"),
(NULL, 'Maximum Number of Options', 'FILTER_MAX_OPTIONS', '9', 'What is the maximum number of options to be displayed before scroll bar/More link is visible?<br /><br /><strong>Note: This option is only applicatble with Link or Checkbox filter styles.</strong>', @cid, '100', now(), now(), NULL, NULL,NULL,),
(NULL, 'Enable Price filter', 'SHOW_FILTER_BY_PRICE', 'Yes', 'Enable the price filter?', @cid, '105', now(), now(), NULL, "zen_cfg_select_option(array('Yes', 'No'),NULL,NULL,"),
(NULL, 'Maximum Number of Price Ranges', 'FILTER_MAX_RANGES', '5', 'What is the maximum number of price range groups?<br /><br /><strong>Note: This can be overridden by the Maximum Price Range parameter</strong>', @cid, '110', now(), now(), NULL, NULL,NULL,),
(NULL, 'Minimum Price Range', 'FILTER_MIN_PRICE', '10', 'What is the minimum gap in the price ranges?<br />Set as zero to deactivate.', @cid, '120', now(), now(), NULL, NULL,NULL,),
(NULL, 'Maximum Price Range', 'FILTER_MAX_PRICE', '25', 'What is the minimum gap in the price ranges?<br />Set as zero to deactivate.', @cid, '130', now(), now(), NULL, NULL,NULL,),
(NULL, 'Include Options', 'FILTER_OPTIONS_INCLUDE', '', 'Enter the list of option IDs to be included in the filter, separated by commas (i.e. 1,2,3)<br />Only the option numbers listed here will appear in the filter.<br />Leave blank to deactivate.', @cid, '140', now(), now(), NULL, NULL,NULL,),
(NULL, 'Exclude Options', 'FILTER_OPTIONS_EXCLUDE', '', 'Enter the list of option IDs to be excluded from the filter, separated by commas (i.e. 1,2,3)<br />The option numbers listed here will <strong>not</strong> appear in the filter.<br />Leave blank to deactivate.', @cid, '150', now(), now(), NULL, NULL,NULL,),
(NULL, 'Google Event Tracking', 'FILTER_GOOGLE_TRACKING', 'No', 'Use Google Event Tracking?<br /><br /><strong>No</strong> - Do not use Google Event Tracking<br /><strong>ga.js</strong> - Use traditional ga.js Google Event Tracking method<br /><strong>Asynchronous</strong> - Use new asynchronous Google Event Tracking method<br /><br /><strong>Note: Requires Google Analytics Code</strong>', @cid, '160', now(), now(), NULL, "zen_cfg_select_option(array('No', 'ga.js', 'Asynchronous'),NULL,");
I made an attemp with phpMyadmin and in some ways it was sucsesfull. I just added one more :
at the end and, after imported the whole table with phpMyadmin, now everything works but in a ugly way :)...HTML Code:NULL,
On front end Dynamic Filter sidebox is present but all the text is messed, I mean there is no logical conection betwen the text and Attributes or said other way the names of attributes are not displayed.
What should i do does anybody have any idea?
Thanks.
It sounds like perhaps your extra column wasn't entered in the right place to get the other columns to line up. You would need to look again to see where the missing column is instead of just adding one at the end. It is also possible it could be something else was installed incorrectly, can you show a screenshot of what is wrong?
Ok so where did I get with phpMyadmin:
Everything works exept for:
- Dynamic Filter link in admin>configuration is missing but accessible if you type the configuration_id=NUMBER so not a big deal.
- Filter by manufacturers is missing big deal
No errors and log files but still no manufacturer filter, any gueses?
I have found solution but not sure if its right to bypass it that way...
In Your Template/sideboxes/tpl_dynamic_filter.php
somewhere line 132
If you change it like this:HTML Code:// Only display if standard zen cart category/manufacturer dropdown is disabled
if (PRODUCT_LIST_FILTER == 0)
It works as it should work.HTML Code:// Only display if standard zen cart category/manufacturer dropdown is disabled
if (PRODUCT_LIST_FILTER == 1)
I had to install the last ZC 1.5.6.a and also have the same issue, only one attribute, one price range, one manufacturer and no filtered result when hit filter.
I have this error:
any ideas?HTML Code:[12-Feb-2019 12:30:17 Europe/Sofia] Request URI: /prahosmukachki, IP address: 94.190.193.162
#1 array_replace() called at [/home/magpybbe/test.magprom.net/includes/classes/db/mysql/query_factory.php:626]
#2 queryFactoryResult->MoveNext() called at [/home/magpybbe/test.magprom.net/includes/templates/responsive_classic/sideboxes/tpl_dynamic_filter.php:96]
#3 require(/home/magpybbe/test.magprom.net/includes/templates/responsive_classic/sideboxes/tpl_dynamic_filter.php) called at [/home/magpybbe/test.magprom.net/includes/modules/sideboxes/responsive_classic/dynamic_filter.php:12]
#4 require(/home/magpybbe/test.magprom.net/includes/modules/sideboxes/responsive_classic/dynamic_filter.php) called at [/home/magpybbe/test.magprom.net/includes/modules/column_right.php:29]
#5 require(/home/magpybbe/test.magprom.net/includes/modules/column_right.php) called at [/home/magpybbe/test.magprom.net/includes/templates/responsive_classic/common/tpl_main_page.php:183]
#6 require(/home/magpybbe/test.magprom.net/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/home/magpybbe/test.magprom.net/index.php:97]
--> PHP Warning: array_replace(): Argument #2 is not an array in /home/magpybbe/test.magprom.net/includes/classes/db/mysql/query_factory.php on line 626.
I had used Version 1.3 on zc1.5.6 and it worked but now i'm using it on 1.5.6.a and I have this issue.
I found the problem if somebody ever have this issue:
I didn't renamed /includes/index_filters/YOUR_TEMPLATE and this caused the error.
Kind regards.
hello, I found the filter in the theme that I bought, but I can not make it work, when I try to set the price range to be filtered, it does not work and in the log file I receive this error:
can someone help me?Code:[18-Feb-2019 11:49:37 Europe/Rome] PHP Warning: in_array() expects parameter 2 to be array, string given in /home/zenplan4.domain.com/includes/templates/alto/sideboxes/tpl_dynamic_filter.php on line 347
[18-Feb-2019 11:49:37 Europe/Rome] Request URI: /quarzo-c-2_3/?sort=3a&fltPrezzo=Array, IP address: 5.000.232.000
#1 array_filter() called at [/home/zenplan4.domain.com/includes/templates/alto/sideboxes/tpl_dynamic_filter.php:360]
#2 require(/home/zenplan4.domain.com/includes/templates/alto/sideboxes/tpl_dynamic_filter.php) called at [/home/zenplan4.domain.com/includes/modules/sideboxes/alto/dynamic_filter.php:12]
#3 require(/home/zenplan4.domain.com/includes/modules/sideboxes/alto/dynamic_filter.php) called at [/home/zenplan4.domain.com/includes/modules/column_left.php:28]
#4 require(/home/zenplan4.domain.com/includes/modules/column_left.php) called at [/home/zenplan4.domain.com/includes/templates/alto/common/tpl_main_page.php:254]
#5 require(/home/zenplan4.domain.com/includes/templates/alto/common/tpl_main_page.php) called at [/home/zenplan4.domain.com/index.php:97]
[18-Feb-2019 11:49:37 Europe/Rome] PHP Warning: array_filter() expects parameter 1 to be array, string given in /home/zenplan4.domain.com/includes/templates/alto/sideboxes/tpl_dynamic_filter.php on line 360
thank you
I'm having the same issue. Plugin was pre-installed in my template as well. I've contacted template author and will update here when I get a solution.
Hello all.
It was mentioned some years ago in this thread that the counts in brackets after the attributes remain constant rather than changing to reflect how many products remain as the options are narrowed down. I just wondered if there has been any movement on implementing this since then? It would really finish off what is an excellent piece of work.
I read a warning on this mod that you should be sure to use only the correct one for your Zen Cart version. I am using 1.5.1, which has no specific mod to download. Can anyone advise as to whether any of the mods would likely work with 1.5.1, or am I stuck having to upgrade (which makes me nervous)?
Sorry, I got past the issue above and implemented it successfully. Right in front of my face. It's a terrific addition!
But I am having one problem I can't seem to solve. When I click "filter", it works well from the categories and from search pages, but it does not work when I filter from the 'Specials', 'New Products', 'Featured Products', or 'All Products' pages/queries. When filtering from these pages, it simply reloads my main page (with no products at all), even though the URL in the browser shows the SQL call.
Here are some example resulting URLs where I try the same filter from the different locations, all of which should return some matching results. The Filter is for 'Format' = 'Single'
From the "Specials" page - does not work, just shows/returns the main index page. But it keeps the URL, so it's not a redirect.
https://noernbergstamps.com/?fltForm...ngle&x=25&y=12
From the "New Products" page - does not work, just shows the main index page
https://noernbergstamps.com/?disp_or...ingle&x=20&y=2
From a page of search results: - works as expected
https://www.noernbergstamps.com/inde...ingle&x=24&y=7
The first thing I notice is that URL on the Non-Working URLs are missing the index.php?main_page=(whatever). If I manually add it to the URL, then it works. Example is:
https://noernbergstamps.com/index.ph...ingle&x=24&y=7
So, where is the code at that I can get this resulting URL to be fixed permanently?
Possibly relevant things I am using:
ZenCart 1.5.1
Ceon URL Mapping 4.4.3
Dynamic Filtering 2
Hello,
I have a problem with price filter in the Dynamic Attribute Filter Plugin version 1.3 installed on Zen Cart v1.5.5e. After choosing a price range and click on the filter it opens a blank page with error 403(Forbidden). The other filters are working fine(category and attributes), just the price not working. I tried with a brand new installation of Zen Cart and 1.5.5e and still the price filter not working. I know that the plugin is for 1.5.4 but I read that for some people it works with higher versions. The problem doesn't generate any errors in the log folder.
If someone had the same issue and somehow resolved it, please give me the solution.
Here you can see/test the problem in brand new Zen Cart 1.5.5e installation: http://knigianglia.co.uk/CLEAN/index...e=products_new
There have been others with a similar problem, in this thread. This might help:
https://www.zen-cart.com/showthread....49#post1274249
Also, after a few page views of your site my IP address was banned - maybe related as the post I linked to mentioned the mod_security apache module, just guessing though.
Thanks, I will check them all for a solution.
Thanks, I will check that with the host company
Thank you the problem was exactly what you said mod_security enabled from the host company!
Can someone tell me, is it possible to add additional product field to the dynamic filter? If the answer is yes how this can be done? I managed to add the additional field in the search results but I have no idea how to do it with the filter?
hello, why do I see that the lowest price is 3 if my lowest item costs € 4.5?
I put an attached screen
https://i.postimg.cc/15Lb883P/Cattura.jpg
then I don't understand why it doesn't filter the price ranges well ... you see the image, it makes me see products that cost more than the range I selected.
https://i.postimg.cc/t44DCyhy/Cattura2.jpg
thanks
I have a problem with two modules working together. Ultimate seo urls and dynamic filter. When I set the filter, USU changes the final url from & fltPrice [] = 150.01 --- 200 to fltPrice = Array
I recently submitted v3.0.3 of Ultimate SEO URLs to the Zen Cart moderators for review; that version will correct the interoperation with Dynamic Filter.
Dynamic filter when activated and ceon uri mapping is activated i get a page not found on all filters.
this is what the url shows
https://jnsflooringandsupplies.com/d...Brand%5B%5D=28 ceon activated
https://jnsflooringandsupplies.com/d...tBrand%5B%5D=4 not activated
after placing these links here they work but not when on page
I have never used DAF in combination with CEON, but there is a commented line in "\includes\modules\sideboxes\YOUR_TEMPLATE\dynamic_filter.php".Maybe uncommenting this line will helpPHP Code:
//if (defined('CEON_URI_MAPPING_ENABLED') && CEON_URI_MAPPING_ENABLED == 1) $pageName = preg_replace('{^.*/([^\?]+)\??.*$}', '$1', $_SERVER['REQUEST_URI']);
nope didn't work, but replacing the tpl dynamic filter file with the 1 from downloads fixed it
Is anyone having issues with this not handling double quotes correctly? Like filter by size 10" ? Seems to work for 10mm. Also it doesn't seem to be showing the counts after the filter options correctly. I'm guessing I mashed up the core modified files incorrectly. :/
I fixed the count issue, still have double quote issue.
Hi there, I'm using dynamic filter mod by damian taylor installed on zen 1.56c . Some how the categories dont show up in the filter , prices, and other attributes are working. Could some one please help me out.
What could i be doing wrong.:mellow:
Another query, is it possible to have the dynamic filter box in the parent Category page,
Thanks
New Zenner
Does anyone know if there will be an updated version of this plugin for the new Zencart releases?