I am trying to import categories using script
$cat = Mage::getModel('catalog/category')
->setPath('1/2')
->setName($name)
->setIsActive(1)
->setIsAnchor(1)
->setIsParent(1)
->setIncludeInMenu(1)
->save();
echo $catId = $cat->getId();
Using this code categories are imported but they are not active as well as not anchor. plz help me.
Try this one..
require_once ‘app/Mage.php’;
Mage::app(‘default’); /* Default or your store view name. */