To get the current product id

$product_id = $this->getProduct()->getId();

When you don’t have access to $this, you can use Magento registry:
 
$product_id = Mage::registry('current_product')->getId();

Comments

Popular Posts

Magmi Single and Multiple Category Importer