Created
December 31, 2011 04:12
-
-
Save drewgillson/1542838 to your computer and use it in GitHub Desktop.
Magento - applyCouponEvent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function applyCouponEvent($observer){ | |
$coupon_code = trim(Mage::getSingleton("checkout/session")->getData("coupon_code")); | |
if ($coupon_code != ''){ | |
Mage::getSingleton('checkout/cart')->getQuote()->setCouponCode($coupon_code)->save(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment