0
$coupon = Mage::getModel('salesrule/coupon');
$couponCollection = $coupon->getCollection();
foreach($couponCollection as $c){
echo 'Code:'.$c->getCode().'--->Discount Amount:'.$c->getDiscountAmount().'<br />';
}

Found this piece somewhere here on stackoverflow. The discount amount is not showing.. Can somebody help me get this value ?

Kurdt94
  • 95
  • 2
  • 12

1 Answers1

0

Change:

$coupon = Mage::getModel('salesrule/coupon');

to:

$coupon = Mage::getModel('salesrule/rule');

getDiscountAmount doesn't exist in /app/code/core/Mage/SalesRule/Model/Coupon.php but does show up in /app/code/core/Mage/SalesRule/Model/Rule.php

seanbreeden
  • 6,104
  • 5
  • 36
  • 45