[Resolved] Vat tax displayed on product page

Home Forums Support [Resolved] Vat tax displayed on product page

Home Forums Support Vat tax displayed on product page

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1194453
    _blank

    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

    #1194557
    David
    Staff
    Customer Support

    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.

    #1194900
    _blank

    thank you so much. woocommerce said its linked to my theme.
    Unfortunately it shows this error: http://prnt.sc/rgdccb
    Thanks again
    best Hannah

    #1195047
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    That code is PHP, it should be added using one of these methods: https://docs.generatepress.com/article/adding-php/

    #1195264
    _blank

    Ah wonderful. Thank you so much 🙂

    #1195597
    David
    Staff
    Customer Support

    Glad we could be of help

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.