Adding VAT Line to product and cart pages

New Member
12 0 0

Hi,

We're using the supply theme for our website and would like to add into the display on the product and cart pages a simple way of showing the ex VAT and inc VAT prices. I've looked at the other guides about adding VAT but that was with a different theme so the code is slightly different as well. Here's the section of code for our product page:

<meta itemprop="priceCurrency" content="{{ shop.currency }}">
<meta itemprop="price" content="{{ variant.price | money }}"> 
      
      {% if settings.product_vendor_enable %}
        <p class="product-meta" itemprop="brand">{{ product.vendor }}</p>
      {% endif %}

      <ul class="inline-list product-meta">
        <li>
          <span id="productPrice" class="h1">
            {% include 'price' with variant.price %}
          </span>
          <span class="h5">
            ex VAT
          </span>
        </li>
        {% if product.compare_at_price_max > product.price %}
        <li>
          <span id="comparePrice" class="sale-tag large">
            {% assign compare_price = variant.compare_at_price %}
            {% assign product_price = variant.price %}
            {% include 'price-sale' %}
          </span>
        </li>
        {% endif %}
        {% if settings.product_reviews_enable %}
          <li class="product-meta--review">
            <span class="shopify-product-reviews-badge" data-id="{{ product.id }}"></span>
          </li>
        {% endif %}
      </ul>

I've added in another line with the following code but can't find a way to times/divide it to calculate the VAT prices. Could someone help?

 <span id="productPrice" class="h1">
            {% include 'price' with variant.price %}
          </span>

We don't include taxes in our setting section but can easily change that if it's simpler another way.

Thanks!

0 Likes
Shopify Staff
Shopify Staff
154 0 11

Supply handles pricing in a very special way :D

If you plan on consistently showing exVAT and inVAT then it's best to edit the price.liquid snippet. It's in the snippet folder.

To show both you would duplicate the code in price.liquid and add times: 1.15 (include 15% tax) in the areas marked in the image below

0 Likes
New Member
12 0 0

Hi,

Thanks for your reply, but still having some issues about where to put the code in. I've attached an image of what our price.liquid code looks like.

I've placed the '| times:1.2' in lots of places but can't get the outcome we're hoping for. Ideally it'll be an an exactly copy of what is already shown in the image but underneath the existing price and exVAT. 

Thanks for your help.

0 Likes
New Member
12 0 0

There's a better image

0 Likes
New Member
1 0 0
Is it possible to have inc VAT and ex VAT displayed at all times throughout the checkout process?

I’m concerned that the 2 prices will disappear from the cart onwards
0 Likes