Home Forums WoodMart support forum Cart widget include tax

Cart widget include tax

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #32759

    Roving
    Participant

    Hello,

    I need to display the cart price in the cart widget including the tax.
    http://prntscr.com/hyvoxh
    http://prntscr.com/hyvp3a

    But in the cart and checkout page, I need the tax to be on a separate line, so I can’t do that from woocommerce inc,exc settings.

    So I need the cart widget to display price with tax with the tax sitting in woocommerce in exclude tax.
    http://prntscr.com/hyvr2z

    I can code if it needs so
    Thanks for your time.

    #32775

    Artem Temos
    Keymaster

    Hello,

    We are glad to know that you considered using Basel for your web-site. I hope you will be happy with it.

    Could you please send us your website link and admin access so we can check your configuration firstly and see what is wrong there?

    Kind Regards
    Xtemos

    #32778

    Roving
    Participant

    No Basel I am using woodmart.
    The password is in the private content

    #32781

    Artem Temos
    Keymaster

    It is possible only if you add some tax suffix text like incl. tax and display price with taxes on cart and checkout like this https://gyazo.com/6200c401ad3bd9b8c21c4b13206a4cd6

    #32783

    Roving
    Participant

    But I don’t want in checkout page the tax as a single total I needed only on the cart widget.
    Is it possible to code it?
    Where I can find the price calc. for the cart widget?

    #32785

    Artem Temos
    Keymaster

    The problem that the price for the cart widget and checkout page is taken from one place in WooCommerce code. You find it in the file woocommerce/includes/class-wc-cart.php

    	public function get_product_price( $product ) {
    		if ( 'excl' === $this->tax_display_cart ) {
    			$product_price = wc_get_price_excluding_tax( $product );
    		} else {
    			$product_price = wc_get_price_including_tax( $product );
    		}
    		return apply_filters( 'woocommerce_cart_product_price', wc_price( $product_price ), $product );
    	}

    Regards

    #32787

    Roving
    Participant

    Hmmm, so the best way to do what I need is to include tax everywhere.
    ok, Thanks for your help! 😀

    #32788

    Artem Temos
    Keymaster

    I guess yes, would be better to do this all over the site.

    You are welcome 🙂

Viewing 8 posts - 1 through 8 (of 8 total)