Archived topic
Vat tax displayed on product page
5 replies · Started by _blank on March 14, 2020
Hello,
how can I display the vat tax shipping informtion like this shop is doing: https://www.lotuscrafts.eu/collections/frontpage/products/meditationskissen-lotus-h-15cm-ohne-bestickung
Thank you very much for your help
Best
Hannah
Hi there,
the correct way would be to ensure that Woo is actually displaying the correct pricing inclusive of VAT and exclusive of shipping etc. - and then some custom development to display that - which you would need to speak with the Woo plugin author or a developer about.
If however you simply want to add that text as a suffix then you can add this PHP snippet to your site:
add_filter( 'woocommerce_get_price_suffix', 'db_woo_single_product_price_suffix', 99, 4 );
function db_woo_single_product_price_suffix( $html, $product, $price, $qty ){
// Check if producr is single
if ( ! is_product() ) {
return $html;
} else {
$price_suffix = '<span class="price-suffix"> incl. vat excl. shipping</span>';
$html .= $price_suffix;
return $html;
}
}
Let us know if the above works for you and if we can help tweak or style the output.
thank you so much. woocommerce said its linked to my theme.
Unfortunately it shows this error: http://prnt.sc/rgdccb
Thanks again
best Hannah
Hi there,
That code is PHP, it should be added using one of these methods: https://docs.generatepress.com/article/adding-php/
Ah wonderful. Thank you so much :)
Glad we could be of help