Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class YourCompany_YourModule_Block_Options extends Mage_Core_Block_Abstract
- {
- public function getStockMaximumQty()
- {
- $product = $this->getProduct();
- return $this->getProduct()->getStockItem()->getQty();
- }
- public function getProduct()
- {
- if(!$this->product){
- $this->product = Mage::registry('current_product');
- }
- return $this->product;
- }
- }
Add Comment
Please, Sign In to add comment