Wednesday, October 5, 2011

How to remove parent category path from sub category in magento URL?

Step 1:
Edit "/app/code/core/Mage/Catalog/Model/Url.php"
Around line 805 comment the below lines:
//if (null === $parentPath) {
//    $parentPath = $this->getResource()->getCategoryParentPath($category);
//}
//elseif ($parentPath == '/') {
    $parentPath = '';
//}
Step 2:
Now re-index Catalog URL Rewrites in Index Management. That's it you are done.

No comments:

Post a Comment