1

I am trying to use the shoppingCartProductAdd SOAP API to add a product with Custom Options to cart.

Below is the array I am passing for the products parameter. I've a required custom option id 1 for which the selected value id in the dropdown is 2. (you can view the product here)

array (size=1)
  0 => 
    array (size=3)
      'product_id' => int 25
      'qty' => int 1
      'options' => 
        array (size=1)
          1 => int 2

When I execute this SOAP request, I get an error "Please specify the product required option(s)."

It looks like its not accepting my 'options' key in the array.

What am I doing wrong?

0

1 Answer 1

3

I was able to solve this problem by using the answer here - https://stackoverflow.com/questions/19899127/setting-custom-options-while-adding-a-product-to-cart-via-soap-in-magento/19925338#19925338

The format in which options needs to be passed as not as stated in the Magento SOAP documentation.

1
  • 1
    Good advice: Never trust the Magento SOAP documentation. Go and have a look in the code instead. Commented Nov 12, 2013 at 11:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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