How to get current product ID in Admin Panel / Catalog / Manage Products / Tab ?
I have a custom product tab and no idea how to get current product ID.
In frontend I would do something like this:
<?php $_product = $this->getProduct(); ?>
<?php echo $_product->getId() ?>
If you look at Mage_Adminhtml_Catalog_ProductController
you will see the product in question twice, so either of these will work:
$product = Mage::registry('product');
echo $product->getId();
$product = Mage::registry('current_product');
echo $product->getId();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With