Skip to content

Commit

Permalink
filter out other media types
Browse files Browse the repository at this point in the history
  • Loading branch information
metamoni committed Sep 29, 2022
1 parent ac22785 commit 9bc63d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions sections/main-product.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
{%- endstyle -%}

<script src="{{ 'product-form.js' | asset_url }}" defer="defer"></script>
{% if section.settings.image_zoom %}
<script src="{{ 'magnify.js' | asset_url }}" defer="defer"></script>
{% endif %}

{%- assign first_3d_model = product.media | where: "media_type", "model" | first -%}
{%- if first_3d_model -%}
Expand Down Expand Up @@ -1033,9 +1036,6 @@
endif
-%}

{% if section.settings.image_zoom %}
<script src="{{ 'magnify.js' | asset_url }}" defer="defer"></script>
{% endif %}
{%- for media in product.media -%}
{%- liquid
if section.settings.hide_variants and variant_images contains media.src
Expand Down
4 changes: 3 additions & 1 deletion snippets/product-thumbnail.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
assign mobile_columns = 2
endif

assign image_class = 'image--' | append: section.settings.image_zoom
if media.media_type == 'image'
assign image_class = 'image--' | append: section.settings.image_zoom
endif
-%}

{%- capture sizes -%}
Expand Down

0 comments on commit 9bc63d9

Please sign in to comment.