1

My code:

 $category = Mage::getModel('catalog/category');
    $category->setName('check');
    $category->setUrlKey('new-category');
    $category->setIsActive(1);
    $category->setDisplayMode('PRODUCTS');
    $category->setIsAnchor(1); //for active achor
    $category->setDisplayInMenu(0); 
    $category->setStoreId(Mage::app()->getStore()->getId());
    $parentCategory = Mage::getModel('catalog/category')->load($parentId);
    $category->setPath($parentCategory->getPath());
    $category->save();

Now i dont want to show category in menu i m using setDisplayInMenu but its not working how can i do this

1

If you don't want to show category in menu than u have to use this

 $category->setIncludeInMenu(0); 
| improve this answer | |

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.