Reputation: 732
I'm using Magento 1.7
I've created a custom page layout (parallaxe.phtml)
A product is associated to this custom page layout.
I'm on the product view page, my custom layout page is showing.
I want to acces my product's informations directly from this page.
$_product = $this->getProduct();
returns null
:(
Any idea ?
Upvotes: 0
Views: 943
Reputation: 1743
I assume that your template is attached to a block of type core/template (or some other block that does not set a product variable.
You can access the product variable from registry by calling either $product = Mage::registry('current_product');
or $product = Mage::registry('product');
Upvotes: 1