i havent been able to find the answer for this anywhere but i cant seen to display any of the products on the root categories page from its sub category members. When i click th
Every category has associated products.
Just associate these products into the higher-level category too.
They will show up on frontend in that category.
First identify the attribute id of the is_anchor attribute:
SELECT * FROM eav_attribute where attribute_code = 'is_anchor';
we Get attribute id 51 in my database. Now run the following query
UPDATE catalog_category_entity_int set value = 1 where attribute_id = 51;
replace 51 with your own attribute id. And just rebuild these indexes
Make sure you set "Is anchor" to "Yes" for your root category.
<div class="category-grid-new">
<?php $_columnCount; ?>
<ul>
<?php if($i++%$_columnCount==0): ?>
<?php foreach ($this->getCurrentCategory()->getChildrenCategories() as $_subcat): ?>
<li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0):?> last<?php endif; ?>">
<a href="<?php echo $_subcat->getUrl() ?>">
<div class="category-img"><img src="<?php echo $_category->getImageUrl() ?>" alt="" width="100px" height="100px"/></div>
<div class="category-data"><?php echo Mage::helper('catalog/output')->categoryAttribute($_subcat, $_subcat->getName()) ?></div>
</a>
</li>
<?php endforeach ?>
</ul>
<?php endif; ?>
</div>
Set anchor as YES and then reindex categories in index management.