0

I'm trying to create a category via SOAP

    $category_data = [
    'parentId' => 2,
    'name' => 'NIMI',
    'is_active' => 1, // also tried 'isActive' => 1
    'position' => 1,
    'includeInMenu' => 1,
    'category' => 1,
];
// $category_client     $category_client = new SoapClient(
    'http://host/soap?wsdl&services=catalogCategoryRepositoryV1', $category_client->catalogCategoryRepositoryV1Save($category_data);

I'm getting an error Could not save category: %1 with details The value of attribute "Is Active" must be set.

What is wrong here?

1 Answer 1

0

Try to add store_id to your data. Maybe it will be helpful.

Check keys value, because includeInMenu and parentId should be like parent_id / include_in_menu

$category_data = [
'store_id' => 0,
'parent_id' => 2,
'name' => 'NIMI',
'is_active' => 1,
'position' => 1,
'include_in_menu' => 1,
'category' => 1
];

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.