I have added way to many items inside of my subcategories into Magento.

I want to some how keep hold of CTRL+/CMD key or the ALT key or some other method to mass edit them and mass Select the option to NO - I do not want these in the Navigation menu.

I do not want to use MySQL EAV updating approach - there should be a way or plugin to do this through the admin panel I hope ?

enter image description here

enter image description here

2 Answers 2

ini_set('display_errors', '1');

// Load Up Magento Core
define('MAGENTO', realpath('/'));

require_once(MAGENTO . 'app/Mage.php');

$app = Mage::app();

$categories = Mage::getModel('catalog/category')
 ->addAttributeToFilter('entity_id', array("gt" => 1))

foreach($categories as $category) {
 echo $category->getId() . "\t" . $category->getName() . "\n";

Check above. Inspire..

  • Be careful! This solution will reset the described option !!!in all categories!!!
    – zhartaunik
    May 13, 2015 at 12:54
  • Thats why i told him to inspire.. :) May 14, 2015 at 5:48

update catalog_category_entity_int cci inner join eav_attribute a on a.attribute_id = cci.attribute_id set cci.value = 0 where a.attribute_code = 'include_in_menu'

remove all categories from include in menu.

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.