我是新來的magento,當我列出側邊欄中的類別。當我點擊類別名稱意味着它將轉到404錯誤頁面。如果你有任何想法,請儘快告訴我儘可能..類別網址轉到404頁在magento
和我的代碼是
<?php
$_categories = Mage::getModel('catalog/category')->load(3)->getChildrenCategories();
if($_categories->count()):
$categorycount = 0;
foreach ($_categories as $_category):
if($_category->getIsActive()):
$cur_category=Mage::getModel('catalog/category')->load($_category->getId());
$layer = Mage::getSingleton('catalog/layer');
$layer->setCurrentCategory($cur_category);
?>
<li><a href="<?php echo $_category->getURL() ?>" title="<?php echo
$this->htmlEscape($_category->getName()) ?>"><span class="categoriesHead"><?php
echo $this->htmlEscape($_category->getName()) ?></span>
</a>
</li>
<?php
endif;
endforeach;
endif;
?>
嘗試'$ _category->的getURL()',而不是' $ _category->的getURL()'。 Magento遵循嚴格的駱駝案例符號表示類別,方法名稱等。 – Zyava