0
votes

I am using soap custom api for create and add product in cart. I have some custom options associated with the product. I have to add a product in cart with custom options. I have tried it but it always gives me Error: Please specify the product required option(s). I have implemented below mentioned two codes for this but both are not working.enter image description here

$arrProducts = array( array( "product_id" => "26", "qty" => 2, "sku" => "CHEERCARDS-HAPPY BIRTHDAY-MEOW", "quantity" => 2, "bundle_option" => array( "111" => "[email protected]", "112" => "[email protected]", "110" => "QR Code", "109" => "Simple message", ), ), )

and

$arrProducts = array( array( "product_id" => "26", "qty" => 1, "sku" => "CHEERCARDS-HAPPY BIRTHDAY-MEOW", "quantity" => 1, 'options' => array ( 0 => array( 'key' => 111, 'value' => '1001' ), 1 => array( 'key' => 112, 'value' => '1001' ), 2 => array( 'key' => 110, 'value' => '1001' ), 3 => array( 'key' => 109, 'value' => '1001' ), ), ), )

1

1 Answers

0
votes

you don't need to to give product id and sku with quantity and qty. just try this code.

$arrProducts = array( array( "product_id" => "26", "qty" => 2, "bundle_option" => array( "111" => "[email protected]", "112" => "[email protected]", "110" => "QR Code", "109" => "Simple message" ) ) );

This works for me. I hope it 'll work for you also.