From 1468e437975e151cc71b1f7262ab51572d859de7 Mon Sep 17 00:00:00 2001 From: alexanderroese Date: Tue, 18 Jun 2024 18:28:13 +0200 Subject: [PATCH] test --- snippets/shx-featured-collection.liquid | 63 +++++++++++++++++++++++++ snippets/shx-landingpage.liquid | 8 ---- 2 files changed, 63 insertions(+), 8 deletions(-) create mode 100644 snippets/shx-featured-collection.liquid diff --git a/snippets/shx-featured-collection.liquid b/snippets/shx-featured-collection.liquid new file mode 100644 index 0000000..59f6fcb --- /dev/null +++ b/snippets/shx-featured-collection.liquid @@ -0,0 +1,63 @@ +{% stylesheet %} +{{ 'component-card.css' | asset_url | stylesheet_tag }} +{{ 'component-price.css' | asset_url | stylesheet_tag }} +{{ 'component-slider.css' | asset_url | stylesheet_tag }} +{{ 'template-collection.css' | asset_url | stylesheet_tag }} +{% endstylesheet %} + +{%- liquid + assign tag_to_filter = 'your-tag' + assign columns_desktop = 4 + assign full_width = false + assign image_ratio = 'adapt' + assign image_shape = 'default' + assign show_secondary_image = false + assign show_vendor = false + assign show_rating = false + assign enable_quick_add = false +-%} + +{%- for collection in collections -%} + {%- assign filtered_products = collection.products | where: 'tags', tag_to_filter -%} + + {%- if filtered_products.size > 0 -%} +
+
+
+

+ {{ collection.title }} +

+
+ + +
    + {%- for product in filtered_products -%} +
  • + {% render 'card-product', + card_product: product, + media_aspect_ratio: image_ratio, + image_shape: image_shape, + show_secondary_image: show_secondary_image, + show_vendor: show_vendor, + show_rating: show_rating, + show_quick_add: enable_quick_add, + section_id: collection.id + %} +
  • + {%- endfor -%} +
+
+
+
+ {%- endif -%} +{%- endfor -%} diff --git a/snippets/shx-landingpage.liquid b/snippets/shx-landingpage.liquid index 3f48379..5076a19 100644 --- a/snippets/shx-landingpage.liquid +++ b/snippets/shx-landingpage.liquid @@ -1,8 +1,6 @@ {% assign videoURL = "https://cdn.shopify.com/videos/c/o/v/37f714939aef4036aa9fc14f7c18ab46.mp4" %}