Help Needed.How to change compare at price and image on varient choice??

Highlighted
New Member
4 0 0

I am new to shopify. please help me to change compare at price and image on variant choice.I am using Gmart-01 theme.
when i choose any variant my stores image and compare price are not changing variant wise.
here is the code from product.liquid for image

<div class="{{ mid_width }} second">
<div itemscope itemtype="http://schema.org/Product" class="single-product-layout-type-1">
<meta itemprop="url" content="{{ shop.url }}{{ product.url }}">
<meta itemprop="image" content="{{ product.featured_image.src | img_url: '850x' }}">
<div class="product-single">

<div class="grid__item wide--one-half post-large--one-half large--one-half product-img-box">
{% if product.images.size == 0 %}
<div class="product-photo-container">
<img src="{{ '' | product_img_url: '850x' }}" alt="">
</div>
{% else %}
<div class="product-photo-container">
{% assign featured_image = product.selected_or_first_available_variant.featured_image | default: product.featured_image %}
<a href="{{ featured_image | img_url: 'master' }}" >
<img id="product-featured-image" src="{{ featured_image | img_url: '850x' }}" alt="{{ featured_image.alt | escape }}" data-zoom-image="{{ featured_image.src | img_url: 'master' }}"/>
</a>
</div>

{% if product.images.size > 0 %}
<div class="more-view-wrapper {% if product.images.size == 1 %} hidden {% endif %} more-view-wrapper-owlslider ">
<ul id="ProductThumbs" class="product-photo-thumbs owl-carousel owl-theme">
{% for image in product.images %}
<li class="grid-item">
<a href="javascript&colon;void(0)" data-image="{{ image.src | product_img_url: '850x' }}" data-zoom-image="{{ image.src | product_img_url: 'master' }}">
<img src="{{ image.src | product_img_url: 'medium' }}" alt="{{ image.alt | escape }}">
</a>
</li>
{% endfor %}
</ul>
<div class="single-page-owl-carousel"></div>
</div>

and compare at price

 {% if product.compare_at_price_max > product.price %}
           {{ product.compare_at_price | money }}
            {% endif %}

 



0 Likes
Highlighted
Astronaut
1084 178 213

Hello,

Thank you for your question. 

Please share your store URL, page URL and also password (if your store has one), I'll help you out to the best of my ability.

Kind regards,
Diego

◦ Problem Solved? ✔️ Please click on Accept as Solution and like.
◦ Hire me! Recommended by 25+ customers on Facebook. Click here to read their reviews.
◦ Contact me at: diego.boarutto.fortes@gmail.com
1 Like
Highlighted
Highlighted
New Member
4 0 0
please help me
0 Likes