$category_id = 8711; $cat = Mage::getModel("catalog/category")->load($category_id); $cat->setData('is_active', 0); $cat->save();
it does not work...
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
Your code is okay, but if it's a standalone script that just uses
Mage::app(); at the beginning, it will not work, but it does if you set a store ID via
To change the default value, you can use
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); # your code here