*/ class Mage_Downloadable_Model_Link_Purchased_Item extends Mage_Core_Model_Abstract { const XML_PATH_ORDER_ITEM_STATUS = 'catalog/downloadable/order_item_status'; const LINK_STATUS_PENDING = 'pending'; const LINK_STATUS_AVAILABLE = 'available'; const LINK_STATUS_EXPIRED = 'expired'; const LINK_STATUS_PENDING_PAYMENT = 'pending_payment'; const LINK_STATUS_PAYMENT_REVIEW = 'payment_review'; /** * Enter description here... * */ protected function _construct() { $this->_init('downloadable/link_purchased_item'); parent::_construct(); } /** * Check order item id * * @return Mage_Core_Model_Abstract */ public function _beforeSave() { if (null == $this->getOrderItemId()) { throw new Exception( Mage::helper('downloadable')->__('Order item id cannot be null')); } return parent::_beforeSave(); } }