Friday, March 23, 2012

How to call a .phtml block file into another .phtml file in magento

you can call a .phtml block file into another .phtml  like

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

?>

Wednesday, March 21, 2012

How to get product attribute in .phtml file


you can Access the product attribute in the .phtml file like...

<?php echo $_product->getResource()->getAttribute('Attribute_code')->getFrontend()->getValue($_product); ?>