Magento Forum

   
Call view.phtml template
 
jagdishjoshi
Jr. Member
 
Total Posts:  5
Joined:  2012-09-13
 

Hi All,

I am new in magento i am getting issue while calling the view.phtml file in custom layout.

Folowing is my code which is i am including in cutom layout file but i am getting Fatal error “Fatal error: Call to a member function getMetaTitle() on a non-object in D:\wamp\www\projects\magento\app\code\core\Mage\Catalog\Block\Product\View.php on line 56”.

<?php echo $this->getLayout()->createBlock('catalog/product_view')->setTemplate('catalog/product/view.phtml')->toHtml(); ?>

Please reply me for this issue.

Thanks in advance.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Magikvishal
Sr. Member
 
Total Posts:  277
Joined:  2012-06-12
 

Hello
i think you can’t instantiate a Block like that
firstly we understand product page hows work & layout in app/design/package/theme/layout/catalog.xml
we can check block catalog/product_view is declared

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top