/** * Get the total amount to be redeemed from gift cards, formatted as currency. * @return string */ protected function _getAppliedGiftCardTotal() { $appliedTotal = 0.0; foreach ($this->_giftCardContainer->getUnredeemedGiftCards() as $card) { $appliedTotal += $card->getAmountToRedeem(); } return $this->_coreHelper->currency($appliedTotal, true, false); }
/** * Before collecting totals, empty any expected amounts to redeem from cards. * @param Varien_Event_Observer $observer unused; only here to maintain signature * @return self * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function resetGiftCardTotals(Varien_Event_Observer $observer) { foreach ($this->_giftCardContainer->getUnredeemedGiftCards() as $card) { $card->setAmountToRedeem(0.0); } return $this; }
/** * Get the cards for this cart * @return SplObjectStorage */ protected function getGiftCards() { return $this->_giftCardContainer->getUnredeemedGiftCards(); }
/** * Get all gift cards redeemed for the order. * * @return SPLObjectStorage */ public function getGiftCards() { return $this->giftcardContainer->getRedeemedGiftCards(); }