1

I would like to have some custom links in the dropdown menu, but then on the thirth level.

I now have like:

RootCategory
-> Category1 (eg Baby)
   -> Gender (eg Boy or Girl)
      -> Kind of clothing (eg trousers, shirts ...)

But i want to add an extra 2nd level category "Brands". On which i want to display some featured brands. I also have de Amasty Improved navigation extension, so my brandpages have the following url: www.website.com/brand.html

I would like to have this setup:

RootCategory
-> Category1 (eg Baby)
   -> Gender (eg Boy or Girl)
      -> Kind of clothing (eg trousers, shirts ...)
   -> Brands
      -> Featured Brand 1
      -> Featured Brand 2

But now they get the url: www.website.com/Category1/Brands/brands.html

My Question: How could i change the link in the navigation to the short url: www.website.com/brand.html

I am using Magento 1.8.1 CE

1 Answer 1

1

Go into App/code/core/Mage/Catalog/Model/Url.php and copy the contents of that file. Now go into App/code/local/Catalog/Model/Url.php (create the path if it doesn't exist) and paste the content previously copied.

Now go to function getCategoryRequestPath (around line 700) and inside it comment out the following lines:

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

Reindex and it should work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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