Advertisement
Guest User

Untitled

a guest
Dec 8th, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.33 KB | None | 0 0
  1. <?php
  2. error_reporting(E_ALL);
  3. ini_set('display_errors', '1');
  4. $client = new SoapClient('http://cssincusa.com/api/v2_soap?wsdl');
  5. $session = $client->login((object)array('username' => 'test', 'apiKey' => 'soapapi'));
  6.  
  7.  
  8. $result = $client->catalogProductCreate((object)array('sessionId' => $session->result, 'storeView'=>0, 'type' => 'simple', 'set' => '4', 'sku' => 'product_sku1',
  9.     'productData' => ((object)array(
  10.         //'type'  =>  'simple',
  11.         'categories' => array(112),
  12.         //'websites' => [1, 0],
  13.         'website_ids'   =>  array(1),
  14.         'name' => 'Product name1',
  15.         'description' => 'Product description',
  16.         'short_description' => 'Product short description',
  17.         'weight' => 10,
  18.         'status' => 1,
  19.         'url_key' => 'product-url-key',
  20.         'url_path' => 'product-url-path',
  21.         'visibility' => 2,
  22.         'tax_class_id' => 0,
  23.         'meta_title' => 'Product meta title',
  24.         'meta_keyword' => 'Product meta keyword',
  25.         'meta_description' => 'Product meta description',
  26.         'stock_data' => array(
  27.             'is_in_stock '  =>  1,
  28.             'qty'   =>  100,
  29.             'manage_stock'  =>  1,
  30.             'notify_stock_qty'  =>  1,
  31.             'backorders'    => 1,
  32.             'use_config_backorders' =>  1,
  33.  
  34.         )
  35.     ))));
  36. var_dump($result);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement