0
votes

Can anyone please help me to display the description part from shopping cart price rule when customer apply the coupon on Magento 1.9.

This Magento get coupon description is not working form my version.

2
Can we see the code that you do have? A couple of sentences doesn't usually make a good, detailed question here. If you can expand on "not working" that is helpful too.halfer
I mean the code from tht link is not responding in magento 9.1.. Code which i used is $rule = Mage::getModel('salesrule/rule')->load($code, 'coupon_code'); if ($rule->getId()) { $description = $rule->getDescription(); }4519398
^ In the question, please - would you edit your question? There are code formatting tools too.halfer

2 Answers

0
votes

Try this code :

$coupon = Mage::getModel('salesrule/coupon');
$coupon->load($this->getQuote()->getCouponCode(), 'code');
$couponObj = Mage::getModel('salesrule/rule')->load($coupon->getRuleId());
echo $couponObj->getDescription();