Jump to content

Enter data in additional attribute through API in magento shop


Recommended Posts

Hey everyone! i am trying to enter data in additional attribute through API in magento shop.I have tried this code but it is not working the data is not entering..

  'additional_attributes' => array   (   array(			'key' => 'user',			'value' => 'aneeb'))

Please tell me what i am doing wrong or tell me how can i enter data in additional attributes through API in magento shop....

Link to post
Share on other sites

I am using SOAP API for entering products in magento shops.here is the full code..

$client = new SoapClient('http://localhost/magento/api/v2_soap/?wsdl');$session = $client->login('apiKey', 'apiValue');$attributeSets = $client->catalogProductAttributeSetList($session);$attributeSet = current($attributeSets);$result = $client->catalogProductCreate($session, 'simple', $attributeSet->set_id, $sku, array(    'categories' => array($category),    'websites' => array(1),'user' => array($username),    'name' => $name,    'description' => $desc,    'short_description' => $short_desc,    'weight' => $weight,    'status' => '1',    'url_key' => 'test product-url-key',    'url_path' => 'test product-url-path',    'visibility' => '4',    'price' => $price,    'tax_class_id' => 1,    'meta_title' => 'Product',    'meta_keyword' => 'Product meta keyword',    'meta_description' => 'Product meta description',  'additional_attributes' => array   (   array('key' => 'user', 'value' => 'aneeb'))));var_dump ($result);

the other values are entering properly but the additional attribute value is not working.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...