Jump to content

Enter data in additional attribute through API in magento shop


aneeb

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 comment
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 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...