Magento update all categories with attribute is_anchor to 1

For update all categories with attribute is_anchor to 1 <?php require_once ‘app/Mage.php’; umask(0); Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); ini_set(‘display_errors’, 1); ini_set(‘max_execution_time’, 600); $categories = Mage::getModel(‘catalog/category’)->getCollection(); foreach ($categories as $cat){ $_cat = Mage::getModel(‘catalog/category’)->load($cat->getId()); if ($_cat->getData(‘is_anchor’) == 0){ $_cat->setData(‘is_anchor’,1); $_cat->save(); } echo $_cat->getName().’ ‘.$_cat->getData(‘is_anchor’).'<br/>’; }

Magento Order ID set order pointer to xxxxxxxx

For magento if you need to set order id pointer to xxxxxxxx then use below simple sql will solve your problem. UPDATE eav_entity_store INNER JOIN eav_entity_type ON eav_entity_type.entity_type_id = eav_entity_store.entity_type_id SET eav_entity_store.increment_last_id=’xxxxxxxx’, eav_entity_store.increment_prefix=’x’ WHERE eav_entity_type.entity_type_code=’order’; increment_prefix : This number will Read More