Been working on a website where I want two prices to appear on the product page.
We're using the enterprise theme and I've managed to get it to display on the product page by amending the main-product.liquid file.
{%- when 'price' -%}
<div class="product-info__block product-info__block--sm product-price" {{ block.shopify_attributes }}>
<div class="product-info__price">
{% render 'price', product: product, use_variant: true %}
<p> {{ product.price | divided_by: 1.2 | money }} ex. VAT </p>
</div>
However, the problem I have now is that the price doesn't update when clicking on different variations that the product has, the default price does update, just not the Exc VAT price I've added in.
Any pointers? Thanks.
You can edit price.liquid
file.
assign tax_price = target.price | divided_by: 1.2
assign tax_money_price = tax_price | money
<div class="price__regular tax__price">
<span class="tax-included-price price-item price-item--regular">
{{ tax_money_price }} excluding VAT.
</span>
</div>
if any doubts please comment