Guest User

Untitled

a guest
Dec 18th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. class YourCompany_YourModule_Block_Options extends Mage_Core_Block_Abstract
  2. {
  3. public function getStockMaximumQty()
  4. {
  5. $product = $this->getProduct();
  6.  
  7. return $this->getProduct()->getStockItem()->getQty();
  8. }
  9.  
  10. public function getProduct()
  11. {
  12. if(!$this->product){
  13. $this->product = Mage::registry('current_product');
  14. }
  15. return $this->product;
  16. }
  17. }
Add Comment
Please, Sign In to add comment