Please submit a private ticket if you need to share sensitive information, such as license details and admin credentials.

Okay
  Public Ticket #3841439
Price display
Open

Comments

  • louis started the conversation

    Hi there,

    I hope that you are well.

    I am currently in the process of building a WooCommerce site with the WPC Fly Cart plugin which is great.

    We are looking to include two prices for the products in the cart which currently does not exist for products that have been added to the cart. We need to show both the VAT included price and the VAT excluded price – currently it only shows the VAT included price.

    Thanks,

    Louis

  •  1,606
    Dustin replied

    Hi Louis,

    Please add the custom code below. (How to add custom code? ↗):

    add_filter( 'woocommerce_cart_item_price', function ( $price, $cart_item ) {
    	$price_excluding_tax = wc_get_price_excluding_tax( $cart_item['data'] );
    	$price_including_tax = wc_get_price_including_tax( $cart_item['data'] );
    
    	return wc_price( $price_excluding_tax ) . ' excl. tax | ' . wc_price( $price_including_tax ) . ' incl. tax';
    }, 99, 2 );

    And the result will be like this:

    3110016475.png

    Best regards,
    Dustin

  • louis replied

    Hi Dustin,

    I hope that you are well.

    Thank you for your reply, I appreciate it.

    This hasn't worked for the site unfortunately, here is the link to it which may be useful: https://gatevalley.staging-lw.com/.

    Thanks,

    Louis

  •  1,606
    Dustin replied

    Please ensure that you choose to show the price here:

    3882505466.png

    If it still doesn't work, please send me your website credentials (wp-admin link, username, and password) or create a dev/staging site with identical configurations so I can check for any issues.

    Best regards,
    Dustin

  • louis replied

    Hi Dustin,

    Thanks for getting back to me.

    I can confirm that the settings are set up with the price selected so here is a set of login details:

    Login at https://gatevalley.staging-lw.com/wp-admin/

    Username - supportclev 

    Password - 8tt47wjD&8P1qietZRuspWG@

    Thanks,

    Louis