Magento显示所有类别在一个单独的视图所有页面


Magento display all categories in a separate view all page

我是新手。我已经创建了一个模块来显示在一个单独的页面上的所有类别,但我努力与类别表连接检索所有类别和显示在一个单独的页面上的所有类别。我要给一个链接,以查看所有类别的主页。这样所有的类别都将被列出。

谁能帮我做这件事?

列出一个商店的所有类别:

$helper = Mage::helper('catalog/category');
$categoryCollection = $helper->getStoreCategories('name', true, false);
if(is_object($categoryCollection) && $categoryCollection->count()):
?>
    <h3><?php echo $this->__('Categories'); ?></h3>
    <ul class="sub-cat">
        <?php foreach($categoryCollection as $_item): ?>
            <li><a href="<?php echo $this->getItemUrl($_item) ?>" title="<?php echo $this->escapeHtml($_item->name) ?>"><?php echo $this->escapeHtml($_item->name) ?></a></li>
        <?php endforeach; ?>
    </ul>
<?php
endif;
?>

相关文章: