2019独角兽企业重金招聘Python工程师标准>>>
app/code/core/Mage/Catalog/Model/Url.php 找到如下代码
方法getCategoryRequestPath
if (null === $parentPath) {$parentPath = $this->getResource()->getCategoryParentPath($category);}elseif ($parentPath == '/') {$parentPath = '';}
改成
//if (null === $parentPath) {//$parentPath = $this->getResource()->getCategoryParentPath($category);// }// elseif ($parentPath == '/') {$parentPath = '';//这句不用注释
// }
改完后,刷新下url索引就可以了