how to I create new product using catalogProductCreate method in Magento -
how create new product using catalogproductcreate
method in magento? how pass parameters used in method when call method wsdl class?
below example code documentation link
$client = new soapclient('http://magentohost/api/v2_soap/?wsdl'); // if stuff requires api authentification, // session token $session = $client->login('apiuser', 'apikey'); // attribute set $attributesets = $client->catalogproductattributesetlist($session); $attributeset = current($attributesets); $result = $client->catalogproductcreate($session, 'simple', $attributeset->set_id, 'product_sku', array( 'categories' => array(2), 'websites' => array(1), 'name' => 'product name', 'description' => 'product description', 'short_description' => 'product short description', 'weight' => '10', 'status' => '1', 'url_key' => 'product-url-key', 'url_path' => 'product-url-path', 'visibility' => '4', 'price' => '100', 'tax_class_id' => 1, 'meta_title' => 'product meta title', 'meta_keyword' => 'product meta keyword', 'meta_description' => 'product meta description' ));
Comments
Post a Comment