How to get a category listing from Magento?

后端 未结 8 2086
野性不改
野性不改 2021-01-31 22:33

I want to create a page in Magento that shows a visual representation of the categories.. example

CATEGORY
 product 1
 product 2

ANOTHER CATEGORY
 product 3
         


        
8条回答
  •  北荒
    北荒 (楼主)
    2021-01-31 23:20

    category Listing block:

    load(2)->getChildren();
    $catIds = explode(',',$cats);
    ?>
    
    • load($catId); echo $category->getName(); $subCats = Mage::getModel('catalog/category')->load($category->getId())->getChildren(); $subCatIds = explode(',',$subCats); ?> 1):?>
      • load($subCat); echo $subCategory->getName(); ?>

提交回复
热议问题