我是新来的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