Get productID of the product being edited in Magento -
Get productID of the product being edited in Magento -
is there way, in magento, productid of product beingness edited on admin backend?
i found this:
mage::registry('current_product');
but doesn't seem 1 beingness edited.
edit: if makes difference, i'm trying extension listening event:
catalog_product_gallery_upload_image_after
the current product's id in url. can retrieve parameter so:
$productid = mage::app()->getrequest()->getparam('id');
if want load product object, store id , use
$product = mage::getmodel('catalog/product')->load($productid);
edit: looks you're using observer. observer file assume not extend part of magento. (is file? http://svn.magentocommerce.com/source/branches/1.7/app/code/core/mage/adminhtml/controllers/catalog/product/gallerycontroller.php) seek obtaining action , getting request way
$action = $observer->getaction(); $productid = $action->getrequest()->getparam('id');
magento
Comments
Post a Comment