- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Home page display multi categories
I want my home page display multi Cat : http://fashions100.com/shopping/
My home page's page have following code : but only display one Cat even I enter 2 categoryies
<!--<reference name="content">
<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>
</block>
<block type="reports/product_viewed" name="home.reports.product.viewed" alias="product_viewed" template="reports/home_product_viewed.phtml" after="product_new">
<action method="addPriceBlockType">
<type>bundle</type>
<block>bundle/catalog_product_price</block>
<template>bundle/catalog/product/price.phtml</template>
</action>
</block>
<block type="reports/product_compared" name="home.reports.product.compared" template="reports/home_product_compared.phtml" after="product_viewed">
<action method="addPriceBlockType">
<type>bundle</type>
<block>bundle/catalog_product_price</block>
<template>bundle/catalog/product/price.phtml</template>
</action>
</block>
</reference>
<reference name="right">
<action method="unsetChild"><alias>right.reports.product.viewed</alias></action>
<action method="unsetChild"><alias>right.reports.product.compared</alias></action>
</reference>-->
<reference name="content">
<block type="catalog/product_list" name="featured" template="catalog/product/list.phtml">
<action method="setCategoryId"><category_id>3</category_id></action>
<action method="setColumnCount"><count>5</count></action>
</block>
</reference>
<reference name="content">
<block type="catalog/product_list" name="featured" template="catalog/product/list.phtml">
<action method="setCategoryId"><category_id>7</category_id></action>
<action method="setColumnCount"><count>5</count></action>
</block>
</reference>
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello kerrykwong,
The reason for dispalying duplicated categories is that the same name in your block:
<reference name="content">
<block type="catalog/product_list" name="featured" template="catalog/product/list.phtml">
<action method="setCategoryId"><category_id>3</category_id></action>
<action method="setColumnCount"><count>5</count></action>
</block>
</reference>
<reference name="content">
<block type="catalog/product_list" name="featured" template="catalog/product/list.phtml">
<action method="setCategoryId"><category_id>7</category_id></action>
<action method="setColumnCount"><count>5</count></action>
</block>
</reference>
You should change the name of second block. e.g name="featured-2".
Sure that clear your Magento Cache before refreshing your page.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Home page display multi categories
Hello kerrykwong,
What do you mean "multi categories" here? You mean that you want to shows all root categories in your current store view? I think you shouldn't do this because you must custom default code. Just create sub categories under current root category.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Home page display multi categories
http://fashions100.com/shopping/
no I have 2 sub cateories Handbag and stellewind,
I want to display these 2 categories at frontpage, but now, it display 2 Block! but 2 block also is my clothes Category
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Home page display multi categories
Hello kerrykwong,
Your categories set Is Active and Include in Navigation Menu?
Click your category > General Information >
+Is Active set to Yes
+Include in Navigation Menu set to Yes
Clear your Magento Cache.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Home page display multi categories
I do not mean menu, I mean the frontpage display ! now is show duplicate, it suppose to show 2 Categories. I Suppose
http://fashions100.com/shopping/
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello kerrykwong,
The reason for dispalying duplicated categories is that the same name in your block:
<reference name="content">
<block type="catalog/product_list" name="featured" template="catalog/product/list.phtml">
<action method="setCategoryId"><category_id>3</category_id></action>
<action method="setColumnCount"><count>5</count></action>
</block>
</reference>
<reference name="content">
<block type="catalog/product_list" name="featured" template="catalog/product/list.phtml">
<action method="setCategoryId"><category_id>7</category_id></action>
<action method="setColumnCount"><count>5</count></action>
</block>
</reference>
You should change the name of second block. e.g name="featured-2".
Sure that clear your Magento Cache before refreshing your page.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Home page display multi categories
thanks a lot