Search This Blog

Monday, 22 October 2012

Magento: Programtically Cancel the coupon code on the shopping cart

$quote = Mage::getSingleton('checkout/session')->getQuote();
$oldCouponCode = $quote->getCouponCode();
if (strlen($oldCouponCode)) {
    $quote->setCouponCode('')->collectTotals()->save();
}

No comments:

Post a Comment