to add categories along with images on homepage
just add the code given below to your homepage from admininstration cms management.
{{block type="catalog/navigation" name="catalog.category" template="catalog/category/list.phtml"}}Also you need to create a list.phtml file under “/app/design/frontend/default/default/template/catalog/category/list.phtml”
and add the below given code to it:
===========================================
<?php foreach ($this->getStoreCategories() as $_category): ?>
<?php $open = $this->isCategoryActive($_category); ?>
<?php
$cur_category=Mage::getModel('catalog/category')->load($_category->getId());
$layer = Mage::getSingleton('catalog/layer');
$layer->setCurrentCategory($cur_category);
if ($immagine = $this->getCurrentCategory()->getImageUrl()):
?>
<div style="float: left; padding-right: 30px; text-align: center;">
<div class="linkimage">
<p>
<a href="<?php echo $this->getCategoryUrl($_category)?>">
<img src="<?php echo $immagine ?>" alt="<?php echo $this->htmlEscape($this->getCurrentCategory()->getName()) ?>" width="135" height="135" />
<?php echo $_category->getName()?>
</a>
</p>
</div>
</div>
<?php endif; ?>
<?php endforeach; ?>================================================


September 30, 2009 at 3:17 pm
hi samsami2u
really thanks
i need your [personal mail id] thanks lot
October 1, 2009 at 8:45 pm
sure, its samsami2um@gmail.com
March 2, 2012 at 4:27 pm
hey sam,
i need an help, i am using a Cms page as my home page for this i created an layout file in this file the container portion is static, where i putted a link to another CMS page where i want to show Category listing…as per iphone theme,,but on link it goes to that page but not showing anything in content,,,,,so how can i show Category listing in an CMS page???
if u can add me Gtalk…..pls addd
October 5, 2009 at 12:16 am
What can we do wrong. We made the file and added {{block type=”catalog/navigation” name=”catalog.category” template=”catalog/category/list.phtml”}}
But there is nothing to see. No errors either
October 5, 2009 at 11:12 am
okay, if you have you work online
give me a link to that so i can see what i can do
December 3, 2009 at 7:20 am
Did you ever figure out the problem? it isn’t showing up for me either, the code looks fine though…
November 18, 2009 at 5:32 pm
I agree,For me it’s not working
December 20, 2009 at 2:51 pm
Same problem here. not showing up anything…
December 21, 2009 at 8:21 am
put the debug mode on, may be some issue in copying the code
January 22, 2010 at 12:28 am
Thanks,
Works perfectly.
Grtz
April 6, 2010 at 1:37 am
Just add this code, but I think it’s only applicable for the “head” categories and not the sub categories. I have my navigation under the producten page. Is it possible to show the sub categories on the homepage?
Grtz,
Erwin
May 27, 2010 at 2:03 pm
Hi, thanks for this code, it works well. But i would like to add a static bloc between the homepage text and the {{block type=”catalog/navigation” name=”catalog.category” template=”catalog/category/list.phtml”}}, and a static bloc with css design, how to do it??
July 9, 2010 at 6:33 pm
For all who is seeking a real answer
this is your php file save it in “/app/design/frontend/default/default/template/catalog/category/Your_file_name.phtml”
getCurrentCategory();
$collection = Mage::getModel(‘catalog/category’)->getCategories($_category->entity_id);
$helper = Mage::helper(‘catalog/category’);
?>
{{block type=”catalog/navigation” name=”catalog.category” template=”catalog/category/list.phtml”}}
getIsActive()):?>
load($cat->getId());
$_img = $cur_category->getImageUrl();
?>
<a href="getCategoryUrl($cat);?>”>
<img src="” title=”$cat->getName()”/>
getName();?>
and you may call it from placing the following line in editor
{{block type=”catalog/navigation” name=”catalog.category” template=”catalog/category/Your_file_name.phtml”}}
September 30, 2010 at 9:51 pm
Does anyone know whether this is still applicable for Magento CE v.1.4.1.1
Any feedback greatly appreciated. Cheers
March 18, 2011 at 11:26 am
It doesn’t work for me either oin 1.4 version. Can anybody tell me the reason.
April 6, 2011 at 9:43 am
Did anyone get either of these techniques working in 1.4.2? I’m getting nothing on my cms page.
October 4, 2011 at 8:23 pm
Are you sure you have images set up for your categories? The following condition is clipping out categories w/o images:
if ($immagine = $this->getCurrentCategory()->getImageUrl()):
Replace it with
$immagine = $this->getCurrentCategory()->getImageUrl();
and remove endif; in order to display all categories regardless if they have images or not. Also the following line is useless:
isCategoryActive($_category); ?>
October 4, 2011 at 8:24 pm
Looks like wp.com is clipping some code parts.
July 20, 2011 at 6:42 pm
Yes, we were able to do this. Check this module:
http://shop.spletnisistemi.si/modul-custom-category-images-magento.html?___store=english&___from_store=slovenian