In Magento Enterprise, the "remove gift card" link in the cart sits in the total.phtml file. I would like to move this code to the block.phtml file so I can make it a text link based on our revised cart layout. If I move the code over as-is I get the following error: Fatal error: Call to a member function getGiftCards() on a non-object The line in question is $_cards = $this->getTotal()->getGiftCards();and I know the issue is that the getTotal() part of the object call is not recognized. If I bring it to $_cards = $this->getGiftCards();the page will load with no error but the gift card code is not passed. What is the proper object I should be calling here to get getGiftCard() to work or is there a different way for me to get all the gift cards attached to a quote in the block.phtml file? Just to clarify, this is the Magento Enterprise Gift Card module and not the unirgy gift card module.
CLoser but now I get this error: Call to a member function getGiftCards() on a non-object in app/code/core/Enterprise/GiftCardAccount/Helper/Data.php on line 37
You are supposed to call "getCards" maybe?
I don't think so because this line is pulled out of the class of GetCards. My feeling is that I need the equivalent Mage::helper call for getTotals().
Does the same as $_cards = $this->getGiftCards(); No error but no results either.
Try Oğuz Çelikdemir's code below.