Я написал здесь первый пост, который был совершенно неверным - найти ответ на этот вопрос в Google не так просто, как следовало бы!
В любом случае, вот код, который я использую в Magento 1.5.0.1
-- The parent category you want to work with.
$parentCategory = $this->getParentCategory();
-- This method needs to refer to the static block you want to display if you're using one.
$categoryBlockId = $this->getCategoryBlockId();
$category = Mage::getModel( 'catalog/category' );
$category->setStoreId( $storeId );
$category->setName( $categoryName ); -- The name of the category
$category->setUrlKey( $categoryUrlkey ); -- The category's URL identifier
$category->setIsActive( 1 ); -- Is it enabled?
$category->setIsAnchor( 0 ); -- I think this relates to whether it shows in navigation.
-- Display mode can be 'PRODUCTS_AND_PAGE', 'PAGE', or (I think) 'PRODUCTS'
$category->setDisplayMode( $displayMode );
$category->setPath( $parentCategory->getPath() ); -- Important you get this right.
-- This is required if DisplayMode is 'PRODUCTS_AND_PAGE' or 'PAGE'.
$category->setLandingPage( $categoryBlockId );
$category->setPageTitle( 'Your Page Title' );
$category->save()
$categoryId = $category->getId();
Есть и другие свойства, которые вы также можете использовать (они соотносятся с полями формы при добавлении категории в панели администратора), но, к сожалению, у меня нет примеров для них.В Интернете есть хорошие посты - я использовал их для создания вышеперечисленного - но вам, возможно, придется покопаться в Google, чтобы найти их.
Надеюсь, это поможет, и вы не прочитали мой первый ответне поможет.
Ура, Зак