• Hi everyone,

    I’m trying to display coupon value on the cart page.

    Eg: I made a 50% coupon. When i purchase something, the cart only show “-200€”. I would like to show something like “-200€ (-50%)”. I’ve tried to do it by modifying “cart-total.php” : adding “echo $coupon_value;” and other things but none of them worked.

    Is there a way to achieve my goal ? Maybe with a hook ? but i have no idea how to proceed.

    In advance, thanks you, and sorry for my english.

    https://www.ads-software.com/plugins/woocommerce/

Viewing 1 replies (of 1 total)
  • Thread Starter riri91

    (@riri91)

    Here again just to says i found a solution, if someone needs the same feature.

    In “cart-total.php”, add “<?php echo $coupon->amount; ?>” under those lines:

    “<?php foreach ( WC()->cart->get_coupons( ‘order’ ) as $code => $coupon ) : ?>”

    “<?php foreach ( WC()->cart->get_coupons( ‘cart’ ) as $code => $coupon ) : ?>”

Viewing 1 replies (of 1 total)
  • The topic ‘Display coupon value on cart’ is closed to new replies.