Change column-layout of contact form in Magento

Here is simple method to do it :

1. Find contacts.xml in the base layout folder
2. Copy the contacts.xml in your theme layout folder
app/design/frontend/default/your theme folder/layout/

and then find below code around line 41

and you can change layout as you need.

How to edit Email Templates in Magento

To create a new Email Template you have to go to
admin –> system –> transactional emails –> add new template –>
choose the base template from the drop down and edit as you want.

Then you can assign the newly created template to proper functionality. For e.g. if you want to assign new tempalte for New Order confirmation email then you can assign as follows.
Go to admin –> system –> configuration –> Sales (in left section) –> Sales Emails –> Order

Then select new template in “New Order Confirmation Template” and “New Order Confirmation Template for Guest” dropdwons.

Finally you have to clear cache then it will work.

Remove breadcrumb from homepage in Magento

To remove breadcrumb from homepage in Magento

Try adding this to the layout update of your home cms page:
<remove name=”breadcrumbs” />

then clear cache and that’s done!

Remove Breadcrumbs from all pages in magneto

To remove breadcrumbs from all pages in magneto. Just go to

app/design/frontend/default/your theme name/layout/

Open file page.xml and you have to just comment below code around line 82

<!– <block type=”page/html_breadcrumbs” name=”breadcrumbs” as=”breadcrumbs”/> –>

Then upload file and remove cache.

How to limit the number of products on home page in Magento

Check your products count and limit to how many products to display on home page.You will have to check to list.phtml file make below changes. Suppose you want to show 4 coloumns and 12 products on the home page.

<?php $_collectionSize = $_productCollection->count() ?>
<?php $_columnCount = $this->getColumnCount(); $_columnCount=4; ?>
<?php $count = 0;?>
<?php $i=0; foreach ($_productCollection as $_product): $count++; ?>
<?php if($count <= 12): ?>

and add <?php endif ?>

before foreach end at the around line 91

Top navigation as submenu in magento

If you would like to show your magento store categories like as in picture then you are on right place.
navigation_as_submenu

Replace this code in topmenu.phtml

<?php $_menu = $this->getHtml(‘level-top’) ?>
<?php if($_menu): ?>
<div class=”nav-container”>
<ul id=”nav”>
<?php echo $_menu ?>
</ul>
</div>
<?php endif; ?>

with below

<?php $_menu = $this->getHtml(0,’level-top’) ?>
<?php if($_menu): ?>
<div class=”nav-container”>
<ul id=”nav”>
<li class=”level0 nav-1 first level-top parent” id=”home”>
<a class=”level-top” href=”<?php echo Mage::getBaseUrl();?>”>
<span>Home</span></a>
</li>
<li class=”level0 nav-1 first last level-top parent” id=”products”>
<a class=”level-top”><span>Products</span></a>
<ul class=”level0″>
<?php echo $_menu ?>
</ul>
</li>
<li class=”level0 nav-1 last level-top parent” id=”contact_us”>
<a class=”level-top” href=”<?php echo Mage::getBaseUrl().’contacts’;?>”>
<span>Contact Us</span></a>
</li>
</ul>
<?php endif ?>

Exclude categories in magento top navigation

We can achive this using below code

<?php $cats = Mage::getModel(‘catalog/category’)->load(2)->getChildrenCategories();
?>
<ul>
<?php foreach($cats as $category): ?>
<?php if (!in_array($category->getId(), array(6,7,8,9))) : ?>
<li>
<a href=”getUrl() ?>”><span>getName() ?></span></a>
</li>
<?php endif; ?>
<?php endforeach; ?>

</ul>

Note : 6,7,8,9 are the categories which you want to execlude, you should replace with yours

Remove callouts (sidebar banners) in Magento

Left Callout banner (the dog)

Find in app/design/frontend/*/*/layout/catalog.xml

Right Callout banner (back to school)

Find in app/design/frontend/*/*/layout/catalog.xml

Show more than 5 “New Products” to the home page in magento

We have two methods for doing this. The first one is below

Go to CMS –> Pages –> Home page in admin section and click Design section and then upadte Layout XML code with below

<block type=”catalog/product_new” name=”home.catalog.product.new” alias=”product_new” template=”catalog/product/new.phtml” after=”cms_page”>
<action method=”addPriceBlockType”>
<type>bundle</type>
<block>bundle/catalog_product_price</block>
<template>bundle/catalog/product/price.phtml</template>
</action>
<action method=”setProductsCount”><count>12</count></action>
</block>

This shows a maximum of 10 items.

The second one is change code in the magento files.

This example to show 10 items in 2 rows 5 products each.

You need to change the line in appcodecoreMageCatalogBlockProductNew.php
$products->setOrder(’news_from_date’)->setPageSize(5)->setCurPage(1);
change to
$products->setOrder(’news_from_date’)->setPageSize(10)->setCurPage(1);

And need to change new.phtml

<!–?php if ($i–>5): continue; endif; ?>
change to
<!–?php if ($i==5): echo “ “; endif; ?>
<!–?php if ($i–>9): continue; endif; ?>

Display banners for category page in Magento

Display banners for category page is very easy in magento. This banner will be shown at the top in middle column. It’s very easy functionality provided by magento itself. You just need to know how to do this that all. Lets walk through the set of 2 quick and easy steps. Presuming that you have magento installed along with sample data/ or using default them. If in case the custom theme is installed/ configured then you may need to check the new theme file i.e. view.phtml of category page.

2 quick and easy steps:

Step 1: Create static block.
Login to the magento admin panel and click on “CMS > Static blocks” and create new static block.
Just remember the name of static block here

Step 2: Assign static block to the category.
Once the step 1 is complete go to the “Catalog > Manage Categories”. Select/ Click the category from left menu. It will reload the right hand panel data. Select “Display Settings” tab from right hand panel.
Now change
I) “Display Mode” drop down value “product only” to “static block and prodcut”.
II) Now select the cms block from drop down list of “CMS Block” field and click on save category button.

Now go to front-end and select the category page for whom you have just set the cms block. It will show you banner at the top of product list.