1

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"

1

See Magento build in url rewrites catalog section:

rewrites

1

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.

1

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 = '';
//}
  • I hope you made your change to code/local not Local. You Linux server might dislike your typo :-) – Fabian Blechschmidt Jan 29 '15 at 8:29
  • Correct. It was in local and not Local :) – Andreas Jan 29 '15 at 10:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.