Example #1
0
 /**
  * Retreive gift cards applied to current order
  *
  * @return array
  */
 public function getGiftCards()
 {
     $result = array();
     $source = $this->getSource();
     if (!$source instanceof Mage_Sales_Model_Order) {
         return $result;
     }
     $cards = Mage::helper('enterprise_giftcardaccount')->getCards($this->getOrder());
     foreach ($cards as $card) {
         $obj = new Varien_Object();
         $obj->setBaseAmount($card['ba'])->setAmount($card['a'])->setCode($card['c']);
         $result[] = $obj;
     }
     return $result;
 }