4

I want to know how to get current product id and quantity on view.phtml.

12
$product = Mage::registry('current_product');
$id = $product->getId();
$qty = $product->getStockItem()->getQty();
  • I mean can you tell me how to get current product id to own ProductController – lxkn Jan 11 '17 at 20:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.