when you want to add .phtml file in other phtml file then you can use following code.
<?php echo $this->getLayout()->createBlock('catalog/product_price_template')->setTemplate('catalog/product/view/tierprices.phtml')->toHtml();?>
when You need to set Data in phtml file when block is create like above. you can add folllowing code.
->setData('product', $_product);
you can use this like
$this->getLayout()->createBlock('catalog/product_price_template')->setTemplate('catalog/product/view/tierprices.phtml')->setData('product', $_product)->toHtml();?>
No comments :
Post a Comment