Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
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...
Solved! Go to the solution
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
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
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
Cool, glad it helped you out
Which option did you go with ?
I would have expected either to update calculation on selection
Regards
Peter
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
Hi @greeney2k1
Check this out then
https://community.shopify.com/c/shopify-design/need-a-page-refresh-everytime-a-variant-changes-to-ge...
it looks like what you are trying to do
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,
As 2024 wraps up, the dropshipping landscape is already shifting towards 2025's trends....
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024