Jump to content

Update sub category with api webservices


Recommended Posts


I need tp update the subcategories using the webservice api.

I'm able to update the main categories using this code

$mycategories = array(1,2,3,4,5);
$categories = $item->associations->addChild('categories'); 
foreach( $mycategories as $cat ){
  $category = $categories->addChild('category');
  	$category->addChild('id', $cat);

and I tried to apply the same logic with sub categories, adding another associations item to the category and again categories and category but it's not doing anything.



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...