I'm currently using the below to add a category programatically/in the front end
<?php
$category = Mage::getModel('catalog/category');
$category->setName('new_category');
$category->setIsActive(1);
$category->setIsAnchor(0);
$parentCategory = Mage::getModel('catalog/category')->load("X");
$category->setPath($parentCategory->getPath());
$category->save();
?>
There are 2 settings which i need to be able to add – the setting of use parent category settings = yes
and the category thumbnail
How can this be done with the above?
Best Answer
You can add the following lines for that:
The [image] is the name of the image that is located in media/catalog/category/