Forums / Addon Sideboxes / Dynamic Filter [Support Thread]

Dynamic Filter [Support Thread]

Results 1 to 20 of 809
03 Mar 2012, 13:48
#1
davowave avatar

davowave

New Zenner

Join Date:
Mar 2009
Posts:
90
Plugin Contributions:
0

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:
[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


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
06 Mar 2012, 08:42
#2
ppsoyal avatar

ppsoyal

New Zenner

Join Date:
May 2010
Posts:
33
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

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.
06 Mar 2012, 12:53
#3
davowave avatar

davowave

New Zenner

Join Date:
Mar 2009
Posts:
90
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

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?
06 Mar 2012, 17:52
#4
davowave avatar

davowave

New Zenner

Join Date:
Mar 2009
Posts:
90
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

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...
11 Mar 2012, 03:32
#5
novastar avatar

novastar

Zen Follower

Join Date:
Jul 2009
Posts:
127
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

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.
01 Apr 2012, 13:02
#6
daviator avatar

daviator

New Zenner

Join Date:
Mar 2012
Posts:
26
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

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
04 Apr 2012, 13:00
#7
long_john avatar

long_john

New Zenner

Join Date:
Dec 2011
Posts:
19
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

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?
18 Apr 2012, 05:27
#8
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

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?main_page=product_info&cPath=122_30&products_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
18 Apr 2012, 05:49
#9
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

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
18 Apr 2012, 11:08
#10
damiantaylor avatar

damiantaylor

Zen Follower

Join Date:
Aug 2009
Posts:
244
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

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
18 Apr 2012, 11:11
#11
damiantaylor avatar

damiantaylor

Zen Follower

Join Date:
Aug 2009
Posts:
244
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

I'll be uploading a new version in the next few days that addresses the no-space-allowed-in-option-names bug.
18 Apr 2012, 16:46
#12
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Expand setting didn't work.

However, I moved the filter to the bottom of my left column and it looks okay.
18 Apr 2012, 17:28
#13
damiantaylor avatar

damiantaylor

Zen Follower

Join Date:
Aug 2009
Posts:
244
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

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.
22 Apr 2012, 18:38
#14
raj3396 avatar

raj3396

New Zenner

Join Date:
May 2011
Posts:
43
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

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
23 Apr 2012, 08:27
#15
damiantaylor avatar

damiantaylor

Zen Follower

Join Date:
Aug 2009
Posts:
244
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

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)....
// 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...

// 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?
23 Apr 2012, 15:28
#16
raj3396 avatar

raj3396

New Zenner

Join Date:
May 2011
Posts:
43
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

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
23 Apr 2012, 18:51
#17
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

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-movies-action-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/hardware-graphics-cards-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
23 Apr 2012, 20:41
#18
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

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
24 Apr 2012, 11:01
#19
damiantaylor avatar

damiantaylor

Zen Follower

Join Date:
Aug 2009
Posts:
244
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

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.....
<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?
24 Apr 2012, 16:32
#20
damiantaylor avatar

damiantaylor

Zen Follower

Join Date:
Aug 2009
Posts:
244
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

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.....
/********************************************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?