Magento get current product from registry
One of the easiest ways to get access to the current product is to use the Magento registry:
$currentproduct = Mage::registry(‘current_product’);
Once you have the product you can access the data like this:
echo $currentproduct->getName();
echo $currentproduct->getId();