require_once
'app/Mage.php'
;
Mage::app(
'default'
);
$category
= Mage::getModel(
'catalog/category'
);
$category
->setStoreId(0);
if
(
$id
) {
$category
->load(
$id
);
}
$general
[
'name'
] =
"My Category"
;
$general
[
'path'
] =
"1/2/23"
;
$general
[
'description'
] =
"Great My Category"
;
$general
[
'meta_title'
] =
"My Category"
;
$general
[
'meta_keywords'
] =
"My , Category"
;
$general
[
'meta_description'
] =
"Some description to be found by meta search robots. 2"
;
$general
[
'landing_page'
] =
""
;
$general
[
'display_mode'
] =
"PRODUCTS_AND_PAGE"
;
$general
[
'is_active'
] = 1;
$general
[
'is_anchor'
] = 0;
$general
[
'page_layout'
] =
'two_columns_left'
;
$category
->addData(
$general
);
try
{
$category
->save();
echo
"Success! Id: "
.
$category
->getId();
}
catch
(Exception
$e
){
echo
$e
->getMessage();
}
Comments
Post a Comment