Public Member Functions | |
__construct () | |
isShow () | |
getUrl ($route= '', $params=array()) |
Definition at line 35 of file Stock.php.
__construct | ( | ) |
Constructor
By default is looking for first argument as array and assignes it as object attributes This behaviour may change in child classes
Reimplemented from Varien_Object.
Definition at line 37 of file Stock.php.
00038 { 00039 parent::__construct(); 00040 $this->setTemplate('productalert/stock.phtml'); 00041 }
getUrl | ( | $ | route = '' , |
|
$ | params = array() | |||
) |
Generate url by route and parameters
string | $route | |
array | $params |
Reimplemented from Mage_Core_Block_Abstract.
Definition at line 57 of file Stock.php.
00058 { 00059 return Mage::helper('productalert')->getSaveUrl('stock'); 00060 }
isShow | ( | ) |
Definition at line 43 of file Stock.php.
00044 { 00045 if (!Mage::getStoreConfig('catalog/productalert/allow_stock')) { 00046 return false; 00047 } 00048 00049 if (!$product = Mage::helper('productalert')->getProduct()) { 00050 return false; 00051 } 00052 /* @var $product Mage_Catalog_Model_Product */ 00053 00054 return !$product->isSaleable(); 00055 }