#REM This template is used in Category context and differs in subtle ditails #ENDREM
SF-FacetedSearchResults.INC-SearchContent.html
#IF(NOT #FormError AND #COUNT(#RemoteSearchFacets.facets))
    #LOCAL("StoreRootLayoutIconSet", #System.StoreRoot . "/" . #Style.LayoutIconSet) #LOCAL("anyFacetUsed",0) #LOCAL("facetsContent","") #LOOP(#RemoteSearchFacets.facets) #REM#ENDREM #LOCAL("facetSelectedValue","") #LOCAL("facetSelected","") #LOCAL("facetClassName","") #LOCAL("facetTitle", #attributeName) #LOCAL("facetUsed",0) #LOCAL("facetContent",{( #IF(#attributeType EQ "Boolean") #SET("facetClassName","RemoteSearchFacetBoolean")
      #LOOP(#values) #SET("facetSelectedValue", #selectedValue) #SET("facetSelected", #facetSelectedValue EQ #filter.attributeValue) #IF(#facetSelected)#SET("facetUsed",1)#ENDIF
    • #ENDLOOP
    #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)
      #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
    #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)
      #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
    #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)
      #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
    #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 #ELSIF(#attributeName EQ "IsNew" AND #attributeType EQ "Standard") #SET("facetClassName","RemoteSearchFacetBoolean") #SET("facetTitle","{IsNew}") #ELSIF(#attributeName EQ "Category" AND #attributeType EQ "Standard") #SET("facetClassName","RemoteSearchFacetCategory") #SET("facetTitle","{Categories}")
      #LOOP(#values,0,0) #IF(#GET("INPUT.FacetValue_".#filter.fieldName))
    • [{AnyCategory}]
    • #ENDIF #ENDLOOP #LOCAL("Break",0) #LOCAL("LoopContent","") #LOOP(#values) #IF(NOT #Break) #SET("facetSelectedValue", #selectedValue) #SET("facetSelected", #facetSelectedValue EQ #filter.attributeValue) #IF(#facetSelected)#SET("facetUsed",1)#ENDIF #LOCAL("LoopContentItem", {(
    • #IF(NOT #facetSelected)#ENDIF #IF(NOT #facetSelected)#ENDIF #IF(#_.children) #INCLUDE("INC-FacetCategory") #ENDIF
    • )}) #IF(#Break) #SET("LoopContent", #LoopContentItem) #ELSE #SET("LoopContent", #LoopContent.#LoopContentItem) #ENDIF #ENDLOCAL #ENDIF #ENDLOOP #LoopContent[0] #ENDLOCAL #ENDLOCAL
    #ELSIF(#attributeName EQ "AverageRating" AND #attributeType EQ "Standard") #SET("facetClassName","RemoteSearchFacetRating") #SET("facetTitle","{Rating}") #LOOP(#values) #SET("facetSelectedValue", #selectedValue) #SET("facetSelected", #facetSelectedValue EQ #filter.attributeValue) #IF(#facetSelected)#SET("facetUsed",1)#ENDIF #ENDLOOP #ENDIF )}) #IF(NOT #IsEmpty(#facetContent)) #IF(#facetUsed)#SET("anyFacetUsed",1)#ENDIF #SET("facetsContent", #facetsContent.{(
  • #facetTitle #IF(#facetUsed){Reset}#ENDIF #facetContent[0]
  • )}) #ENDIF #ENDLOCAL #ENDLOCAL #ENDLOCAL #ENDLOCAL #ENDLOCAL #ENDLOCAL #ENDLOOP #IF(#anyFacetUsed)
  • {ResetAllFilters}
  • #ENDIF #facetsContent[0] #ENDLOCAL #ENDLOCAL #ENDLOCAL
Nochmal2 #INCLUDE("INC-CategorySearchResults")
#IF(#INPUT.ViewAction NE "JSONSnippet") #REM#ENDREM #ENDIF #ELSE #IF(NOT #FormError)#INCLUDE("INC-SearchResults")#ENDIF #ENDIF