How do I take change this code to be reflected of a chosen tag (trying to group collections) lets say to change it only for products that have the tag “flower bundle”
{% assign number_of_related_products = section.settings.number_of_related_products | times:1 %}
{% if settings.product_layout == "gallery" or template.suffix == 'gallery' or settings.product_layout == "full_with" or template.suffix == 'full-width' %}
{%- assign class = 'four-items verticle' -%}
{%- assign rows = '4' -%}
{%- assign grid_item_width = 'col-6 col-md-4 col-lg-3 col-xl-12' -%}
{% elsif settings.product_layout == "grouped" or template.suffix == 'grouped' %}
{%- assign class = 'five-items' -%}
{%- assign rows = '5' -%}
{%- assign grid_item_width = 'col-6 col-md-4 col-lg-3 col5' -%}
{% else %}
{% if section.settings.style_moreview == 'horizontal' or settings.product_layout == 'default' %}
{%- assign class = 'four-items' -%}
{%- assign rows = '4' -%}
{%- assign grid_item_width = 'col-6 col-md-4 col-lg-3' -%}
{% else %}
{%- assign class = 'five-items' -%}
{%- assign rows = '5' -%}
{%- assign grid_item_width = 'col-6 col-md-4 col-lg-3 col5' -%}
{% endif %}
{% endif %}
{% if section.settings.display_related_products %}
{% if recommendations.products_count > 0 %}
{% if section.settings.related_products_title %}
###
{% render 'multilang' with section.settings.related_products_title %}
{% endif %}
{% for product in recommendations.products %}
{% render 'product-grid-item' with product as product %}
{% endfor %}
{% endif %}
{% endif %}
{% schema %}
{
"name": "Products Recomendation",
"class": "col-12",
"settings": [
{
"type": "checkbox",
"id": "display_related_products",
"label": "Display Related Products?",
"default": true
},
{
"type": "text",
"id": "related_products_title",
"label": "Title of related products block",
"default": "Related Products"
},
{
"type": "text",
"id": "number_of_related_products",
"label": "Number of related products",
"default": "8"
}
]
}
{% endschema %}
{% if settings.product_layout == "gallery" or template.suffix == 'gallery' or settings.product_layout == "full_with" or template.suffix == 'full-width' %}
{% endif %}