#ELSIF(#attributeType EQ "Integer")
#SET("facetClassName","RemoteSearchFacetNumber")
#LOOP(#values)
#IF(#filter.attributeRange.min AND #filter.attributeRange.max AND #filter.attributeRange.min NE #filter.attributeRange.max)
#LOCAL("FormElementName", "FacetRange_".#filter.fieldName)
#SET("facetSelectedValue", "")
#SET("facetSelected", #selectedRange.min OR #selectedRange.max)
#IF(#facetSelected)#SET("facetUsed",1)#ENDIF
#LOCAL("selectedRangeMin",#selectedRange.min)
#LOCAL("selectedRangeMax",#selectedRange.max)
#IF(#selectedRangeMin AND (#selectedRangeMin < #filter.attributeRange.min))
#SET("selectedRangeMin", #filter.attributeRange.min)
#ENDIF
#IF(#selectedRangeMax AND (#selectedRangeMax > #filter.attributeRange.max))
#SET("selectedRangeMax", #filter.attributeRange.max)
#ENDIF
-
#ENDLOCAL
#ENDLOCAL
#ENDLOCAL
#ENDIF
#ENDLOOP
#ELSIF(#attributeType EQ "Float")
#SET("facetClassName","RemoteSearchFacetNumber")
#LOOP(#values)
#IF(#filter.attributeRange.min AND #filter.attributeRange.max AND #filter.attributeRange.min NE #filter.attributeRange.max)
#LOCAL("FormElementName", "FacetRange_".#filter.fieldName)
#SET("facetSelectedValue", "")
#SET("facetSelected", #selectedRange.min OR #selectedRange.max)
#IF(#facetSelected)#SET("facetUsed",1)#ENDIF
#LOCAL("selectedRangeMin",#selectedRange.min)
#LOCAL("selectedRangeMax",#selectedRange.max)
#IF(#selectedRangeMin AND (#selectedRangeMin < #filter.attributeRange.min))
#SET("selectedRangeMin", #filter.attributeRange.min)
#ENDIF
#IF(#selectedRangeMax AND (#selectedRangeMax > #filter.attributeRange.max))
#SET("selectedRangeMax", #filter.attributeRange.max)
#ENDIF
-
#ENDLOCAL
#ENDLOCAL
#ENDLOCAL
#ENDIF
#ENDLOOP
#ELSIF(#attributeName EQ "ListPrice" AND #attributeType EQ "Standard")
#SET("facetClassName","RemoteSearchFacetPrice")
#SET("facetTitle","{Price}")
#LOOP(#values)
#IF(#filter.attributeRange.min AND #filter.attributeRange.max)
#LOCAL("FormElementName", "FacetRange_".#filter.fieldName)
#SET("facetSelectedValue", "")
#SET("facetSelected", #selectedRange.min OR #selectedRange.max)
#IF(#facetSelected)#SET("facetUsed",1)#ENDIF
#LOCAL("selectedRangeMin",#selectedRange.min)
#LOCAL("selectedRangeMax",#selectedRange.max)
#IF(#selectedRangeMin AND (#selectedRangeMin < #filter.attributeRange.min))
#SET("selectedRangeMin", #filter.attributeRange.min)
#ENDIF
#IF(#selectedRangeMax AND (#selectedRangeMax > #filter.attributeRange.max))
#SET("selectedRangeMax", #filter.attributeRange.max)
#ENDIF
#REM each "ListPrice" needs its own currencyID for form validation (Currency == user currency; CurrencyID == shop currency)#ENDREM
#LOCAL("FormatCurrency", #INPUT.Currency)
-
#ENDLOCAL
#ENDLOCAL
#ENDLOCAL
#ENDLOCAL
#ENDIF
#ENDLOOP
#ELSIF(#attributeType EQ "PreDefString" OR #attributeType EQ "PreDefMultiString" OR #attributeType EQ "PreDefLocalizedString" OR #attributeType EQ "PreDefMultiLocalizedString" OR (#attributeName EQ "Manufacturer" AND #attributeType EQ "Standard"))
#SET("facetClassName","RemoteSearchFacetSelect")
#IF(#attributeName EQ "Manufacturer" AND #attributeType EQ "Standard")
#SET("facetTitle","{Manufacturer}")
#ENDIF