Solved

Calculating Ex VAT on product Pages but the calculation wont update

greeney2k1
Shopify Partner
27 0 7

Hi I have a site where all prices are showing as excluding taxes (20%)

 

I'm looking to add a second line including tax price on the product page so I have added the following code ... 

 

 

£{{ product.price | times: 1.2 | divided_by: 100 |round: 2 | precision: 2}} Including VAT

 

 



Which will calculate and show the including tax pricing of products under the normal price option. But I have found when the product has a differently priced variant the price doesn't update?  I've tried pointing it to variant.price but it doesn't change when selecting the different variants... 

Example of the page here 
https://www.onestopforsafety.co.uk/products/pure-school-lockers-with-slate-grey-body-slte-grey-3-doo...

Accepted Solution (1)

peterloane
Shopify Partner
43 5 14

This is an accepted solution.

Hi @greeney2k1 

I took a look a the docs and suggest you try using

product.selected_variant.price or

product.selected_or_first_available_variant.price

rather than variant.price

Regards
Peter

View solution in original post

Replies 6 (6)

peterloane
Shopify Partner
43 5 14

This is an accepted solution.

Hi @greeney2k1 

I took a look a the docs and suggest you try using

product.selected_variant.price or

product.selected_or_first_available_variant.price

rather than variant.price

Regards
Peter

greeney2k1
Shopify Partner
27 0 7

Thanks peter, worked a charm ... just need to figure out how to refresh the page now when selecting a new variant so the calculation updates 

peterloane
Shopify Partner
43 5 14

Cool, glad it helped you out
Which option did you go with ?
I would have expected either to update calculation on selection

Regards
Peter

greeney2k1
Shopify Partner
27 0 7

Hi Peter 

The second option worked (kind of) ... if you select the new variant and refresh the page it calculates correctly but doesnt do it live

peterloane
Shopify Partner
43 5 14

Zoeproduction
Shopify Partner
13 0 2

 

Hello @greeney2k1 

 

I hope you're doing well. I noticed that you've added an extra line displaying the price including VAT on your product pages.

 

If you're looking for a simpler and safer way to display your prices including tax, you might be interested in our app, T Selector.

 

T Selector is designed to help you manage your tax settings effortlessly.

 

One of the key features of the app is that it lets your customers switch between seeing the prices excluding or including VAT at any time.

 

This can be done through an optional pop-up or a VAT switcher in the header section of your store, depending on your preferences.

 

With T Selector, you can avoid the risk of being banned from Google Merchant Centre and Google Shopping ads.

 

Displaying prices in a way (more then one) that violates Google's policies is a common reason for ads being disapproved or accounts suspended.

 

T Selector ensures that you're compliant with Google's regulations and helps your store stand out in searches.

 

If you like to try it we offer a 7 day free trial and we implement the app for all merchants installing the app. You can look at this video where we explain more:

 

Link to the app in Shopify app store: https://apps.shopify.com/tax-selector 

 

We're confident that adding Tax Selector to your store will make pricing much easier for you and offer a more convenient shopping experience for your customers.

 

Please don't hesitate to contact us if you have any questions or need assistance with the setup.

 

Best regards,

Adam
www.zoeproduction.com