How to edit Product.liquid to show "Ex. Vat" on Product Prices?

New Member
3 0 0

Hi,

I am using the District Theme and need the prices of products to display "Ex. Vat" after them. I have managed to achieve this on the home page and collection pages by editing the product-grid-item.liquid file.

www.offshore-safety.co.uk

The problem I am having is trying to display it on the product page. I have added the additional text to the product.liquid file in the most obvious places that I can see: 

 <div class="selection-wrapper price">
              <span class="money" id="ProductPrice" itemprop="price" content="{{ current_variant.price | money_without_currency | remove: ','}}">{{ current_variant.price | money }} Ex.Vat</span>
              {% if product.compare_at_price_max > product.price %}
                <p id="ComparePrice">
                  {{ 'products.product.compare_at' | t }} <span class="money">{{ current_variant.compare_at_price | money }} Ex. Vat</span>
                </p>
              {% endif %}
            </div>

The Ex. Vat test flashes up after the price for a brief moment as the page loads but then disappears. I have used Chrome inspector and my added text is not showing, yet if I type in the text before the closing </span> tag (in inspector) it displays. 

Does anybody know how to get it to display correctly and let me know where I am going wrong or missing?.

Many thanks,

Gordon

0 Likes
Shopify Staff
Shopify Staff
97 0 21

Hey Gordon,

David here, Shopify Guru!

I've taken a look at your theme it looks as though the disappearing "Ex. Vat" is happening due to the javascript in the selectCallback function so you could reach out to your theme developer about this.

However, a workaround for the time being would be to add a new <span> tag after the price and include the "Ex Vat" there! So instead of having it within the span class="money", you could just set it up like so:

<span class="money" id="ProductPrice" itemprop="price" content="{{ current_variant.price | money_without_currency | remove: ','}}">{{ current_variant.price | money }}</span><span>Ex.Vat</span>

Hope that helps, feel free to drop us a line at support@shopify.com if you have any other questions. 

David Mc | Shopify Guru

 

1 Like
New Member
3 0 0

Hi David,

Thank you for that. It seems so simple now!! I am not the most proficient coder and I think I can go a bit blind after a while of looking at someone else's code!!

Thanks again for your help.

0 Likes
New Member
6 0 0

Hi Guys!

 

Sorry for digging up the old thread but I am trying to find information on how to add "excl. vat" as well to my prices.

I use one of the standard "Debut" themes for my www.biostraws.ie 

It's B2B mostly and after contacting authority, they have confirmed that I do not require to show inc. VAT prices until checkout. But, it needs to state clearly that the price is excl. vat.

Any tips please?

Thank you in advance,
Konrad

0 Likes
Shopify Partner
70 3 7

Hello Konrad,

 

I think I can be helpful to make it simple for you. I assume you know where to locate a file and also I have used the latest files of Debut theme if you don't find the following file you can email me directly I will help you to do manually myself by accessing your store.

In Debut theme, you will find a product-price.liquid file in the Snippets folder

There are some code at almost bottom as below if you see in these codes I already have added 'Ex. Vat' so all you need is to find these codes and add the text just like I have added here. 


Actually, I will better show you screenshot with marked 'Ex Vat' text.

Top Rated on Upwork | An individual Shopify developer
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Need more help?
Feel free to send me a direct message or drop an email ecom@gajendra-d.com
Website | Email | LinkedIn | Twitter
0 Likes
New Member
16 0 0

Hi Gajendra

I'm using the Minimal theme, and cannot seem to find the part where I'd need to place the 'Excl VAT' info.

Could you point me in the right direction please?!

I need it to show on the Collection page AND the Product page... if possible?! 

Thanks

Steve

0 Likes