|
Magento去掉分类的url地址中父分类的url
if ($this->getParentId()) {
$parentPath = Mage::getModel('catalog/category')->load($this->getParentId())->getCategoryPath();
$path = $parentPath.'/'.$path;
}
改成如下
public function getUrlPath() $path = $this->getUrlKey();
// if ($this->getParentId()) { $this->setUrlPath($path);
return $path;
文件地址:app\code\core\Mage\Catalog\Model\Url.php $requestPath = $parentPath . $urlKey . $categoryUrlSuffix; 改成 $requestPath = ”. $urlKey . $categoryUrlSuffix;
然后index刷新索引, |
