0

I am using Magento ver. 1.7.0.2

With catalogProductUpdate (SOAP V2) all fields are updated but only my optional attribute with name monitor2 does not updated with value vijf. I'd like to update my optional atrribute too.

Any idea what i am doing wrong?

request XML catalogProductUpdate

1

Here is how the data is parsed before saving a product through the API.

    if (property_exists($productData, 'additional_attributes')) {
        if (property_exists($productData->additional_attributes, 'single_data')) {
            foreach ($productData->additional_attributes->single_data as $_attribute) {
                $_attrCode = $_attribute->key;
                $productData->$_attrCode = $_attribute->value;
            }
        }
        if (property_exists($productData->additional_attributes, 'multi_data')) {
            foreach ($productData->additional_attributes->multi_data as $_attribute) {
                $_attrCode = $_attribute->key;
                $productData->$_attrCode = $_attribute->value;
            }
        }
        unset($productData->additional_attributes);
    }

You can find this code in Mage_Catalog_Model_Product_Api_V2::_prepareDataForSave.
notice the single_data and multi_data node in the product data.
Maybe you should format the request to include that node.
If something is still unclear this is a good place to start debugging.

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.