We look for a solution, to remove parent category from url.
So normally the URL is ->
but we need it like
it should be work for all the subcategories of "specials"
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
Presuming you are using Magento CE 1.x and you want to avoid coding you can set this up by simply adding a custom URL rewrite for a category via Admin/Catalog/URL Rewrite Management.
If you want the cleaned URLs to show up in the Menu etc, you'll have to use an Overwrite (local Version or extended by Module) of
Mage_Catalog_Model_Url::getCategoryRequestPath(). Around line 723 the parent Path is inserted, you can simply avoid that by changing
$parentPath = Mage::helper('catalog/category')->getCategoryUrlPath($parentPath,true,$category->getStoreId());
$parentPath = '';
If you want to only change it for some category_ids (as your original question was) you can of course apply some Logic here to render $parentPath as empty string only if your Prerequisites are met.
Please be aware that putting some evaluation of Category Properties (like e.g. Product Count) will have a negative Impact on Performance.