-
Dynamic Filter [Support Thread]
Hi there, I'm using dynamic filter mod by damian taylor - which is an awesome mod btw, you can see it at work on his website http://www.snowrepublic.co.uk/ (click on a category). It's a product filter for prices, manufacturer, attributes etc...
Anyway, the mod has been updated to work with 1.5 and I'm testing it on a brand new install with no other mods.
When I switch admin->configure->productlisting->display category/manufacturer filter off (which is the default zencart product filter and required to be turned off to make parts of damians mod to work) I get errors.
Here's one:
Quote:
[03-Mar-2012 13:36:42] 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 (0,) ORDER BY ' at line 1 :: SELECT manufacturers_id, manufacturers_name, IF(manufacturers_id IN(0,), 'Y', 'N') as flag FROM manufacturers WHERE manufacturers_id IN (0,) ORDER BY manufacturers_name in C:\xampp\htdocs\zencart\includes\classes\db\mysql\query_factory.php on line 101
Quote:
and another:
[02-Mar-2012 15:20:10] 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 'GROUP BY p.products_id' at line 1 :: select distinct p.products_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 LEFT JOIN tax_rates tr ON p.products_tax_class_id = tr.tax_class_id LEFT JOIN 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 = 222) AND (gz.zone_id IS null OR gz.zone_id = 0 OR gz.zone_id = 193) WHERE (p.products_status = 1 AND pd.language_id = 1 AND p2c.products_id = p.products_id AND p2c.products_id = pd.products_id AND (p2c.categories_id = 5)) AND p.products_date_added >= '20100101' and p.products_date_added <= '20120101' AND (p.products_price_sorter * IF(gz.geo_zone_id IS null, 1, 1 + (tr.tax_rate / 100)) >= 5) AND (p.products_price_sorter * IF(gz.geo_zone_id IS null, 1, 1 + (tr.tax_rate / 100)) <= 55) group by p.products_id, tr.tax_priority GROUP BY p.products_id in C:\xampp\htdocs\zencart\includes\classes\db\mysql\query_factory.php on line 101
So the problem is the SQL, but which is more correct - the mod's version (which presumably is uptodate coz it's been passed for 1.5) or my xampp version?
Also, I don't suppose if anyone knows if this is an easy fix? :)
thanks
-
Re: Dynamic Filter - getting sql errors
Really a great Mod. I installed in my 1.3.7.1 version and works perfect except with the prices ranges that show me the ranges without tax. For example if I select a price range between 100€ and 200€, the product list show me products until 236€, just 1,18% VAT.
Any ideas about how to the price range selector include the TAX?
Thank you.
-
Re: Dynamic Filter - getting sql errors
well even though you're kind of hijacking my thread which will probably mean that no-one will ever answer me :( I suppose no-one had answered yet so... ah well
the mod calculates the price ranges in the file includes/templates/your_template/sideboxes/tpl_dynamic_filter.php
around line 71 is where it creates the $priceArray[] which is the products_price_sorter field from the products table in the DB (exactly the same as product_price field - ie the price without tax) I guess you just need to alter that line so that the price which ends up in the array is including tax. Not sure if there's a zen way of doing this, there probably is :)
hth
ps don't suppose you know anything about SQL?
-
Re: Dynamic Filter - getting sql errors
In case it helps the sql gets made like this:
$categories = $db->Execute("SELECT categories_id, categories_name, IF(categories_id IN (" . implode(',', $filteredCategories) . "), 'Y', 'N') as flag" .
" FROM " . TABLE_CATEGORIES_DESCRIPTION .
" WHERE categories_id IN (" . implode(',', $unfilteredCategories) . ")" .
" ORDER BY categories_name");
$filteredCategories and $unfilteredCategories are just arrays with master_category_id's in them.
I'm currently reading through some sql text books but I haven't yet got my head around all these inner-queries and IN and IF and blaa blaa...
-
Re: Dynamic Filter - getting sql errors
How do you control which filters show up. I thought it had to do with the option values but not all of the option values appear, more specifically the filter for that attribute or option doesn't even appear on the page. I left the include option blank on the Dynamic filter configuration page.
-
Dynamic Filter 1.0 not working for Options
Hello,
I installed Damian Taylor's Dynamic Filter 1.0 and it seems to work fine expect I always get no results when filtering on my 1 defined option (4 choices, test products have 2 of 4 assigned).
I check and rechecked the options and they appear correct and hsow up on the prduct pages.
The Filter displays the correct options (the 2 of the 4 I assigned to products) but when I choose one or the other, no products are found.
Any thoughts?
Thanks!
David
-
Re: Dynamic Filter 1.0 not working for Options
Quote:
Originally Posted by
Daviator
Hello,
I installed Damian Taylor's Dynamic Filter 1.0 and it seems to work fine expect I always get no results when filtering on my 1 defined option (4 choices, test products have 2 of 4 assigned).
I check and rechecked the options and they appear correct and hsow up on the prduct pages.
The Filter displays the correct options (the 2 of the 4 I assigned to products) but when I choose one or the other, no products are found.
Any thoughts?
Thanks!
David
If the option name is made of 2 or more words (with space between), the results are: "There are no products to list in this category".
If I delete the space between the words in the option name, it filters correctly.
I've tried this in the Demo on clean 1.38a install.
Author confirmed this as a bug.
Does anyone know how to fix it?
-
Re: Dynamic Filter 1.0 not working for Options
Maybe a bug, but no space is how we MUST do it to do a vlookup with our attributes in excel in Easy Populate: our Colors if two or more words.
Example "Hot.Pink" here:
http://www.prommart.com/index.php?ma...oducts_id=6832
The color drop down shows "Hot.Pink", with the period between the words. Necessary when incorporating our colors in our DB in the Easy Populate excel vlookup function.
BTW, I just got the Dynamic Filter working on a fresh 1.5.0 install on demo site:
http://www.prom-mart.com/demo-1/big-linked-c-22.html
-
Dynamic Filter - Left Col Boxes Misaligned
Just installed Dynamic Filter (what we've been looking for) on 1.5.0 Demo/Test:
http://www.prom-mart.com/demo-1/big-linked-c-22.html
So excited it seems to work that I only just now noticed that it misalignes the regular category and other boxes, noticeable because of the border.
Not a deal breaker with this mod, but anyone know of a fix?
Thanks.
sph
www.prom-mart.com
Zencart Testing
-
Re: Dynamic Filter - Left Col Boxes Misaligned
I think it is because of a bug in the 'scroll' method that misses div end tags.
If you put it in to 'expand' mode it should render correctly.
I'll be uploading a fix in the next few days
-
Re: Dynamic Filter 1.0 not working for Options
I'll be uploading a new version in the next few days that addresses the no-space-allowed-in-option-names bug.
-
Re: Dynamic Filter - Left Col Boxes Misaligned
Expand setting didn't work.
However, I moved the filter to the bottom of my left column and it looks okay.
-
Re: Dynamic Filter - Left Col Boxes Misaligned
hmm, weird!
I've uploaded version 1.1 now so that'll hopefully be available to download in a day or two.....provided I did everything right! :blink:
Only 2 files changed in the new version as you'll see in the history section in the docs.
-
Re: Dynamic Filter - Left Col Boxes Misaligned
HI I HAVE INSTALLED DYNAMIC FILTER ON 1.39H , I AM GETTING THE FOLLOWING ERRORS ON CATEGORY PAGES 1054 Unknown column 'm.manufacturers_name' in 'field list'
in:
[SELECT DISTINCT m.manufacturers_name, p.products_image, pd.products_name, p.products_quantity, 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 WHERE p.products_status = 1 and pd.language_id = '1' and p2c.categories_id = '5' GROUP BY p.products_id order by pd.products_name] HERE IS THE LINK http://www.molwa.com/index.php?main_page=index&cPath=5
-
Re: Dynamic Filter - Left Col Boxes Misaligned
First off, can you check you have uploaded or merged file 'template file overrides\includes\index_filters\YOUR_TEMPLATE\default_filter.php' correctly?
Particularly look at the section between '// bof dynamic filter 2 of 2' and '// eof dynamic filter 2 of 2'
If you're sure everything is ok, in file 'template file overrides\includes\index_filters\YOUR_TEMPLATE\default_filter.php' find the following section of code (it's the last of 4 similar sections of code that assign a value to $listing_sql)....
Code:
// We show them all
$listing_sql = "SELECT DISTINCT " . $select_column_list . " 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";
$listing_sql .= " FROM " . TABLE_PRODUCTS . " p" .
" LEFT JOIN " . TABLE_SPECIALS . " s on p.products_id = s.products_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" .
($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 " : "") : '');
$listing_sql .= " WHERE p.products_status = 1
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and p2c.categories_id = '" . (int)$current_category_id . "'" .
$filter .
" GROUP BY p.products_id " .
$having .
$alpha_sort;
}
}
// eof dynamic filter 2 of 2
...and add a join to the manufacturers table as shown here...
Code:
// We show them all
$listing_sql = "SELECT DISTINCT " . $select_column_list . " 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";
$listing_sql .= " FROM " . TABLE_PRODUCTS . " p" .
" LEFT JOIN " . TABLE_SPECIALS . " s on p.products_id = s.products_id" .
" LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id" .
" LEFT JOIN " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id" .
" JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c on p.products_id = p2c.products_id" .
($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 " : "") : '');
$listing_sql .= " WHERE p.products_status = 1
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and p2c.categories_id = '" . (int)$current_category_id . "'" .
$filter .
" GROUP BY p.products_id " .
$having .
$alpha_sort;
}
}
// eof dynamic filter 2 of 2
...hopefully that'll fix your problem.
Can you let me know if it works for you?
-
Re: Dynamic Filter - Left Col Boxes Misaligned
Sir you are great...your solution worked me, i am very much thankful to you, i promise once my site is operational i shall start making my financial contribution to zen cart as well as to you sir.. I am indebted
-
Re: Dynamic Filter - Left Col Boxes Misaligned
I'm looking hard at Cherry Zen template for first time. My original dynamic filter download really messed it up.
I downloaded latest and it corrected most issues.
One strange thing. When go to subcategory in DVD Movies/Action I lose the bottom half of my right column:
http://www.prom-mart.com/demo-1/dvd-...on-c-3_10.html
Which I now see is pushed down to bottom left of site.
This seems to happen only in this category. Other categories/subcategories work okay:
http://www.prom-mart.com/demo-1/hard...rds-c-1_4.html
Thought it might be the Ultimate SEO URL for 1.5. Turned it off to test, still had problem.
I'd probably use this live with it dedicated primarily to the right column, and if I sort it to the bottom it will work okay.
I know that Cherry Zen template is a little sophisticated. But any thoughts why filter would mess-up on the one category/subcategory?
Thanks.
sph
-
Re: Dynamic Filter - Left Col Boxes Misaligned
I thought maybe it was skip one product categories; it wasn't. Now I see more categories/subcategories disrupting right column.
This might be a template specific issue. Works okay on the free Abagon Red that I have this filer on; but not so with Cherry Zen (unless I perhaps sort filter to bottom.) Cherry Zen does have some complicated/advanced(?) styling issues, so maybe it's something with the column and center box widths.
http://www.prom-mart.com/demo-1/
sph
www.prommart.com
-
Re: Dynamic Filter - Left Col Boxes Misaligned
Looking at the code generated on the page that doesn't work, it looks like there is a rogue ul end tag followed by 2 rogue div end tags.
This is what is being generated.....
Code:
<div class="dFilter">
<p class="dFilterHeading">By Price:</p>
<ul>
<li class="dFilterLink"><input type="checkbox" name="fltPrice[]" value="29.49--39" onclick=" this.form.submit();" />$29 -- $39</li>
<li class="dFilterLink"><input type="checkbox" name="fltPrice[]" value="39.01--49" onclick=" this.form.submit();" />$39 and over</li>
</ul>
</div>
</div>
</ul>
</div>
</div>
It looks like it is being generated by the attribute section in file 'new files\includes\templates\YOUR_TEMPLATE\sideboxes\tpl_dynamic_filter.php'.
Am I right in thinking you only get this layout problem on pages where there are no attributes shown? On the page that renders correctly, you have 'By Memory' and 'By Model' attributes as well as 'By Price'.
Have you used the 'Exclude Options' setting in the Dynamic Filter config to suppress attributes on the faulty page?
-
Re: Dynamic Filter - Left Col Boxes Misaligned
SPH, try this amendment to 'new files\includes\templates\YOUR_TEMPLATE\sideboxes\tpl_dynamic_filter.php' around line 250.
The lines you're adding are 'if ($attributes->RecordCount() > 0) {' and it's associated closing brace '}' near the end of the snippet.....
Code:
/********************************************start attribute link/check boxes***************************************************/
if(count($filteredProducts) > 0){
// Below line counts up all quantities of each item. e.g. if a glove is available in Small and Medium, quantity = 2.
//$attributes = $db->Execute("SELECT po.products_options_name, pov.products_options_values_name, count( p2as.quantity ) as quantity" .
$attributes = $db->Execute("SELECT count(DISTINCT p2a.products_id) as quantity, po.products_options_name, pov.products_options_values_name," .
" SUM(IF(p2a.products_id IN(" . implode(',', $filteredProducts) . "), 1, 0)) as flag" .
" FROM " . TABLE_PRODUCTS_ATTRIBUTES . " p2a ".
" 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 p2a.products_id = p2as.products_id AND p2as.stock_attributes LIKE CONCAT('%', p2a.products_attributes_id, '%')" : "") .
" WHERE p2a.products_id IN (" . implode(',', $unfilteredProducts) . ")" .
(FILTER_OPTIONS_INCLUDE != '' ? " AND p2a.options_id IN (" . FILTER_OPTIONS_INCLUDE . ")" : '') .
(FILTER_OPTIONS_EXCLUDE != '' ? " AND p2a.options_id NOT IN (" . FILTER_OPTIONS_EXCLUDE . ")" : '') .
(defined('TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK') ? " AND p2as.quantity > 0" : "") .
" GROUP BY po.products_options_name, pov.products_options_values_name" .
" ORDER BY po.products_options_name, pov.products_options_values_sort_order");
if ($attributes->RecordCount() > 0) {
$savName = '';
$savValue = '';
while (!$attributes->EOF) {
// output if option name changes!!!
if ($attributes->fields['products_options_name'] != $savName) {
$options_array = array();
if ($savName != "") {
$content .= '<hr width="90%" size="0" />';
$content .= '<div><div class="dFilter"><p class="dFilterHeading">' . DYNAMIC_FILTER_TEXT_PREFIX . htmlspecialchars(html_entity_decode($savName, ENT_QUOTES)) . DYNAMIC_FILTER_TEXT_SUFFIX . '</p>';
if (isset($_GET[$group]) && array_filter($_GET[$group])) $content .= '<div class="dFilterClear"><a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array($group)), 'NONSSL') . '">' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'clear_filter.png', DYNAMIC_FILTER_BUTTON_CLEAR_FILTER_ALT) . '</a></div>';
if (strtok(FILTER_STYLE, " ") == 'Dropdown') $content .= '<select name="' . $group . '[]" class="dFilterDrop"' . (FILTER_STYLE == 'Dropdown - Single' ? ' onchange="this.form.submit();"' : '') . '>' . '<option value=""' . (!isset($_GET[$group]) || !array_filter($_GET[$group]) ? ' selected="selected"' : '') . '>' . $dropdownDefault . '</option>';
else $content .= '<ul' . ($attrCount > FILTER_MAX_OPTIONS ? (FILTER_OPTIONS_STYLE == 'Scroll' ? ' class="dFilterScroll">' : ' class="dFilterExpand">') : '>');
$content .= $filters;
if (strtok(FILTER_STYLE, " ") == 'Dropdown') $content .= '</select>';
else $content .= '</ul>';
if (FILTER_OPTIONS_STYLE == 'Expand' && $attrCount > FILTER_MAX_OPTIONS) $content .= '<a class="dFilterToggle" href="#">More' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'arrow_more.gif', 'More', '', '', 'class="dFilterToggleImg"') . '</a>';
$content .= '</div></div>';
}
$group = DYNAMIC_FILTER_PREFIX . str_replace(' ', '', $attributes->fields['products_options_name']);
$resetParms[] = $group;
$parameters = zen_get_all_get_params();
$dropdownDefault = str_replace('%n', $attributes->fields['products_options_name'], DYNAMIC_FILTER_DROPDOWN_DEFAULT);
$filters = '';
$attrCount = 0;
}
if ($attributes->fields['products_options_values_name'] != $savValue) {
if (isset($_GET[$group]) && in_array($attributes->fields['products_options_values_name'],$_GET[$group])) $linkClass = 'selected';
else if (isset($_GET[$group]) && array_filter($_GET[$group]) && !in_array($attributes->fields['products_options_values_name'],$_GET[$group]) || $attributes->fields['flag'] == 0) $linkClass = 'disabled';
//else if ($attributes->fields['flag'] == 0) $linkClass = 'disabled';
else $linkClass = 'enabled';
$onClick = '';
if (FILTER_GOOGLE_TRACKING != 'No') $onClick .= $trackingStart . '\'filterAction\', \'' . ($linkClass != 'selected' ? 'addFilter' : 'removeFilter') . '\', \'' . $pageName . ';' . $attributes->fields['products_options_name'] . '=' . htmlspecialchars(html_entity_decode($attributes->fields['products_options_values_name'], ENT_QUOTES)) . '\'' . $trackingEnd;
if (FILTER_STYLE == 'Checkbox - Single') $onClick .= ' this.form.submit();';
if (FILTER_METHOD != 'Hidden' || $linkClass != 'disabled') {
$hrefLink = $group . '[]=' . rawurlencode($attributes->fields['products_options_values_name']);
switch(strtok(FILTER_STYLE, " ")) {
case 'Checkbox':
$filters .= '<li class="dFilterLink">' . zen_draw_checkbox_field($group . '[]', $attributes->fields['products_options_values_name'], (isset($_GET[$group]) && in_array($attributes->fields['products_options_values_name'],$_GET[$group]) ? true : false), ($linkClass == 'disabled' ? 'disabled="disabled"' : '') . ($onClick != '' && FILTER_STYLE == 'Checkbox - Single' ? ' onclick="' . $onClick . '"' : '')) . htmlspecialchars(html_entity_decode($attributes->fields['products_options_values_name'], ENT_QUOTES)) . '</li>';
break;
case 'Link':
$filters .= '<li class="dFilterLink"><a class="' . $linkClass . '"' . ($linkClass != 'disabled' ? ' rel="nofollow" href="' . zen_href_link($_GET['main_page'], ($linkClass != 'selected' ? $parameters . $hrefLink : str_replace(array($hrefLink,'&'.$hrefLink), array("",""), $parameters)), 'NONSSL') . '"' . ($onClick != '' ? ' onclick="' . $onClick . '"' : '') : '') . ' >' . htmlspecialchars(html_entity_decode($attributes->fields['products_options_values_name'], ENT_QUOTES)) . '</a></li>';
break;
case 'Dropdown':
$filters .= '<option value="' . htmlspecialchars(html_entity_decode($attributes->fields['products_options_values_name'], ENT_QUOTES)) . '"' . ($linkClass == 'selected' ? ' selected="selected"' : '') . ($linkClass == 'disabled' ? ' disabled="disabled"' : '') . ($onClick != '' && FILTER_STYLE == 'Dropdown - Single' ? ' onclick="' . $onClick . '"' : '') . ' >' . $attributes->fields['products_options_values_name'] . '</option>';
break;
}
++$attrCount;
}
}
$savValue = $attributes->fields['products_options_values_name'];
$savName = $attributes->fields['products_options_name'];
$attributes->MoveNext();
}
if ($savName != "") {
$content .= '<hr width="90%" size="0" />';
$content .= '<div><div class="dFilter"><p class="dFilterHeading">' . DYNAMIC_FILTER_TEXT_PREFIX . htmlspecialchars(html_entity_decode($savName, ENT_QUOTES)) . DYNAMIC_FILTER_TEXT_SUFFIX . '</p>';
if (isset($_GET[$group]) && array_filter($_GET[$group])) $content .= '<div class="dFilterClear"><a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array($group)), 'NONSSL') . '">' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'clear_filter.png', DYNAMIC_FILTER_BUTTON_CLEAR_FILTER_ALT) . '</a></div>';
if (strtok(FILTER_STYLE, " ") == 'Dropdown') $content .= '<select name="' . $group . '[]" class="dFilterDrop"' . (FILTER_STYLE == 'Dropdown - Single' ? ' onchange="this.form.submit();"' : '') . '>' . '<option value=""' . (!isset($_GET[$group]) || !array_filter($_GET[$group]) ? ' selected="selected"' : '') . '>' . $dropdownDefault . '</option>';
else $content .= '<ul' . ($attrCount > FILTER_MAX_OPTIONS ? (FILTER_OPTIONS_STYLE == 'Scroll' ? ' class="dFilterScroll">' : ' class="dFilterExpand">') : '>');
$content .= $filters;
}
if (strtok(FILTER_STYLE, " ") == 'Dropdown') $content .= '</select>';
else $content .= '</ul>';
if (FILTER_OPTIONS_STYLE == 'Expand' && $attrCount > FILTER_MAX_OPTIONS) $content .= '<a class="dFilterToggle" href="#">More' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'arrow_more.gif', 'More', '', '', 'class="dFilterToggleImg"') . '</a>';
$content .= '</div></div>';
}
}
/********************************************end attribute link/check boxes***************************************************/
Can you let me know if it works for you?
-
Re: Dynamic Filter - Left Col Boxes Misaligned
I couldn't figure out how to Exclude Options, but your patch seems to have worked!
http://www.prom-mart.com/demo-1/dvd-...on-c-3_10.html
Thanks!
sph
PS: Should this thread by your official support thread for this mod?
-
Re: Dynamic Filter - Left Col Boxes Misaligned
Damian,
Your Dynamic Filter is even better/more powerful than I originally thought. It can also sort by Features, so everything does not have to be a selectable attribute.
http://www.prom-mart.com/demo-1/sale...0-c-50_46.html
After six years, there is still alot I can learn about zencart.
-
Re: Dynamic Filter - Left Col Boxes Misaligned
This is a great mod. I do have 1 problem. I'm building a store that will sell big/tall mens clothing. I wanted a filter to mainly filter by size. So I added size as one of the attributes. I went to shirts and I wanted to filter out everything but a 7X size. It didn't filter. It still showed all the shirts in the catagory after I chose 7X. I sure hope I can get this working. Any help would be much appreciated. I am using version 1.5
Thanks
-
Re: Dynamic Filter 1.0 not working for Options
This is a great mod. I do have 1 problem. I'm building a store that will sell big/tall mens clothing. I wanted a filter to mainly filter by size. So I added size as one of the attributes. I went to shirts and I wanted to filter out everything but a 7X size. It didn't filter. It still showed all the shirts in the category after I chose 7X. I sure hope I can get this working. Any help would be much appreciated. I am using version 1.5
P.S. I did reply to another thread regarding Dynamic Filter 1.0, didn't know there was another thread about the filters not working. Sorry for the multiple posts.
-
Re: Dynamic Filter 1.0 not working for Options
Did you download the latest version that came just this past week?
-
Re: Dynamic Filter 1.0 not working for Options
Quote:
Originally Posted by
Daviator
Did you download the latest version that came just this past week?
Yes, I just downloaded it a couple days ago. It's the newest, latest version. Just can't get it to filter. I tried it on shits with the larger sizes (7X+) and it doesn't filter anything.
-
Re: Dynamic Filter 1.0 not working for Options
Can I get the URL to you site? (I'm a beginner too but a second set of eyes couldn't hurt)
-
Re: Dynamic Filter 1.0 not working for Options
Quote:
Originally Posted by
Daviator
Can I get the URL to you site? (I'm a beginner too but a second set of eyes couldn't hurt)
http://www.bigandtallwarehouse.com (I have to turn it on, it's set for off (maintenance) )
-
Re: Dynamic Filter 1.0 not working for Options
-
Re: Dynamic Filter - Left Col Boxes Misaligned
Quote:
Originally Posted by
damiantaylor
SPH, try this amendment to 'new files\includes\templates\YOUR_TEMPLATE\sideboxes\tpl_dynamic_filter.php' around line 250.
The lines you're adding are 'if ($attributes->RecordCount() > 0) {' and it's associated closing brace '}' near the end of the snippet.....
Code:
/********************************************start attribute link/check boxes***************************************************/
if(count($filteredProducts) > 0){
// Below line counts up all quantities of each item. e.g. if a glove is available in Small and Medium, quantity = 2.
//$attributes = $db->Execute("SELECT po.products_options_name, pov.products_options_values_name, count( p2as.quantity ) as quantity" .
$attributes = $db->Execute("SELECT count(DISTINCT p2a.products_id) as quantity, po.products_options_name, pov.products_options_values_name," .
" SUM(IF(p2a.products_id IN(" . implode(',', $filteredProducts) . "), 1, 0)) as flag" .
" FROM " . TABLE_PRODUCTS_ATTRIBUTES . " p2a ".
" 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 p2a.products_id = p2as.products_id AND p2as.stock_attributes LIKE CONCAT('%', p2a.products_attributes_id, '%')" : "") .
" WHERE p2a.products_id IN (" . implode(',', $unfilteredProducts) . ")" .
(FILTER_OPTIONS_INCLUDE != '' ? " AND p2a.options_id IN (" . FILTER_OPTIONS_INCLUDE . ")" : '') .
(FILTER_OPTIONS_EXCLUDE != '' ? " AND p2a.options_id NOT IN (" . FILTER_OPTIONS_EXCLUDE . ")" : '') .
(defined('TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK') ? " AND p2as.quantity > 0" : "") .
" GROUP BY po.products_options_name, pov.products_options_values_name" .
" ORDER BY po.products_options_name, pov.products_options_values_sort_order");
if ($attributes->RecordCount() > 0) {
$savName = '';
$savValue = '';
while (!$attributes->EOF) {
// output if option name changes!!!
if ($attributes->fields['products_options_name'] != $savName) {
$options_array = array();
if ($savName != "") {
$content .= '<hr width="90%" size="0" />';
$content .= '<div><div class="dFilter"><p class="dFilterHeading">' . DYNAMIC_FILTER_TEXT_PREFIX . htmlspecialchars(html_entity_decode($savName, ENT_QUOTES)) . DYNAMIC_FILTER_TEXT_SUFFIX . '</p>';
if (isset($_GET[$group]) && array_filter($_GET[$group])) $content .= '<div class="dFilterClear"><a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array($group)), 'NONSSL') . '">' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'clear_filter.png', DYNAMIC_FILTER_BUTTON_CLEAR_FILTER_ALT) . '</a></div>';
if (strtok(FILTER_STYLE, " ") == 'Dropdown') $content .= '<select name="' . $group . '[]" class="dFilterDrop"' . (FILTER_STYLE == 'Dropdown - Single' ? ' onchange="this.form.submit();"' : '') . '>' . '<option value=""' . (!isset($_GET[$group]) || !array_filter($_GET[$group]) ? ' selected="selected"' : '') . '>' . $dropdownDefault . '</option>';
else $content .= '<ul' . ($attrCount > FILTER_MAX_OPTIONS ? (FILTER_OPTIONS_STYLE == 'Scroll' ? ' class="dFilterScroll">' : ' class="dFilterExpand">') : '>');
$content .= $filters;
if (strtok(FILTER_STYLE, " ") == 'Dropdown') $content .= '</select>';
else $content .= '</ul>';
if (FILTER_OPTIONS_STYLE == 'Expand' && $attrCount > FILTER_MAX_OPTIONS) $content .= '<a class="dFilterToggle" href="#">More' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'arrow_more.gif', 'More', '', '', 'class="dFilterToggleImg"') . '</a>';
$content .= '</div></div>';
}
$group = DYNAMIC_FILTER_PREFIX . str_replace(' ', '', $attributes->fields['products_options_name']);
$resetParms[] = $group;
$parameters = zen_get_all_get_params();
$dropdownDefault = str_replace('%n', $attributes->fields['products_options_name'], DYNAMIC_FILTER_DROPDOWN_DEFAULT);
$filters = '';
$attrCount = 0;
}
if ($attributes->fields['products_options_values_name'] != $savValue) {
if (isset($_GET[$group]) && in_array($attributes->fields['products_options_values_name'],$_GET[$group])) $linkClass = 'selected';
else if (isset($_GET[$group]) && array_filter($_GET[$group]) && !in_array($attributes->fields['products_options_values_name'],$_GET[$group]) || $attributes->fields['flag'] == 0) $linkClass = 'disabled';
//else if ($attributes->fields['flag'] == 0) $linkClass = 'disabled';
else $linkClass = 'enabled';
$onClick = '';
if (FILTER_GOOGLE_TRACKING != 'No') $onClick .= $trackingStart . '\'filterAction\', \'' . ($linkClass != 'selected' ? 'addFilter' : 'removeFilter') . '\', \'' . $pageName . ';' . $attributes->fields['products_options_name'] . '=' . htmlspecialchars(html_entity_decode($attributes->fields['products_options_values_name'], ENT_QUOTES)) . '\'' . $trackingEnd;
if (FILTER_STYLE == 'Checkbox - Single') $onClick .= ' this.form.submit();';
if (FILTER_METHOD != 'Hidden' || $linkClass != 'disabled') {
$hrefLink = $group . '[]=' . rawurlencode($attributes->fields['products_options_values_name']);
switch(strtok(FILTER_STYLE, " ")) {
case 'Checkbox':
$filters .= '<li class="dFilterLink">' . zen_draw_checkbox_field($group . '[]', $attributes->fields['products_options_values_name'], (isset($_GET[$group]) && in_array($attributes->fields['products_options_values_name'],$_GET[$group]) ? true : false), ($linkClass == 'disabled' ? 'disabled="disabled"' : '') . ($onClick != '' && FILTER_STYLE == 'Checkbox - Single' ? ' onclick="' . $onClick . '"' : '')) . htmlspecialchars(html_entity_decode($attributes->fields['products_options_values_name'], ENT_QUOTES)) . '</li>';
break;
case 'Link':
$filters .= '<li class="dFilterLink"><a class="' . $linkClass . '"' . ($linkClass != 'disabled' ? ' rel="nofollow" href="' . zen_href_link($_GET['main_page'], ($linkClass != 'selected' ? $parameters . $hrefLink : str_replace(array($hrefLink,'&'.$hrefLink), array("",""), $parameters)), 'NONSSL') . '"' . ($onClick != '' ? ' onclick="' . $onClick . '"' : '') : '') . ' >' . htmlspecialchars(html_entity_decode($attributes->fields['products_options_values_name'], ENT_QUOTES)) . '</a></li>';
break;
case 'Dropdown':
$filters .= '<option value="' . htmlspecialchars(html_entity_decode($attributes->fields['products_options_values_name'], ENT_QUOTES)) . '"' . ($linkClass == 'selected' ? ' selected="selected"' : '') . ($linkClass == 'disabled' ? ' disabled="disabled"' : '') . ($onClick != '' && FILTER_STYLE == 'Dropdown - Single' ? ' onclick="' . $onClick . '"' : '') . ' >' . $attributes->fields['products_options_values_name'] . '</option>';
break;
}
++$attrCount;
}
}
$savValue = $attributes->fields['products_options_values_name'];
$savName = $attributes->fields['products_options_name'];
$attributes->MoveNext();
}
if ($savName != "") {
$content .= '<hr width="90%" size="0" />';
$content .= '<div><div class="dFilter"><p class="dFilterHeading">' . DYNAMIC_FILTER_TEXT_PREFIX . htmlspecialchars(html_entity_decode($savName, ENT_QUOTES)) . DYNAMIC_FILTER_TEXT_SUFFIX . '</p>';
if (isset($_GET[$group]) && array_filter($_GET[$group])) $content .= '<div class="dFilterClear"><a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array($group)), 'NONSSL') . '">' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'clear_filter.png', DYNAMIC_FILTER_BUTTON_CLEAR_FILTER_ALT) . '</a></div>';
if (strtok(FILTER_STYLE, " ") == 'Dropdown') $content .= '<select name="' . $group . '[]" class="dFilterDrop"' . (FILTER_STYLE == 'Dropdown - Single' ? ' onchange="this.form.submit();"' : '') . '>' . '<option value=""' . (!isset($_GET[$group]) || !array_filter($_GET[$group]) ? ' selected="selected"' : '') . '>' . $dropdownDefault . '</option>';
else $content .= '<ul' . ($attrCount > FILTER_MAX_OPTIONS ? (FILTER_OPTIONS_STYLE == 'Scroll' ? ' class="dFilterScroll">' : ' class="dFilterExpand">') : '>');
$content .= $filters;
}
if (strtok(FILTER_STYLE, " ") == 'Dropdown') $content .= '</select>';
else $content .= '</ul>';
if (FILTER_OPTIONS_STYLE == 'Expand' && $attrCount > FILTER_MAX_OPTIONS) $content .= '<a class="dFilterToggle" href="#">More' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'arrow_more.gif', 'More', '', '', 'class="dFilterToggleImg"') . '</a>';
$content .= '</div></div>';
}
}
/********************************************end attribute link/check boxes***************************************************/
Can you let me know if it works for you?
Im having the exact same problem the sideboxes after the dynamic filter box are mis aligned but when I add those lines to the end of the snippet the pages with dynamic pages sidebox fails to load,
what am I doing wrong?
-
Re: Dynamic Filter 1.0 not working for Options
After I installed this mod and it overridden the default_filter.php in my includes/index_filters/MYTEMPLATE/ folder with the new file, I get an SQL error when I select a catagory, like Jeans for instance. It says 'WARNING: An Error occurred, please refresh the page and try again.' I go to the cache to see the error and this is what it says:
PHP Fatal error: 1054:Unknown column 'm.manufacturers_name' in 'field list' :: SELECT DISTINCT p.products_image, pd.products_name, m.manufacturers_name, p.products_model, p.products_quantity, 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 products p LEFT JOIN specials s on p.products_id = s.products_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 products_attributes p2a on p.products_id = p2a.products_id JOIN products_options po on p2a.options_id = po.products_options_id JOIN 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("Sizes34x36", GROUP_CONCAT(CONCAT(REPLACE(po.products_options_name, " ", ""), pov.products_options_values_name)))) order by p.products_sort_order, pd.products_name in /homepages/29/d402403078/htdocs/BIGANDTALLWAREHOUSE/includes/classes/db/mysql/query_factory.php on line 101
If I go back to the original default_filter.php file, it works fine. Any thoughts? Any help would be great, I would really love to use this mod. Thanks for your help.
-
Re: Dynamic Filter 1.0 not working for Options
-
Re: Dynamic Filter 1.0 not working for Options
Thanks, that seemed to fix the SQL problem. It looks like it's working but I have a few problems. I tried it on my polo shirt category and I wanted to see if it would filter out all but the 10X sizes (I have 2 style shirts in that size) It filters, but it's only showing 1 of the 2 shirts. It says: 'Displaying 1 to 2 (of 2 products)' which I think it means 1 OF 2 (of 2 products) Not sure why it won't show the other style, which does have the same size available. I'll turn my store on so you can see. It also didn't display a jean I have available in a size 80x32. It just shows a blank screen with 'Displaying 1 to 2 (of 2 products)'. Thanks again for all your help, I really appreciate it:smile:
http://www.bigandtallwarehouse.com
-
Re: Dynamic Filter 1.0 not working for Options
jimproz, I don't know why that particular size is resulting in no products returned.
Can you add the following 'die' statement (around line 25) to file 'new files/includes/templates/YOUR_TEMPLATE/sideboxes/tpl_dynamic_filter.php'
Code:
die($listing_sql);
// draw filter form
$content = '';
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">';
$content .= zen_draw_form('product_filter_form','', 'get');
Once you've done that, go directly to this link http://www.bigandtallwarehouse.com/J...ort=0&fltSizes[]=80x32
That should just show you a SQL select statement on the screen.
Can you copy that statement and paste it here so I can take a look?
Once you've done that, remove the 'die' statement from the file otherwise you won't be able to see any products in your store.
-
Re: Dynamic Filter 1.0 not working for Options
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 products p LEFT JOIN specials s on p.products_id = s.products_id LEFT JOIN products_description pd on p.products_id = pd.products_id LEFT JOIN manufacturers m on p.manufacturers_id = m.manufacturers_id JOIN products_to_categories p2c on p.products_id = p2c.products_id WHERE p.products_status = 1 and pd.language_id = '1' and p2c.categories_id = '17' GROUP BY p.products_id
-
Re: Dynamic Filter 1.0 not working for Options
Sorry, it looks like clicking the link drops the '[]=80x32' from the url.
Can you try again but rather than clicking the link, copy and paste this in to your browser address bar
Code:
http://www.bigandtallwarehouse.com/Jeans?sort=0&fltSizes[]=80x32
thanks
-
Re: Dynamic Filter 1.0 not working for Options
Quote:
Originally Posted by
damiantaylor
Sorry, it looks like clicking the link drops the '[]=80x32' from the url.
Can you try again but rather than clicking the link, copy and paste this in to your browser address bar
Code:
http://www.bigandtallwarehouse.com/Jeans?sort=0&fltSizes[]=80x32
thanks
Sure, here it is
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 products p LEFT JOIN specials s on p.products_id = s.products_id LEFT JOIN products_description pd on p.products_id = pd.products_id LEFT JOIN manufacturers m on p.manufacturers_id = m.manufacturers_id JOIN products_to_categories p2c on p.products_id = p2c.products_id JOIN products_attributes p2a on p.products_id = p2a.products_id JOIN products_options po on p2a.options_id = po.products_options_id JOIN 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("Sizes80x32", GROUP_CONCAT(CONCAT(REPLACE(po.products_options_name, " ", ""), pov.products_options_values_name))))
Thanks for helping me with this
-
Re: Dynamic Filter 1.0 not working for Options
The SQL seems fine to me.
It's weird, if you filter on 78x32 which should just show the Stonewash Stretch Jean & Black Stretch Denim Jean you get no products.
If you filter on 36x36 you get 4 items including Stonewash Stretch Jean & Black Stretch Denim Jean so that rules out anything strange with those 2 items.
I'm at a real loss to explain it and I can't think of anything else I can do from here.
All I can suggest for the time being is log in to your web server and go to phpMyAdmin then paste the SQL in to the SQL box and see if it runs ok. It should return 2 rows.
If it doesn't you could try playing with the SQL to see if you can see what is going wrong. Maybe try removing the HAVING section to see if that gives you any results?
The only other thing I can suggest, although it's a long shot is removing the spaces around the bracket in 'HAVING ( FIND_IN_SET'. Sometimes SQL doesn't like spaces.
Sorry I can't be more help at the moment. I'll have a think and see if I can come up with anything.....
-
Re: Dynamic Filter 1.0 not working for Options
Thanks for looking into this. I really appreciate it. I'll do that and see what it comes up with. Yeah, it's weird, it filters ok with some values, but others, no go. I'm completely stumped myself. I'll try your suggestions. Thanks again.
-
Re: Dynamic Filter 1.0 not working for Options
I just ran the SQL like you suggested and it did come back with 2 products, like it should. So now I'm really confused:huh:
-
Re: Dynamic Filter 1.0 not working for Options
That seems to suggest it's probably a different mod that is causing the problem.
Is there any chance you can test on a clean installation or is it possible to switch off any other mods you have installed?
-
Re: Dynamic Filter 1.0 not working for Options
Quote:
Originally Posted by
damiantaylor
That seems to suggest it's probably a different mod that is causing the problem.
Is there any chance you can test on a clean installation or is it possible to switch off any other mods you have installed?
Switched off a few mods that can be turned on/off. Went through my different mods to see if they overwrote the same files in this mod. Didn't see that. I can't test on a clean installation. If I can give you access to my store via FTP, could you take a look and see if you see anything? Would that help? Thanks
-
Re: Dynamic Filter 1.0 not working for Options
Can you switch the site on again so I can see what the generated HTML looks like? That may give us a clue as to what is happening
-
Re: Dynamic Filter 1.0 not working for Options
-
Re: Dynamic Filter 1.0 not working for Options
I was hoping it was going to be a styling issue but for some reason it is generating nothing. The code below is what your website is generating (right click your browser window and select View Page Source to see for yourself). Your products should appear between the <table width="auto" border="0" cellpadding="1" cellspacing="1"> and </table> tags
Code:
<div id="productListing">
<div id="productsListingTopNumber" class="navSplitPagesResult back">Displaying <strong>1</strong> to <strong>2</strong> (of <strong>2</strong> products)</div>
<div id="productsListingListingTopLinks" class="navSplitPagesLinks forward"> </div>
<br class="clearBoth" />
<div class="centerBoxWrapperContents">
<table width="auto" border="0" cellpadding="1" cellspacing="1">
</table>
</div>
<div id="productsListingBottomNumber" class="navSplitPagesResult back">Displaying <strong>1</strong> to <strong>2</strong> (of <strong>2</strong> products)</div>
<div id="productsListingListingBottomLinks" class="navSplitPagesLinks forward"> </div>
<br class="clearBoth" />
</div>
If you filter on something that genuinely doesn't exist such as this where I've just swapped the 80x32 for 32x80.....
Code:
http://www.bigandtallwarehouse.com/Jeans?sort=0&fltSizes[]=32x80
You correctly get the message 'There are no products to list in this category.'
To me, it looks like the filter is working, especially after you'd confirmed the generated SQL does return the 2 expected products. You could try looking at the file that generates the product listing table to see why it isn't generating any products inside the table. Working backwards from there should eventually lead you to the cause of the problem.
If you can work out the cause, hopefully we can find a solution.
Sorry I can't be more help!
-
Re: Dynamic Filter 1.0 not working for Options
Hey Damian
I used a program, Beyond Compare and I compared the code using Jeans/50x32 filter and Jeans 80x32 to see any differences (the 50x32 filter seems to work fine). There were a couple differences in the code. Does it make any sense to you? I use Opera and use their Dragonfly extension (like Firebug for Firefox) and copied the code for each screen and then ran it through Beyond Compare. Hmmmm....this one is a stumper:blink:
Code:
<a class="disabled">Falcon Bay Sportswear</a>
<a class="enabled" rel="nofollow" href="http://www.bigandtallwarehouse.com/Jeans?fltSizes[]=80x32&fltBrand[]=3">Grand River Jean Co.</a>
<a class="disabled">$33 -- $43</a>
<a class="enabled" rel="nofollow" href="http://www.bigandtallwarehouse.com/Jeans?fltSizes[]=80x32&fltPrice[]=43.01--53">$43 and over</a>
<a class="enabled" rel="nofollow" href="http://www.bigandtallwarehouse.com/Jeans?fltSizes[]=80x32&fltColor[]=Black">Black</a>
Code:
<a class="enabled" rel="nofollow" href="http://www.bigandtallwarehouse.com/Jeans?fltSizes[]=50x32&fltBrand[]=4">Falcon Bay Sportswear</a>
<a class="enabled" rel="nofollow" href="http://www.bigandtallwarehouse.com/Jeans?fltSizes[]=50x32&fltBrand[]=3">Grand River Jean Co.</a>
<a class="enabled" rel="nofollow" href="http://www.bigandtallwarehouse.com/Jeans?fltSizes[]=50x32&fltPrice[]=32.5--43">$33 -- $43</a>
<a class="enabled" rel="nofollow" href="http://www.bigandtallwarehouse.com/Jeans?fltSizes[]=50x32&fltPrice[]=43.01--53">$43 and over</a>
<a class="enabled" rel="nofollow" href="http://www.bigandtallwarehouse.com/Jeans?fltSizes[]=50x32&fltColor[]=Black">Black</a>
-
Re: Dynamic Filter 1.0 not working for Options
I think you'll have to debug file includes/modules/product_listing.php as that's the file that fills array '$list_box_contents' with your product listing.
See if you can track down the reason that file isn't generating any products for you.
For example, see if '$listing_split->number_of_rows' is greater than zero (it's around line 73).
If $listing_Split is empty, that points to the splitPageResults class.
-
Re: Dynamic Filter 1.0 not working for Options
Quote:
Originally Posted by
damiantaylor
I think you'll have to debug file includes/modules/product_listing.php as that's the file that fills array '$list_box_contents' with your product listing.
See if you can track down the reason that file isn't generating any products for you.
For example, see if '$listing_split->number_of_rows' is greater than zero (it's around line 73).
If $listing_Split is empty, that points to the splitPageResults class.
This is what it's showing. I'm not well versed in PHP at all, so I don't have any idea where to start looking. I do appreciate all your help you've given me trying to get this problem fixed. Thank you
Code:
if ($listing_split->number_of_rows > 0) {
$rows = 0;
$listing = $db->Execute($listing_split->sql_query);
$extra_row = 0;
while (!$listing->EOF) {
$rows++;
if ((($rows-$extra_row)/2) == floor(($rows-$extra_row)/2)) {
$list_box_contents[$rows] = array('params' => 'class="productListing-even"');
} else {
$list_box_contents[$rows] = array('params' => 'class="productListing-odd"');
}
$cur_row = sizeof($list_box_contents) - 1;
-
Re: Dynamic Filter 1.0 not working for Options
We need to see if the number of rows returned by $listing_split is greater than zero (my guess is it isn't) so try adding this 'die' line....
Code:
die('I see ' . $listing_split->number_of_rows);
if ($listing_split->number_of_rows > 0) {
$rows = 0;
$listing = $db->Execute($listing_split->sql_query);
$extra_row = 0;
while (!$listing->EOF) {
$rows++;
if ((($rows-$extra_row)/2) == floor(($rows-$extra_row)/2)) {
$list_box_contents[$rows] = array('params' => 'class="productListing-even"');
} else {
$list_box_contents[$rows] = array('params' => 'class="productListing-odd"');
}
...then go directly to this link....
Code:
http://www.bigandtallwarehouse.com/Jeans?sort=0&fltSizes[]=80x32
If you see 'I see 0' then $listing_split is zero which is why you're getting no products listed.
We'd then need to look at file 'includes/classes/split_page_results.php' to see why $listing_split has returned no rows.
Did you upload the 'split_page_results.php' file supplied in the distribution or did you add the changes manually?
I'll not be around now for just over a week so good luck getting this working. If you're still struggling we'll try again when I'm back
-
Dynamic Filter v1.0 - can I have number of items added in brackets?
Hi,
Installed this filter and it's now working great! Thanks..
There's just one thought, though - is it possible to have after the filters the number of products per that filter, in brackets?
e.g.
Price
£0-£2 (10) --< there are ten products in that price bracket
£2.01-£5 (15)
Country
India (147) --< 147 products originate from India
South Africa (56)
Apart from that - thanks for a great mod.
Cheers,
Gavin
-
Re: Dynamic Filter 1.0 not working for Options
Quote:
Originally Posted by
damiantaylor
We need to see if the number of rows returned by $listing_split is greater than zero (my guess is it isn't) so try adding this 'die' line....
Code:
die('I see ' . $listing_split->number_of_rows);
if ($listing_split->number_of_rows > 0) {
$rows = 0;
$listing = $db->Execute($listing_split->sql_query);
$extra_row = 0;
while (!$listing->EOF) {
$rows++;
if ((($rows-$extra_row)/2) == floor(($rows-$extra_row)/2)) {
$list_box_contents[$rows] = array('params' => 'class="productListing-even"');
} else {
$list_box_contents[$rows] = array('params' => 'class="productListing-odd"');
}
If you see 'I see 0' then $listing_split is zero which is why you're getting no products listed.
We'd then need to look at file 'includes/classes/split_page_results.php' to see why $listing_split has returned no rows.
Did you upload the 'split_page_results.php' file supplied in the distribution or did you add the changes manually?
Nope, that didn't display 'I see 0' so I think that's not where the problem is (split_page_results.php) So strange it will filter properly some values, while others it will partial (like 6 out of 7 items filtered) or some none at all. I'm so stumped on this. I uploaded the 'split_page_results.php' file in the supplied distribution. Thanks again Damian for your help getting this working for me. I really do appreciate it.
-
Re: Dynamic Filter 1.0 not working for Options
I'm having the same issue as jimproz.
I played around with the attributes on the products that were showing nothing when I tried to filter them on the advanced search page and it seems like if the product has more than one attribute that needs to be selected to add it to the cart, it won't filter properly.
If you go to burningbutterfly.com and search for milk, there are 7 product results. If you select "Unscented/Fragrance Free" on the Dynamic Filter, it will filter properly as those products have no selectable attributes (only read-only). But if you try to filter by "Scented", "Essential Oil/Aromatherapy", or by either of the Product Type options, you get either a blank page or are sent to the "There are no items that match your search criteria" page.
I removed one of the selectable attribute groups from a product that can be filtered by "Scented" so that it only had one group of selectable attributes and the filter worked for that product but when I added the second attribute group back in, it didn't work anymore.
I hope that makes sense - I've been working on this for a while and am starting to get cross-eyed.
Thanks for your help!
-
Dynamic Filter v1.0 - 'AND' filtering, rather than 'OR'
Hi,
It seems to me that the current filtering works within one attribute as an OR filter; eg. for an ETHICS filter it may search for a product that is Fairly Traded OR Organic OR Vegan. It would be very useful to have the option to search for products that are Fairly Traded AND Organic AND Vegan instead.
I see some cases where an OR is the only way to filter, like for instance Sizing (Child OR Adult), or Pricing (one price band OR another), but in my cases I'd really like to search for products which have one or more attribute option values.
There is another attribute I use; Music Style. Here, a product could have the attribute values Indian AND Dance, for instance - or Children AND World AND Christmas.
Is this possible?
Regards,
Gavin
-
Re: Dynamic Filter v1.0 - 'AND' filtering, rather than 'OR'
I recently discovered this mod, I think it helps take Zencart up to Magento level.
Don't yet have it live anywhere and it's not on a current test site of mine. But do not all attributes show in the filter? That is, everything you mention, will they not appear?
Anyway, since I also recently discovered (after 6 years with zencart) that we can make Read Only attributes, this filter has great potential for us, as we can filter by dress type (long, short, halter, ballgown etc.) without them being selectable attributes.
sph
prommart com
zencart 1.5 testing site:
http://www.prom-mart.com/demo-2/
-
Re: Dynamic Filter v1.0 - 'AND' filtering, rather than 'OR'
I agree, it's a great mod - but I don't think I've explained myself clearly enough.
Let's say I have an attribute 'ETHICS', with attribute values FAIRTRADE Mark, Organic, Vegan, Vegetarian, Eco-Friendly. Let's then say I select 'FAIRTRADE Mark' AND 'Vegan'. When the filter is run, this will return products that have the value 'FAIRTRADE Mark' AND the products that have the value 'Vegan'. So far so good - however, what I actually want is for the filter to return ONLY the products which have BOTH the values 'FAIRTRADE Mark' AND 'Vegan'; true AND logic.
Put more simply; the filter returns any product which satisfies condition 'A' OR condition 'B'. It does *not* return the products which satisfy conditions 'A' AND 'B'.
So - the question remains - I assume the answer is yes - is there any way to have the filter function as an AND filter, rather than an OR? I'm afraid my SQL is pretty much less than basic, so can't figure it out for myself, sorry.
-
Re: Dynamic Filter v1.0 - 'AND' filtering, rather than 'OR'
I tested this filter on a test demo site just enough to see it's potential, then deleted my test site when it blew-up for other reasons. Haven't yet gotten back to this filter on my new demo test sites.
I am not yet familiar enough with this filter to know.
sph
prommart com
-
Re: Dynamic Filter v1.0 - 'AND' filtering, rather than 'OR'
No worries SPH - just hoping Damian can help me out when he gets back from wherever he's been :-) BTW, I've got a problem with the left cols misaligning as well - even copying the code over hasn't helped for me...
Gavin
-
Re: Dynamic Filter v1.0 - 'AND' filtering, rather than 'OR'
Gavin,
Off the top of my head, if you look in the new files folder includes/modules/YOUR_TEMPLATE/dynamic_filter.php you'll see where the ORs are generated. Change these to ANDs and you should be good to go.
This will mean all the filters all be ANDed together though, no way to say you want some ANDing and others ORing I'm afraid
-
Re: Dynamic Filter v1.0 - 'AND' filtering, rather than 'OR'
Hi Damian - Ha! Why didn't I think of that? A search for 'OR'. OK, I'll take a look at that when I have a few mins - busy re-coding something else at the moment. Pretty addictive, this Zen Cart-ery. Great feeling when I get something right and things move about the way I'd like them :-)
I realise it's going to be either 'AND' or 'OR', unless a fancy switch was put in with another bit of code to display (maybe for the future...), but in my case, 'AND' is what is most useful for my purposes. I'll let you know how I get on.
Thanks for your help,
Gavin
-
Re: Dynamic Filter v1.0 - 'AND' filtering, rather than 'OR'
Hi Damian,
That works great - now I can look for foods that are Fairtrade AND Organic AND Vegan (or whatever). For some reason, I didn't actually have that file locally - only on my server - which is how I missed it. Must. Remember. Keep. Files. Synced!
Thanks a lot for your help. (BTW, is there a semi-simple way to have number of items per attribute in brackets after the attribute in the filter listing, as per my other thread? Just asking....).
Cheers,
Gavin
-
Re: Dynamic Filter v1.0 - 'AND' filtering, rather than 'OR'
BTW, is there a semi-simple way to have number of items per attribute in brackets after the attribute in the filter listing, as per my other thread? Just asking....
If you look in the ....templates/sideboxes/tpl_dynamic_filter.php file, in the section that generates the attribute filters, I think I put a column called quantity in the select statement. You can use that to display a count but it will only work for attributes which is why it never went live. Categories, brands, price range won't show a count.
That's as far as I got with it I'm afraid!
-
Re: Dynamic Filter 1.0 not working for Options
kamelion,
I've been working with Jimproz on this and have tracked it down to what may be a MySQL bug.
There's a query that is generated with an 'order by' clause, which when executed returns an incorrect number of rows. If the order by clause is removed, the query works correctly. I can't see a reason for it except a bug in the version of MySQL he's running, although I'm no SQL expert!
Do you have another server which is running a different version of MySQL you can try this on?
-
Re: Dynamic Filter v1.0 - 'AND' filtering, rather than 'OR'
So you did....another thing I didn't notice. I tried using 'p2as.quantity' and got nothing...but 'quantity' works like a dream. The great thing is....I'm only using attributes, so it's precisely what I'm looking for! I've now added the code so after the attribute name I have the quantity in brackets. Well, braces, actually - they look pretty cool.
Thanks again for a great mod. Still got misaligned sideboxes underneath, though - have to do some more digging when I get chance.
Cheers!
Gavin
-
Re: Dynamic Filter v1.0
There is a line in tpl_dynamic_filter.php that I believe is intended to give this functionality, but I could not get it to work myself, maybe you have more luck and can share your results?
PHP Code:
// Below line counts up all quantities of each item. e.g. if a glove is available in Small and Medium, quantity = 2.
//$attributes = $db->Execute("SELECT po.products_options_name, pov.products_options_values_name, count( p2as.quantity ) as quantity" .
-
Re: Dynamic Filter v1.0
Hi there,
Glad to share...code required is around l.324 and is as follows (extra bit is in BOLD);
case 'Checkbox':
$filters .= '<li class="dFilterLink">' . zen_draw_checkbox_field($group . '[]', $attributes->fields['products_options_values_name'], (isset($_GET[$group]) && in_array($attributes->fields['products_options_values_name'],$_GET[$group]) ? true : false), ($linkClass == 'disabled' ? 'disabled="disabled"' : '') . ($onClick != '' && FILTER_STYLE == 'Checkbox - Single' ? ' onclick="' . $onClick . '"' : '')) . htmlspecialchars(html_entity_decode($attributes->fields['products_options_values_name'], ENT_QUOTES)) .' {' . htmlspecialchars(html_entity_decode($attributes->fields['quantity'], ENT_QUOTES)). '}' . '</li>';
-
Re: Dynamic Filter v1.0
-
Re: Dynamic Filter 1.0 not working for Options
I think I do - my test site (burningbutterfly.com) is on 5.0 while my live site is on 5.5. I don't know if that will be enough of a difference in version to make a difference but it's worth a shot. As soon as my test server comes back up, I'll transfer the test files to my live site's server and see if there's any difference.
What file is the incorrect orderby clause in? I'm no MySQL expert by any means but if I stare at a problem long enough, sometimes I can figure out what the problem is :)
Thanks again! This mod is awesome and makes such a difference in making a site look more professional.
-
Re: Dynamic Filter 1.0 not working for Options
Unfortunately it didn't work on MySQL 5.5. I'll keep digging through the files for the order by clause and see what I can come up with.
-
Re: Dynamic Filter 1.0 not working for Options
Thanks for trying.
The only other thing I've spotted that your site and jimproz have in common is the lack of the sort box....the one that let's you sort by price, date added, etc.
I can't see why that would make a difference...I'm kind of grabbing at straws now!
The SQL that is responsible for generating the product listing is in includes/modules/product_listing.php.
Around line 75 $listing = $db->Execute($listing_split->sql_query);
$listing_split->sql_query is generated by the supplied modified file includes/classes split_page_results.php
Your problem may not actually be the same as jimproz's because when he gets no products displayed in the list, he still gets the 'Displaying 1 to 2 (of 2 products)' message, just no products displayed.
Your site doesn't show that message.
-
Re: Dynamic Filter 1.0 not working for Options
Quote:
Originally Posted by
damiantaylor
The only other thing I've spotted that your site and jimproz have in common is the lack of the sort box....the one that let's you sort by price, date added, etc.
I can't see why that would make a difference...I'm kind of grabbing at straws now!
I'll turn on the sort box and see if that makes a difference because sometimes grabbing at straws works :)
I added an admin switch to 'includes/templates/custom/sideboxes/tpl_dynamic_filter.php' so that I can turn off the manufacturer filter, price filter and category filter in the filter sidebox as well as a switch for the price filter so that it will only show up only if there is more than one option. I tried replacing that file with the default one but it didn't make a difference.
Quote:
Originally Posted by
damiantaylor
The SQL that is responsible for generating the product listing is in includes/modules/product_listing.php.
Around line 75 $listing = $db->Execute($listing_split->sql_query);
$listing_split->sql_query is generated by the supplied modified file includes/classes split_page_results.php
Thanks!
Quote:
Originally Posted by
damiantaylor
Your problem may not actually be the same as jimproz's because when he gets no products displayed in the list, he still gets the 'Displaying 1 to 2 (of 2 products)' message, just no products displayed.
Your site doesn't show that message.
I actually have it coded so that it doesn't show that message unless there is more than one page of products to display. I changed it back to the default code, but it didn't make a difference.
The only products I have the problem on are ones that have more than one attribute that is required to add it to the cart - does jimproz have the same issue? Or is it not sorting for any of their products?
-
Re: Dynamic Filter 1.0 not working for Options
I'm not sure if jimproz has the problem with multiple attributes or not, although I tested that on my own site and it didn't give me any problems.
You're probably best adding
Code:
die($listing_split->sql_query);
before the $listing = $db->Execute($listing_split->sql_query); line in includes/modules/product_listing.php.
That will show you the SQL statement that is being generated. You can then hopefully see what is causing the issue....why that statement is returning an incorrect number of rows.
Remeber to remove the statement after though!
-
Re: Dynamic Filter 1.0 not working for Options
Quote:
Originally Posted by
damiantaylor
I'm not sure if jimproz has the problem with multiple attributes or not, although I tested that on my own site and it didn't give me any problems.
You're probably best adding
Code:
die($listing_split->sql_query);
before the $listing = $db->Execute($listing_split->sql_query); line in includes/modules/product_listing.php.
That will show you the SQL statement that is being generated. You can then hopefully see what is causing the issue....why that statement is returning an incorrect number of rows.
Remeber to remove the statement after though!
LOL I actually did that before I replied to this thread and got the same result as jimproz. There is an error in my cache that says
PHP Warning: strlen() expects parameter 1 to be string, array given in ...includes/functions/functions_general.php on line 154
I did some searching on the forums and I guess it is/used to be a somewhat common problem but none of the fixes suggested worked for this case (probably because I'm still trying to decipher the code in functions_general.php).
I replaced all of the dynamic filter and product listing pages with defaults and now I'm not even showing any product results at all but I am getting the 'Displaying 1 to 7 (of 7 products)' <sigh>.
-
Re: Dynamic Filter 1.0 not working for Options
I managed to get this mostly working on the search listing after changing the header for the page - for some reason on my site, I needed to disable most of the $order_str lines to get it to work properly.
The only problem I have now is that if the product has an attribute with more than 28 options, it says the product cannot be found when you try to filter by the attribute even though that attribute is not included in the filter. I updated the only attribute I have with so many options so that the products_options_length and products_options_size have limits of 100. But no go.
Any clues on where to start looking?
Oh, and in split_page_results.php on or about line 25 there is an option to turn on debugging so you can see the sql that's being generated for the query if you didn't know already.
-
dynamic filter plugin error 1054 Unknown column 'm.manufacturers_name' in 'field list
i am trying to use this plugin http://www.zen-cart.com/downloads.php?do=file&id=1361 which is great by the way on my store with 1.3.9g. but it gives an error on the product listing pages about an unknow field m.manufacturer_name.
has anyone been able to use this with 1.3.9g?
-
Re: does anyone have a 1.3.9g mod for dynamic filter plugin?
here is the error...
1054 Unknown column 'm.manufacturers_name' in 'field list'
in:
[SELECT DISTINCT p.products_model, m.manufacturers_name, p.products_image, pd.products_name, p.products_quantity, 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 products p LEFT JOIN specials s on p.products_id = s.products_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 WHERE p.products_status = 1 and pd.language_id = '1' and p2c.categories_id = '449' GROUP BY p.products_id order by p.products_sort_order, pd.products_name]
-
Re: does anyone have a 1.3.9g mod for dynamic filter plugin?
alright I found the fix for this the plugin is still a bit shaky for 1.3.9g especially with the css it doesnt match my template at all...
in the file override includes/index_filters/YOURTEMPLATE/default_filter.php
find lines 113-127 this sql query that is built in here calls for the m.manufacturers_name field but it never specifies the manufacturers tables in the join statements.
add this
PHP Code:
" LEFT JOIN " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id" .
right below this
PHP Code:
" LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id" .
and your all set .
-
Dynamic Filter attribute sort order
Great add-on! But, is it possible for it to use the sort order of the option Name? It seems to sort alphabetically with no way to change it.
-
Re: Dynamic Filter attribute sort order
Bump. Hoping damiantaylor sees this to respond. Thanks!
-
Dynamic Filter v1.0 not working
I just installed "Dynamic Filter v1.0" It works in the back end the lay out box control is active and Conf>dynamic filter is on.
But It dosent show up on the front page.
I want to filter categories and sub-categories (for now) I downloaded the new version of Jquery and renamed it 'jscript_jquery-1.4.0.min.js'. as stated in the instructions.
can anyone help?
website Corvetteanything.com
-
Re: Dynamic Filter v1.0 not working
This mod?
http://www.zen-cart.com/downloads.php?do=file&id=1361
It is now version 1.1
Just last evening I installed it on my main demo site here:
http://www.webdivision.prommart.com/...ex&cPath=65_66
I took you straight to the filter's page, as it does not show on the homepage and only in categories with products. This is a subcategory with products, so it shows.
Prior to this, I installed the Dynamic Filter on yet another test site with the Rubik template. This is a more sophisticated template - like your TM template probably is - and it busted some pages. Perhaps if I can merge better I can get it working.
My first link where it does work required no merging.
You might also get more help if you post in the Other Contributions Sideboxes forum, where this mod has been more active.
BTW, I don't recall having to download anything special.
-
Re: Dynamic Filter v1.0 not working
There is another filter which you can see on this site similar industry to yours:
coolcarpartsonline com
It's on his homepage. Perhaps this is what you were asking about? Don't recall what filter that is, but have seen it in the downloads area.
-
Re: Dynamic Filter v1.0 not working
that's exactly what I want
-
Re: Dynamic Filter v1.0 not working
coolcarpartsonline com
is exactly what I want
-
Re: Dynamic Filter v1.0 not working
I understand that coolcarparts has had developers do work on his site. He's a frequent poster so he might tell you what he has.
In the meantime, you might take a look at these to see if one is it...or close enough:
http://www.zen-cart.com/downloads.php?do=file&id=1067
http://www.zen-cart.com/downloads.php?do=file&id=533
I actually test one of these about a year ago that looked similar to the one on coolcarparts.
You'll also have to verify that they are compatible with your version of ZC, or at least will work with it.
Maybe you can find a support thread for them with someone who posted a link to their site, to check it out.
Or maybe test one, maybe on a test site you put up somewhere.
-
Re: Dynamic Filter v1.0 not working
thank you I will give them a try
-
dynamic filter sidebox disappears when only one product is shown
hi,
my dynamic filter sidebox disappears on all of the product listing pages when a filter returns one result. here is an example:
http://filtersavvy.com/index.php?mai...lterWeight(lb)[]=0.49
you may have to copy paste the link into your browser
any reason this could be happening?
-
Re: Dynamic Filter - Left Col Boxes Misaligned
I installed the DF version 1.1 on version 1.5. It is functional well. Great mode, thanks. However, in the categories field, every category had been listed twice. I out put the $categories by print_() in tpl_dynamic_filter.php. It has been shown that every category had been double. Hope someone can help me to fix it.
-
Dynamic Filter
How does the Dynamic Filter work? Where does it pull its filters from? I am doing some testing right now, and I have a category where all of the devices will have certain attributes. I have already added those attributes to at least one device.
When I look in the NARROW YOUR RESULTS sidebox, nothing comes up. I will note that we are using a host who I believe has done some customization to their template, so, there is a chance that the template may be the cause.
I just was not sure if I was not using the proper window to apply attributes to a product, so the Dynamic Filter could work. Ideally, I would like to use the combination of Dynamic Filter and Attributes to help people narrow down a product, but I don't want the attributes to show up on the product info page. People will not be applying attributes to the product before checking out. The attributes (in my case) are used more for giving more information about a product so someone could use the filter to find a product that meets a certain criteria.
Ian
-
Re: Dynamic Filter
Check out the links in similar threads at the bottom of this thread.
-
Dynamic Filter shows display only attributes
Just installed this mod and I think it's great but I have a number of products that have a display only attribute - "please select".
I don't want this to display in the dynamic filter as its a way to ensure customers are force to make a choice on the product page, for example between silver or gold.
Is there any way to do this?
-
Another Dynamic Filter Question
On my site if I drill down to the product it is showing the attributes. How do I get rid of those on the Product page.
http://www.usaofficesupplies.com/zencart
I know it can be done because I saw another site that uses Dynamic Filter and they done have that.
-
Re: Another Dynamic Filter Question
If you have attributes that don't need to be selected to add the product to the cart, in admin > catalog > option name manager, select the Option Type as 'Read Only'. Making the Option Type 'Read Only' hides the attributes on the product info page.
-
Re: Another Dynamic Filter Question
dlwwalton,
In my experience, if a product attribute is Read Only is still shows on the product page; it just isn't "selected" and made part of the shopping cart. The Dynamic Filter does work off the Read Only attributes, as we're using both the filter and read only attributes on one of our live sites now.
But I don't really know what you mean by drill down and get the attributes off the product page. Can you give a direct link and explain what you want gone?
Unfortunately, I don't see a dedicated Dynamic Filter thread, but most postings are in the Addon Sideboxes forum.
kamelion, very nice looking site!
-
Re: Another Dynamic Filter Question
What I mean is on the left where the categories are make your way down and select the attributes of your choice. You will eventually get to a particular product. The attributes are showing here (as the link below shows.) I want those to be gone..
Everything you see with a radio button. I don't want any of these to show on this page..
Here is the link
The link is http://usaofficesupplies.com/zencart...oducts_id=3017
-
Re: Another Dynamic Filter Question
So you're saying that the dynamic filter sidebox is showing on your product information page? I don't see it when I go to the link.
-
Re: Another Dynamic Filter Question
To hide the read-only attributes on the product info page, add to your stylesheet (anywhere)
#productAttributes {display: none;}
If you have selectable attributes for any products, this will hide them too, and you will need to install Flexible Attributes from Plugins to selectively hide the read-only ones.
-
Re: Another Dynamic Filter Question
[QUOTE=gjh42;1140384]To hide the read-only attributes on the product info page, add to your stylesheet (anywhere)
#productAttributes {display: none;}
You are the best. I could kiss you right now. That is exactly what I needed to do. I don't know how to thank you..Many many thanks...
-
Re: Another Dynamic Filter Question
I guess no attributes showing will work, so long as the customer doesn't need to select anything or see it in their cart. Your product titles may cover much of that. And I guess the Dynamic Filter, if they use it, takes care of attribute selection.
My other thought, going back to when I first saw your site, is that with only seven products the Dynamic Filter seems to me like overkill. Are you going to have more products?
Your site also seems slow, but that's another issue.
-
Re: Another Dynamic Filter Question
About 38,000 products. Just testing on a small scale first and then I will add about 3,000 products to see what happens.
Customer will not need to select any attributes from the product page, you are absolutely correct..
Yes for some strange reason the site is extremely slow especially when clicking on a product or product image. I called my ISP and they told me it was something with zencart. Any suggestions? I have looked at forums on speeding up Zencart and have played with settings but doesn't seem to help. My previous load of zencart appeared to perform much better. If I reload zencart and then copy the files (from a back up back) over to the zencart folder would that just reproduce my problem?
-
Re: Dynamic Filter 1.0 not working for Options
Hello!
Please advice how to fix the following errors:
1. When choosing from the list of categories or attributes in filter doubles (tallies) of categories
& options appear in the form of empty fields, and operations options are listed below;
2. An error appears when sorting some of the categories
Code:
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,166,75,152)' at line 1
in:
[SELECT manufacturers_id, manufacturers_name, IF(manufacturers_id IN(), 'Y', 'N') as flag FROM manufacturers WHERE manufacturers_id IN (1,166,75,152) ORDER BY manufacturers_name]
There is a link to website http://www.perchinkastyle.ru/products_all.html , sorting is on the left.