{%- comment -%} F15: "Festival offers / Bundle & save" strip, up to 8 offers with Homepage on. Place it right after the hero. {%- endcomment -%} {%- assign data = app.metafields.bundle_offers.storefront.value -%} {%- assign country = localization.country.iso_code -%} {%- capture cards -%} {%- assign n = 0 -%} {%- for offer in data.offers -%} {%- if n >= 8 -%}{%- break -%}{%- endif -%} {%- if offer.f[0] != 1 -%}{%- continue -%}{%- endif -%} {%- if offer.cc.size > 0 -%}{%- unless offer.cc contains country -%}{%- continue -%}{%- endunless -%}{%- endif -%} {%- assign n = n | plus: 1 -%}
  • {% render 'bo-card', offer: offer %}
  • {%- endfor -%} {%- endcapture -%} {%- if cards != blank -%}
    {%- assign heading = block.settings.heading -%} {%- if heading == blank -%}{%- assign heading = 'bundle_offers.strip.heading' | t -%}{%- endif -%}

    {{ heading }}

    {%- if block.settings.subheading != blank -%}

    {{ block.settings.subheading }}

    {%- endif -%}
    {{ 'bundle_offers.strip.view_all' | t }}
    {%- endif -%} {% schema %} { "name": "Bundle offers strip", "target": "section", "settings": [ { "type": "text", "id": "heading", "label": "Heading", "default": "Festival offers" }, { "type": "text", "id": "subheading", "label": "Subheading", "default": "Bundle & save" }, { "type": "url", "id": "all_url", "label": "\"View all\" link (default: /apps/bundles)" } ] } {% endschema %}