B-219 Sec-55 Noida, India

Magento – check if coupon code used

Once on the Onepage Checkout page, I need to track if the customer has used any specific coupon code. This can be checked by the checkout session.
Use this code to hunt up the coupon code. This code will return the coupon code if used or empty result.

$coupon_code = Mage::getSingleton(‘checkout/session’)->getQuote()
    echo “coupon used”;
    echo “coupon not used”;

(Visited 122 times, 1 visits today)

Leave a reply

You must be logged in to post a comment.