Advertisement
Guest User

Untitled

a guest
Dec 9th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. $proxy = new SoapClient('http://www.testdomain.com/api/soap/?wsdl');
  2. $sessionId = $proxy->login('myapi', 'test@123');
  3.  
  4. //$quoteId = $proxy->call( $sessionId, 'cart.create', array( 'default' ) );
  5.  
  6.  
  7. $arrProducts = array(
  8. array(
  9. "product_id" => 12,
  10. "qty" => 1,
  11. "options" => array(
  12. "267" => 653,
  13. "268" => array('date' => '12/8/2016'),
  14. )
  15. ),
  16. array(
  17. "sku" => 20707,
  18. "quantity" => 4,
  19. "store_id" => 1
  20. )
  21. );
  22. try {
  23. $resultCartProductAdd = $proxy->call(
  24. $sessionId,
  25. "cart_product.add",
  26. array(
  27. 991,
  28. array($arrProducts)
  29. )
  30. );
  31. } catch (SoapFault $e) {
  32. $message = $e->getMessage();
  33. print_r($message);
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement