Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $client = new SoapClient('http://mywebsite.com/api/v2_soap/?wsdl');
- $session = $client->login('username', 'password');
- $quoteId = $client->shoppingCartCreate($session);
- $customerData = array(
- "firstname" => "Klevis",
- "lastname" => "Miho",
- "email" => "kmiho@myemail.com",
- "customer_id" => 2522,
- "mode" => "customer",
- "website_id" => "1"
- );
- $resultCustomerSet = $client->shoppingCartCustomerSet($session, $quoteId, $customerData);
- $result = $client->shoppingCartProductAdd($session, $quoteId, array(array(
- 'product_id' => '336',
- 'sku' => '110757',
- 'qty' => '1',
- 'options' => null,
- 'bundle_option' => null,
- 'bundle_option_qty' => null,
- 'links' => null
- )));
- $result1 = $client->shoppingCartInfo($session, $quoteId);
- var_dump($result); //returns true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement