0
我想根據我在自定義導航菜單中選擇的類別調用magento中的頁面。但每當我加載我的酒吧,它不會顯示任何href鏈接到我的類別。這是我做的菜單:沒有網頁顯示爲magento中的類別
<?php $_helper1 = Mage::helper('catalog/category') ?>
<?php $_categories = Mage::getModel('catalog/category')->getCollection()
->addAttributeToSelect('name')
->addAttributeToSelect('is_active'); ?>
<div class="sidebar" style="display:block;">
<h3>Product Categories</h3>
<ul>
<?php foreach($_categories as $_category): ?>
<li>
<a href="<?php echo $_category->getCategoryUrl($_category); ?>">
<span><?php echo $_category->getName(); ?></span>
</a>
</li>
<?php endforeach; ?>
和輸出總是顯示:
<a href="">
<span>Category 1</span>
</a>
我也不知道如何設置什麼樣的產品應該在每一個類別只顯示。可能嗎?
我需要添加一些東西在我的靜態塊來顯示網格?我通常把這個代碼{{block type =「catalog/product_list」name =「home.catalog.product.list」alias =「products_homepage」template =「catalog/product/list.phtml」}},或者我離開它是空白的? – marchemike