1

I am trying to add a product to cart in Magento using Magento SOAP v1 API ,but am getting Please specify the product required option(s). error message.

The call happens like:

        $productArray[] = array(
            "product_id"=>"24",
            "qty"=>1
);
    $resultCartProductAdd = $client->call($session, "cart_product.add", array($shoppingCartId, $productArray));

I am unable to figure out how to find out what all options are needed to add a product to the cart using SOAP v1 . Any help will be greatly appreciated.

  • it's not a general option, it is product specific (custom option). – Shathish Oct 8 '13 at 10:07
1

This options are called Custom Options in the admin section. They can be retrieved via the soap api if you have the product id.

//SOAP V1
$optionResult = $client->call($session, 'product_custom_option.list', 'product_id');
var_dump($optionResult);

//SOAP V2
$result = $proxy->catalogProductCustomOptionList($sessionId, 'product_id');
var_dump($result);

http://www.magentocommerce.com/api/soap/catalog/catalogProductCustomOption/product_custom_option.list.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.