-------------------------------------------------------------------------------------------
SHOPIFY CLOUD ZOOM theme.liquid
READMORE:
ADD CLOUD ZOOM SHOPIFY
https://youtu.be/9f9nvtoqou0
https://shopifyjs.blogspot.com/2021/03/zoom-plugin-click-and-change-image-and.html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js" type="text/javascript"></script>
<script src="https://cdn.shopify.com/s/files/1/1279/4771/t/3/assets/plugins.min.js?v=10319623023739347280" type="text/javascript"></script>
-------------------------------------------------------------------------------------------
<html>
<head>
{{'vendor.js' | asset_url | script_tag }}
<!-- VENDOR FILE = JQUERY + DEBOUNCE FILES -->
{{'plugins.min.js' | asset_url | script_tag }}
{{content_for_header }}
<body>
{{content_for_layout}}
</body>
</html>
---------------------------------------------------------------------------
SHOPIFY CLOUD ZOOM product-template.liquid
'plugins.min.js' CLOUD ZOOM CLASS FOR IMAGE ELEVATE ZOOM AND THUMBLINK CLASS FOR CHANGE IIMAGE
---------------------------------------------------------------------------
{% assign featured_image = current_variant.featured_image | default: product.featured_image %}
<a href="{{ featured_image | img_url: 'master' }}" class="cloud-zoom" title="{{product.title}}" data-rel="useWrapper: false, showTitle: false, zoomWidth:'auto', zoomHeight:'auto', adjustY:0, adjustX:10">
<img src="{{ featured_image | img_url: 'grande' }}" alt="{{ featured_image.alt | escape }}">
</a>
{% for image in product.images %}
<a href="{{ image.src | img_url: 'master' }}" class="thumb-link" data-rel="{{ image.src | img_url: 'grande' }}">
<img src="{{image.src | img_url: 'compact' }}" alt="{{ image.alt | escape }}">
</a>
{% endfor %}---------------------------------------------------------------------------------------------
OR USE THIS CODE
<script type="text/JavaScript" src="{{'zoom.js'|asset_url}}"></script>https://shopifyjs.blogspot.com/2021/03/zoom-plugin-click-and-change-image-and.html
---------------------------------------------------------------------------------------------
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js" type="text/javascript"></script>
<script type="text/JavaScript" src="{{'zoom.js'|asset_url}}"></script>{{'zoom.js' | asset_url | script_tag }} {% assign featured_image = current_variant.featured_image | default: product.featured_image %}<a href="{{ featured_image | img_url: 'master' }}" class="cloud-zoom" title="{{product.title}}" data-rel="useWrapper: false, showTitle: false, zoomWidth:'auto', zoomHeight:'auto', adjustY:0, adjustX:10"><img src="{{ featured_image | img_url: 'grande' }}" alt="{{ featured_image.alt | escape }}">{% for image in product.images %}<a href="{{ image.src | img_url: 'master' }}" class="thumb-link" data-rel="{{ image.src | img_url: 'grande' }}"><img src="{{image.src | img_url: 'compact' }}" alt="{{ image.alt | escape }}">
---------------------------------------------------------------------------------------------
OR USE THIS CODE
https://community.shopify.com/c/Shopify-Design/Adding-Cloud-Zoom-with-jQuery-to-Supply-theme/td-p/199319
---------------------------------------------------------------------------------------------
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/JavaScript" src="https://www.professorcloud.com/js/cloud-zoom.1.0.2.js"></script>
font-family:Arial, Helvetica, sans-serif;
position:absolute !important;
border:4px solid #ccc;
{% for image in product.images %}{% if forloop.first %} <!-- IF FOR LOOP LINE STOP IMAGE REPEAT --><a href="{{image | product_img_url: 'original' }}" class="cloud-zoom" id="zoom1" rel="adjustX: 25, adjustY: 0"><img src="{{image | product_img_url: 'large' }}" alt="{{ product.title | escape }}" /><a href="{{image | product_img_url: 'original' }}" class='cloud-zoom-gallery' rel="useZoom: 'zoom1', smallImage: '{{ image | product_img_url: 'large' }}'"><img src="{{image | product_img_url: 'small' }}" alt="{{ product.title | escape }}" />----------------------------------------------------------------------------------
OR USE THIS CODE
----------------------------------------------------------------------------------
{% assign featured_image = current_variant.featured_image | default: product.featured_image %}<a href="{{featured_image | product_img_url: 'original' }}" class="cloud-zoom" id="zoom1" rel="adjustX: 25, adjustY: 0"><img src="{{featured_image| product_img_url: 'large' }}" alt="{{ product.title | escape }}" />{% for image in product.images %}<a href="{{image | product_img_url: 'original' }}" class='cloud-zoom-gallery' rel="useZoom: 'zoom1', smallImage: '{{ image | product_img_url: 'large' }}'"><img src="{{image| product_img_url: 'small' }}" alt="{{ product.title | escape }}" />{% endfor %}----------------------------------------------------------------------------------
CLOUD ZOOM CODE
----------------------------------------------------------------------------------
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/JavaScript" src="https://www.professorcloud.com/js/cloud-zoom.1.0.2.js"></script>
<a href='https://dummyimage.com/768x1024/E1F0/000.jpg' class = 'cloud-zoom' id='zoom1'
rel="adjustX: 10, adjustY:-4, softFocus:true">
<img src="https://dummyimage.com/240x320/E1F0/000.jpg" alt='' align="left" title="Optional title display" />
</a>
<a href='https://dummyimage.com/768x1024/E1F0/000.jpg' class='cloud-zoom-gallery' title='Thumbnail 1'
rel="useZoom: 'zoom1', smallImage: 'https://dummyimage.com/240x320/E1F0/000.jpg' ">
<img src="https://dummyimage.com/48x64/E1F0/000.jpg" alt = "Thumbnail 1" /></a>
<a href='https://dummyimage.com/768X1024/F00/000.jpg' class='cloud-zoom-gallery' title='Thumbnail 2'
rel="useZoom: 'zoom1', smallImage: 'https://dummyimage.com/240X320/F00/000.jpg' ">
<img src="https://dummyimage.com/48x64/F00/000.jpg" alt = "Thumbnail 2" /></a>
<a href='https://dummyimage.com/768x1024/0dfa/000.jpg' class='cloud-zoom-gallery' title='Thumbnail 3'
rel="useZoom: 'zoom1', smallImage: 'https://dummyimage.com/240x320/0dfa/000.jpg' ">
<img src="https://dummyimage.com/48x64/0dfa/000.jpg" alt = "Thumbnail 3" /></a>
----------------------------------------------------------------------------------
CLOUD ZOOM CODE CHANGE FOR SHOPIFY
----------------------------------------------------------------------------------
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
{{ 'cloud-zoom.1.0.2.js' | asset_url | script_tag }}font-family:Arial, Helvetica, sans-serif;
position:absolute !important;
Accurate and informative. Thanks for sharing this.
ReplyDeleteWe have a special team for Shopify developers who are well-versed with the interface and all its features. To initiate an online business, you need an expert website developer who can build your eCommerce website/store from scratch.
Shopify Development Services.