I don't want the word "Filter" to appear if no facets are available for a category. Is there a conditional that will check for facets?
Announcement
Collapse
No announcement yet.
Conditional for Checking if Category has Facets
Collapse
X
-
If a category has products that are not filterable, then nothing should appear, example: https://colossus.mivareadythemes.com/cold-brew.html .Matt Zimmermann
Miva Web Developer
Alchemy Web Development
https://www.alchemywebdev.com
Site Development - Maintenance - Consultation
Miva Certified Developer
Miva Professional Developer
https://www.dev4web.net | Twitter
-
What if there was more than one product in that category? Does it still stay hidden then? I am NOT showing that to be the case on my test store: https://dts2290.mivamerchantdev.com/pet-sympathy. This is the conditional above the facets 'hook'
Code:<mvt:if expr="l.settings:facets:facet_count GT 1 OR l.settings:category_listing:products_on_page_count GT 1 OR l.settings:all_products:products_on_page_count GT 1 OR l.settings:search_results:products_on_page_count GT 1">
Comment
-
You could probably change that to:
Code:<mvt:if expr="l.settings:facets:facet_count GT 1 AND (l.settings:category_listing:products_on_page_count GT 1 OR l.settings:all_products:products_on_page_count GT 1 OR l.settings:search_results:products_on_page_count GT 1)">
Matt Zimmermann
Miva Web Developer
Alchemy Web Development
https://www.alchemywebdev.com
Site Development - Maintenance - Consultation
Miva Certified Developer
Miva Professional Developer
https://www.dev4web.net | Twitter
Comment
Comment