*/ class Mage_Downloadable_Block_Sales_Order_Email_Items_Downloadable extends Mage_Sales_Block_Order_Email_Items_Default { protected $_purchased = null; /** * Enter description here... * * @return unknown */ public function getLinks() { $this->_purchased = Mage::getModel('downloadable/link_purchased') ->load($this->getItem()->getOrder()->getId(), 'order_id'); $purchasedLinks = Mage::getModel('downloadable/link_purchased_item')->getCollection() ->addFieldToFilter('order_item_id', $this->getItem()->getOrderItem()->getId()); $this->_purchased->setPurchasedItems($purchasedLinks); return $this->_purchased; } public function getLinksTitle() { if ($this->_purchased->getLinkSectionTitle()) { return $this->_purchased->getLinkSectionTitle(); } return Mage::getStoreConfig(Mage_Downloadable_Model_Link::XML_PATH_LINKS_TITLE); } public function getPurchasedLinkUrl($item) { return $this->getUrl('downloadable/download/link', array( 'id' => $item->getLinkHash(), '_store' => $this->getOrder()->getStore(), '_secure' => true, '_nosid' => true )); } }