Magento Functions

Posted: May 16, 2013 in Magento2

To Call cms static block in phtml file :
<?php echo $this->getLayout()->createBlock(‘cms/block’)->setBlockId(‘footer_links’)->toHtml() ?>

To Call Image Path :
{{skin url=’images/media/about_us_img.jpg’}}

To get Image,Javascript or css path from yout skin folder :

To call child block in phtml file :
getChildHtml(‘topLinks’) ?>

Get Sku :
<?php echo $_product->getSku() ?>

Add Home Page New Product :
{{block type=”catalog/product_new” name=”” alias=”product_homepage” products_count=”16″ template=”catalog/product/new.phtml”}}


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s