1

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?

1 Answer 1

1

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)
       ->setTemplate('catalog/product/dynamic-product-image_howto.phtml');

echo $block->toHtml();
1
  • @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 Commented Sep 29, 2016 at 8:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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