I spend couple hourt to make filter with multiple selection. And i found bug.
PRE:
Attrributes:
- checkbox menu (3 options)
- mandatory field - checked
- Multiple selection - checked
Other options without change.
there is no chance to see filter for multiple selection because in template, because in ModuleIsotopeProductFilter.php variable $arrValues has value like this (this is eg for 2 select options):
and code:Code:Array ( [0] => a:2:{i:0;s:11:"value 1";i:1;s:13:"value 2";} )
This is serialized array. So to fix it I wrote:Code://ModuleIsotopeProductFilter.php line 280 if (!in_array($option['value'], $arrValues)) { unset($arrOptions[$k]); continue; }
Now I have in tamplate in $this->filterOptions proper structure to make checkbox filter. I hope it will help for others.Code:if ( $arrWidget['multiple'] ) { $arr = array(); for ($i=0, $n=count($arrValues);$i<$n;$i++) { $arr = array_merge($arr, unserialize($arrValues[$i])); } $arrValues = $arr; }

 
			
 
			
			 Bug with filter for attribute with multiple options
 Bug with filter for attribute with multiple options
				 
					
					
					
						 Reply With Quote
Reply With Quote
Bookmarks