更新时间:2023-11-29 22:28:52
如果您查看Mage_Adminhtml_Catalog_ProductController
,您将看到有问题的产品两次,因此这两种方法都可以使用:
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();