How to get Applied Coupon code detail in Magento2

How to get Applied Coupon code detail in Magento2:
We will get the applied shopping cart coupon code in magento2 with below script. Below script

will help full to show the applied coupon code & applied coupon amount. Add below script

with your cart page related files & check.

$getCouponObj = $block->getLayout()
->createBlock('Magento\Checkout\Block\Cart\Coupon');

 echo $getCouponObj->getCouponCode(); //applied coupon code

 echo $getCouponObj->getAmount(); //applied coupon amount

CORNER OF BLOG:

“Save Tree Save Life”

Leave a Reply