/**
  * Return Links Section Title for order item
  *
  * @return string
  */
 public function getLinksTitle()
 {
     if ($this->_purchasedLinks->getLinkSectionTitle()) {
         return $this->_purchasedLinks->getLinkSectionTitle();
     }
     return Mage::getStoreConfig(Faett_Package_Model_Link::XML_PATH_LINKS_TITLE);
 }
 /**
  * Returns the product ID for handling
  * the serialz for.
  *
  * @return integer The ID of the product
  */
 protected function _getProductId()
 {
     return $this->_linkPurchased->getProductId();
 }
示例#3
0
 /**
  * Return url to download link
  *
  * @param Faett_Package_Model_Link_Purchased $linkPurchased
  * @return string
  */
 public function getDownloadUrl(Faett_Package_Model_Link_Purchased $linkPurchased)
 {
     return $this->getUrl('*/download/link', array('id' => $linkPurchased->getSerialz(), '_secure' => true));
 }
 /**
  * Create and return a hash for the download link.
  *
  * @return string The requested hash
  */
 public function serialz()
 {
     // encrypt the hash for the download link
     return Mage::helper('core')->getEncryptor()->encrypt(microtime() . $this->_linkPurchased->getCustomerId() . $this->_linkPurchased->getProductId() . $this->_linkPurchased->getPurchasedId());
 }