Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $proxy = new SoapClient('http://www.testdomain.com/api/soap/?wsdl');
- $sessionId = $proxy->login('myapi', 'test@123');
- //$quoteId = $proxy->call( $sessionId, 'cart.create', array( 'default' ) );
- $arrProducts = array(
- array(
- "product_id" => 12,
- "qty" => 1,
- "options" => array(
- "267" => 653,
- "268" => array('date' => '12/8/2016'),
- )
- ),
- array(
- "sku" => 20707,
- "quantity" => 4,
- "store_id" => 1
- )
- );
- try {
- $resultCartProductAdd = $proxy->call(
- $sessionId,
- "cart_product.add",
- array(
- 991,
- array($arrProducts)
- )
- );
- } catch (SoapFault $e) {
- $message = $e->getMessage();
- print_r($message);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement