Show Attributes on checkout page in Magento

Just go to the Admin section, select products->Attributes->Manage Attributes.

Then just click on “Add New Attribute” on the top right hand side.

Once you have added it, clear the magento cache, and edit a product.

You will see the attribute in the General tab being available for editing.

ensure you enable it for the Front End too, to display it.

The use code like below in the template that displays the item:

<?php $_item = $this->getItem()?>
<?php $_product= Mage::getSingleton('catalog/product')->load($_item->getProductId()) ?>
<?php echo $_product->getResource()->getAttribute('attribute_code')->getFrontend()->getValue($_product); ?>

Get category name in a custom product list on homepage in magento

In all magento store mostly we show any category products list at home page. for that purpose we use list.phtml file or any custom file to show product list at home page using following block:

   {{block type="catalog/product_list" category_id="3" template="catalog/product/list.phtml"}}  

This block only show products list on home page, but it don’t show category name.
For showing category name with that products list we need to add following code into list.phtml or any custom file you are using.

Go to app/design/frontend/default/your_theme/template/catalog/product and open list.phtml then paste following code :

<?php echo Mage::getModel('catalog/category')->load($this->getCategoryId())->getName(); ?>  

Get Base Url , Skin Url , Media Url , Js Url , Store Url and Current Url

Get Url in phtml files

1. Get Base Url :


2. Get Skin Url :


(a) Unsecure Skin Url :


(b) Secure Skin Url :

$this->getSkinUrl('images/imagename.gif', array('_secure'=>true));

3. Get Media Url :


4. Get Js Url :


5. Get Store Url :


6. Get Current Url


Get Url in cms pages or static blocks

1. Get Base Url :

{{store url=""}}

2. Get Skin Url :

{{skin url='images/imagename.jpg'}}  

3. Get Media Url :

{{media url='/imagename.jpg'}}

4. Get Store Url :

{{store url='mypage.html'}}