Question

For design purposes we have a sub-category called Brands which list all the brands. However we would like the urls to ignoer /brands/ part so domain.com/brands/brand_name would be domain/brand_name instead. We use this for products as well and we would like the tree to look like domain.com/brand_name/product_name

Where can we make such changes? Note that we also have additional categories and we just want to make changes to "brands"

Was it helpful?

Solution 3

Issue solved. Made the below change in "code/Local/Mage/Catalog/Model/Url.php" and refreshed the Index.

//if (null === $parentPath) {
//    $parentPath = $this->getResource()->getCategoryParentPath($category);
//}
//elseif ($parentPath == '/') {
    $parentPath = '';
//}

OTHER TIPS

See Magento build in url rewrites catalog section:

rewrites

You can change the urls in the admin under Catalog->URL Rewrite Management rewrite section, do note however that if you afterwards change the url key for either 'brands' or 'brand_name' that you will have to redo these changes as it will rewrite the request path with 'brands' in it again.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top