Price VAT incl. and excl. on product detail page DAWM Theme

Solved

Price VAT incl. and excl. on product detail page DAWM Theme

Teddy9
Shopify Partner
144 3 38

Hi,

 

I am having a hard time getting the prices incl. and excl. VAT to show on the product page of our store. It is the DAWM theme with url: https://procardio.shop/

 

I tried to follow up this tutorial: https://community.shopify.com/c/shopify-design/product-pages-show-vat-prices-on-your-product-pages/t.... No luck at all. Can anyone please help me out with this? I will most thankfull!

httpsprocardio.shop.jpg

 

Accepted Solution (1)

BSS-Commerce
Shopify Partner
3477 464 551

This is an accepted solution.

Hi @Teddy9 

Please follow these steps:

- Step 1: At Shopify admin, Select Online Store -> Themes -> Edit Code

- Step 2: Find and open the file price.liquid:

view (24).png

- Step 3: Add this line at the top of the price.liquid file, like this:

view (25).png

{% assign tax_rate = 20 %}

- You can change the tax rate based on your tax settings in the store. Here, we set up a tax rate of 20%.

- Step 4: Press Ctrl + F, and paste this line in the search bar -> Click next:

<span class="price-item price-item--regular">

- Step 5: Change the code inside the <span> tag you just found with the following code:

{% if template == "product" %}
  {{ product.price | times: tax_rate | divided_by: 100 | plus: price | money_with_currency }} incl. {{ tax_rate }}% VAT 
<br />
  {{ money_price }} excl. {{ tax_rate }}% VAT
{% else %}
  {{ money_price }}
{% endif %}

view (26).png

- Step 6: Press Ctrl + F, and paste this line in the search bar -> Click next:

<span class="price-item price-item--sale price-item--last">

- Step 7: Change the code inside the <span> tag you just found with the following code:

{% if template == "product" %}
  {{ product.price | times: tax_rate | divided_by: 100 | plus: price | money_with_currency }} incl. {{ tax_rate }}% VAT 
<br />
  {{ money_price }} excl. {{ tax_rate }}% VAT 
{% else %}
  {{ money_price }}
{% endif %}

view (27).png

- Here is the result:

view (28).png

I hope that it will work for you.

If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here .


B2B Solution & Custom Pricing | Product Labels by BSS


Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency

View solution in original post

Replies 7 (7)

BSS-Commerce
Shopify Partner
3477 464 551

This is an accepted solution.

Hi @Teddy9 

Please follow these steps:

- Step 1: At Shopify admin, Select Online Store -> Themes -> Edit Code

- Step 2: Find and open the file price.liquid:

view (24).png

- Step 3: Add this line at the top of the price.liquid file, like this:

view (25).png

{% assign tax_rate = 20 %}

- You can change the tax rate based on your tax settings in the store. Here, we set up a tax rate of 20%.

- Step 4: Press Ctrl + F, and paste this line in the search bar -> Click next:

<span class="price-item price-item--regular">

- Step 5: Change the code inside the <span> tag you just found with the following code:

{% if template == "product" %}
  {{ product.price | times: tax_rate | divided_by: 100 | plus: price | money_with_currency }} incl. {{ tax_rate }}% VAT 
<br />
  {{ money_price }} excl. {{ tax_rate }}% VAT
{% else %}
  {{ money_price }}
{% endif %}

view (26).png

- Step 6: Press Ctrl + F, and paste this line in the search bar -> Click next:

<span class="price-item price-item--sale price-item--last">

- Step 7: Change the code inside the <span> tag you just found with the following code:

{% if template == "product" %}
  {{ product.price | times: tax_rate | divided_by: 100 | plus: price | money_with_currency }} incl. {{ tax_rate }}% VAT 
<br />
  {{ money_price }} excl. {{ tax_rate }}% VAT 
{% else %}
  {{ money_price }}
{% endif %}

view (27).png

- Here is the result:

view (28).png

I hope that it will work for you.

If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here .


B2B Solution & Custom Pricing | Product Labels by BSS


Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency
Teddy9
Shopify Partner
144 3 38

Absolutely wonderful! Thanks for this!

peterweder
Shopify Partner
2 0 0

Thank you so much for this answer.

One question I do have: what if I want to display different tax-%-amounts depending on which country the visitor is visiting the website from?

So that the visitor from Austria (who lands on our Austrian subfolder domain we have set in shopify market) sees 21%
the visitor from Germany (who lands on our German subfolder domain we have set in shopify market) sees 19%
and the visitor from Switzerland (who lands on our Swiss subfolder domain we have set in shopify market) 0% for example.

 

Do I manually have to put every country + the according %-amount in the code or is possible that some code snippet pulls the correct tax-% from Shopify automatically? 

Thank you so much in advance!

Best regards,

Peter

Zoeproduction
Shopify Partner
13 0 2

Hi Peter,

 

If you would like to make this ease for you, you can test our app https://apps.shopify.com/tax-selector which does this for you via geo location. If a customer is in Germany they will see the 19% VAT-rate for example.

 

All you need to do is set these in the app, like this - https://zoeproduction.com/blogs/guide/how-to-set-vat-rates 

 

One more benefit of using our app is that you only show one price at the time which ensures Google won't ban you because of double pricing. The customer can select if they want to see the price inclusive or exclusive VAT on your site.

 

Let me know if you have any further questions.

 

Kind regards

Adam 

Instagridnu
Visitor
1 0 0

Works really good, thank you very much!

 

1 question: on the page of product its selve, in & excl VAT is correct. But not visible in shop when you see multiple products?

Chairman_1
Visitor
2 0 0

Hi there,

 

I have tried to change the code as above but not been successful.  Does the method above still work today?  Do you provide a sevice to help me with the code?

 

M<any thnaks,

 

Best regards,

 

David

Zoeproduction
Shopify Partner
13 0 2

Hello @Teddy9 

 

I can see that you found a solution which is great!

 

I would just like to mention our app that we developed for cases like this. It's called T-Selector and it lets your customers to select if they like to see the price excluding or including VAT.

 

 

One big benefit of doing it this way is that you reduce the risk of being banned from Google merchant center and Google Shopping which will happen if they detect more than one price (two if you have a sale).

 

You can find out more about T-Selector in Shopify app store - https://apps.shopify.com/tax-selector 

 

Best regards,

Adam

www.zoeproduction.com