I currently call a custom phtml file in CMS pages to display a single product with description, price etc.

 {{block type="catalog/product" product_id="7160" template="catalog/product/dynamic-product-image_howto.phtml"}}

I'm trying to include this in a custom widget - is it possible to call in phtml?


not sure if this is what you need, but give it a try.
In the phtml for your widget do this:

$block = Mage::app()->getLayout()->createBlock('catalog/product')->setProductId(7160)

echo $block->toHtml();
  • @Marius : How I can call a widget in .phtml file. I have a widget which is pre configured by the theme and I need to show it on my custom .phtml template. How I can do this. I have tried this Link but not working – mudit mehrotra Sep 29 '16 at 8:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.