i'm trying to add product with custom options using SOAP v1 cart_product.add
- Product ID = 1497
- qty = 1
- store ID = 2
- option ID = 2296 (type = textfield)
- option value = 10001
- is required = TRUE
Everything looks oke but still give an error Fatal error: Uncaught SoapFault exception: [1022] Please specify the product required option(s).
Here is the PHP code
$shoppingCartIncrementId = $proxy->call( $sessionId, 'cart.create',array( 2 ));
$arrProducts = array(
'product_id' => '1497',
'quantity' => 1,
'options' => array (
0 => array(
'key' => 2296,
'value' => '1001'
)
)
);
print "<pre>";
print_r($arrProducts);
print "</pre>";
$resultCartProductAdd = $proxy->call(
$sessionId,
"cart_product.add",
array(
$shoppingCartIncrementId,
array($arrProducts),
2
)
);
And this is my Array Result looks like :
Array
(
[product_id] => 1497
[quantity] => 1
[options] => Array
(
[0] => Array
(
[key] => 2296
[value] => 1001
)
)
)
Am i missing something? Is my array correct?
Please help, Thanks