I am looking to hide a selection of products from my product-recommendation section. I tagged all these products with _hidden so they are automatically added to a collection called “Hidden”. I want to hide this collection from my recommendations section.
Here is the code for product-recommendations.liquid not including the schema. i know i need an if statement but don’t know where to put it.
{%- assign use_recommendations = true -%}
{%- assign hand_picked_count = 0 -%}
{%- for block in section.blocks -%}
{%- if block.settings.product != blank -%}
{%- assign use_recommendations = false -%}
{%- assign hand_picked_count = hand_picked_count | plus: 1 -%}
{%- endif -%}
{%- endfor -%}
{%- capture section_settings -%}
{
"productId": {{ product.id | json }},
"useRecommendations": {{ use_recommendations | json }},
"recommendationsCount": 4
}
{%- endcapture -%}
{%- capture flickity_options -%}
{
"prevNextButtons": true,
"pageDots": false,
"wrapAround": false,
"contain": true,
"cellAlign": "center",
"watchCSS": true,
"dragThreshold": 8,
"groupCells": true,
"arrowShape": {"x0": 20, "x1": 60, "y1": 40, "x2": 60, "y2": 35, "x3": 25}
}
{%- endcapture -%}