variant & price load in shopify

460 views Asked by At

Product price for default variant is working.When i change variant "Inc VAT" is not changing automatically. I want to change product price automatically, when i will change variant of a product. See the store- https://woodies-timber.myshopify.com/products/bendi-ply-long-grain

<div class="price dvt-vat">
                  {%- include 'limited-offer' -%}
                  <div id="price">
                    {%- if product.available -%}
                    <span class="price-new money">{{current_variant.price | money}}</span>
                    {%- if current_variant.compare_at_price > current_variant.price -%}
                    <span class="price-old money">{{current_variant.compare_at_price | money}}</span>
                    {%- endif -%}
                    {%- else -%}
                    <span class="price-old">{{'products.product.sold_out' | t}}</span>
                    {%- endif -%}
                  </div>
                  <span class="exl-vat">Exl VAT</span>

                    {% assign dvt_price = current_variant.price  %}
                    {% assign dvt_price_prat = current_variant.price | times :20 | divided_by :100 | plus: current_variant.price | money %}
                    <br>
                    <span class="price-new money dvt_price_totlal">{{ dvt_price_prat }}</span>
                    <span class="exl-vat">Inc VAT</span>


                </div>
0

There are 0 answers