Advertisement
Guest User

Untitled

a guest
Sep 17th, 2014
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. $client = new SoapClient('http://mywebsite.com/api/v2_soap/?wsdl');
  2. $session = $client->login('username', 'password');
  3.  
  4. $quoteId = $client->shoppingCartCreate($session);
  5.  
  6. $customerData = array(
  7. "firstname" => "Klevis",
  8. "lastname" => "Miho",
  9. "email" => "kmiho@myemail.com",
  10. "customer_id" => 2522,
  11. "mode" => "customer",
  12. "website_id" => "1"
  13. );
  14.  
  15.  
  16. $resultCustomerSet = $client->shoppingCartCustomerSet($session, $quoteId, $customerData);
  17.  
  18. $result = $client->shoppingCartProductAdd($session, $quoteId, array(array(
  19. 'product_id' => '336',
  20. 'sku' => '110757',
  21. 'qty' => '1',
  22. 'options' => null,
  23. 'bundle_option' => null,
  24. 'bundle_option_qty' => null,
  25. 'links' => null
  26. )));
  27.  
  28. $result1 = $client->shoppingCartInfo($session, $quoteId);
  29.  
  30. var_dump($result); //returns true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement