To load a coupon by code, pass ‘code’ as 2nd param to load(). Then you can get the proper rule instance by using the rule_id value of your coupon instance:
$oCoupon = Mage::getModel(‘salesrule/coupon’)->load($couponCode, ‘code’); $oRule = Mage::getModel(‘salesrule/rule’)->load($oCoupon->getRuleId()); var_dump($oRule->getData());
(Visited 457 times, 1 visits today)