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.
Use this code to hunt up the coupon code. This code will return the coupon code if used or empty result.
<?php
$coupon_code = Mage::getSingleton(‘checkout/session’)->getQuote()
->getCouponCode();
if($coupon_code){
echo “coupon used”;
}else{
echo “coupon not used”;
}
?>
(Visited 123 times, 1 visits today)