Last active
September 11, 2023 17:37
-
-
Save jshaw/8c993393dc3eec6c10d03819a164bbc4 to your computer and use it in GitHub Desktop.
Revisions
-
jshaw revised this gist
Sep 11, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ <!-- Using metafields and collections for custom product varients when using unique products, not default product varient behaviour. --> {% liquid assign product_variants = product.metafields.custom.product_variant_collection.value.products %} {% for variant in product_variants %} -
jshaw renamed this gist
Sep 11, 2023 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
jshaw revised this gist
Sep 11, 2023 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ <!-- Using metafields and collections for custom product varients when using unique products, not default product varient behaviour. --> {% liquid assign product_variants = product.metafields.custom.product_variant_collection %} -
jshaw created this gist
Sep 11, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ {% liquid assign product_variants = product.metafields.custom.product_variant_collection %} {% for variant in product_variants %} <!-- so we don't show the current product in the varient list, we do a quick compaire between the current product we are on the PDP and the varient ID in the loop --> {% if product.id != variant.id %} <li class="product-details__panel-variant-item"> <a href="{{ variant.url }}" aria-label="{{ variant.title }}" title="{{ variant.title }}"> <div class="product-details__panel-variant-image-wrapper"> {{ variant.featured_image | image_url: width: 100 | image_tag: class: "product-details__panel-variant-image", loading: "eager" }} </div> </a> </li> {% endif %} {% endfor %}