
Before you proceed: The following article contains information that requires you to have some prior knowledge about coding in order to correctly implement the proposed change to your theme. If done incorrectly alterations made to your theme’s code can negatively impact your website causing visual and performance issues. Therefore, we strongly recommend that you only undertake this effort if you are completely confident that you know what you’re doing. If you have no coding experience at all, aren’t entirely comfortable following the instructions in this article or if you simply don’t understand the instructions then we recommend you instead contact us, and our coding team will complete the work for you for a set fee. |
When you have installed the trade accounts app you can configure your VAT settings in your account to determine whether product prices are shown including or excluding VAT.
However, you may want to show product pricing including and excluding VAT at the same time.
product.price & product.sale_price
The product.price and product.sale_price variables will return the price or sale price of a product either including VAT or excluding VAT, depending on the setting referred to above.
Additional variables on the product page
The following variables can be used on the product page.
product.price_including_tax
product.price_excluding_tax
product.sale_price_including_tax
product.sale_price_excluding_tax
These work irrespective of the VAT display B2B settings.
Additional variables on the basket page
The following variables can be used on the basket page.
item.price_including_tax
item.price_excluding_tax
item.sale_price_including_tax
item.sale_price_excluding_tax
These work irrespective of the VAT display B2B settings.
Basket totals
The basket.sub_total and basket.shipping values will also output according to the VAT display B2B setting.
The following variables can be used on the basket page.
sub_total_including_tax
sub_total_excluding_tax
shipping_including_tax
shipping_excluding_tax