display prices for articles both in and excluding VAT

display prices for articles both in and excluding VAT

Paul_nl
Visitor
1 0 0

I want to state both the price including and excluding VAT for my articles. I have done this, however, with articles that have variants, if this does not work, the price excluding VAT and including VAT will be the same.

I have built the following into product-price.liquid, the first div is the original, the second div (pricetag02) I added myself.

<div class="price-container d-flex align-items-center flex-wrap {% if variant.unit_price_measurement %} price-container--unit-available{% endif %} {{ block_margin }}" data-price- container>
<div class="pricetag01">
<span class="js-product-price product-single__price"{% if variant.compare_at_price > variant.price %} on-sale{% endif %}
item prop="price"
content="{{ variant.price | divided_by: 100.00 }}">
{{ product.price | money }}
</span>
</div>

<div class="pricetag02">
{% assign BTW_PERCENTAGE = 0.21 %}
{ % assign price_excl_vat = product.price | times: 1.21 %}
<span class="js-product-price product-single__price include_tax"{% if variant.compare_at_price > variant.price %} on-sale{% endif %}
item prop="price"
content="{{ price_excl_vat | divided_by: 100.00 }}">
{{ price_excl_vat | money }}
</span>
</div>

 

 

Replies 2 (2)

Guleria
Shopify Partner
3159 618 887

Hello @Paul_nl ,

Here you  need a JS callback function which does the calculation on change of the variant but without reloading the page.
But if you are not familiar with JS then you may need to hire a developer to help.
btw if you want a developer you can drop me an email to discuss it further.

Thanks

- If helpful then please Like and Accept Solution.
- Want to modify or custom changes or bug fix on store Hire me. - Email: guleriathakur43@gmail.com - Skype: navrocks1 ,
- Try GEMPAGES a great page builder
- Support me PayPal

Zoeproduction
Shopify Partner
13 0 2

Hello @Paul_nl ,

 

I see that you've already implemented a solution to state both the price including and excluding VAT for your articles. However, you mentioned that when it comes to articles with variants, the price excluding VAT and including VAT may end up being the same.

 

To overcome this limitation and ensure accurate pricing, I would highly recommend using our app, T-Selector.

 

T-Selector is specifically designed to handle such scenarios effortlessly. With T-Selector, you can easily display both the price including and excluding VAT, even for products with variants.

 

Our app does work a bit differently, it lets all your customers to select if they want to see the price with or without VAT / Tax. So instead of just adding an extra price you only show one price, the correct price. And it works for all your variants.

 

The big benefit except of aesthetics is that you prevent your store from being banned from Google merchant center and Google Shopping which can happen with dual prices.

 

If you would like to try it for free for 7 days, just go to Shopify app store https://apps.shopify.com/tax-selector, install the app, answer a few questions and we'll implement the app for you. The only thing you will need to do is setting VAT-rates for each country you sell towards and translate it if you'd like to.

 

Let me know if you have any questions!

 

Br,

Adam

www.zoeproduction.com