我正在使用magento 1.7。magento 产品 url 就像http://example.com/men/silver-cufflinks
我想men
从 url 中删除一样。我在 url.php 中评论了以下代码
// if (null === $parentPath) {
// $parentPath = $this->getResource()->getCategoryParentPath($category);
// }
// elseif ($parentPath == '/') {
$parentPath = '';
// }
然后清空 core_url_rewrite 表,然后清除缓存并重新索引所有项目,现在我有了http://example.com/catalog/category/view/s/women/id/181/
. 我想恢复以前的链接,请告诉我该怎么做。我也再次尝试取消注释我已评论的代码,然后再次清除表格并清除缓存,然后重新索引所有内容,但我仍然无法修复