Thank you for your solution. But is there a way to prevent product zoom, but not prevent play button of videos uploaded onto product page as “media” ?
When I use the solution listed here, product zoom is stopped yes. And on desktop actually I can still see and use play button on videos. But on mobile, there is no play button. It seems the coding causes the play button to be hid on video as well.
I propose a different solution than Diego_ezfy, which is, in my opinion, cleaner and also doesn’t disable anything you wouldn’t want.
Here are the steps:
In your Shopify Admin, go to O****nline Store > Themes > Actions > Edit Code
Open the product-thumbnail.liquid file under Snippets
Go to line 76 where it says
{%- liquid
case media.media_type
when 'video' or 'external_video'
render 'icon-play'
when 'model'
render 'icon-3d-model'
else
render 'icon-zoom'
endcase
-%}
Change that to
{% comment %}
{%- liquid
case media.media_type
when 'video' or 'external_video'
render 'icon-play'
when 'model'
render 'icon-3d-model'
else
render 'icon-zoom'
endcase
-%}
{% endcomment %}
{%- if media.media_type == 'video' or media.media_type == 'external_video' -%}
{%- liquid
render 'icon-play'
-%}
{%- endif -%}
{%- if media.media_type == 'model' -%}
{%- liquid
render 'icon-3d-model'
-%}
{%- endif -%}
This code block does the same as before for video and 3D models, but not for normal product images. The comment at the beginning is the original code, if you would want to revert the function back to its original way.
Go to line 111 where it says
Change that to
{% comment %}
{% endcomment %}
{%- if media.media_type == 'video' or media.media_type == 'external_video' -%}
{%- endif -%}
{%- if media.media_type == 'model' -%}
{%- endif -%}
This code block does the same as before for video and 3D models, but not for normal product images. The comment at the beginning is the original code, if you would want to revert the function back to its original way.