As the title says, I'm trying to set/modify the value of a drop down type attribute through the SOAP v2 API. Below is the latest bit of code that I'm working with:
$update_data = array (
'additional_attributes' => array (
'multi_data' => array (
array ('key' => 'ship_separately', 'value' => array ('0' => '1'))
),
'single_data' => array (
array ('key' => 'ship_width', 'value' => '14'),
array ('key' => 'ship_length', 'value' => '24'),
array ('key' => 'ship_height', 'value' => '12'),
//array ('key' => 'ship_separately', 'value' => 'Yes')
)
)
);
$update = $proxy->catalogProductUpdate($sessionId, 'MySKU', $update_data, NULL, 'sku');
The 'single_data' (just simple name/value pairs) attributes update fine. As you can see, I also tried to update the 'ship_separetely' using the 'single_data' array...to no avail. Google and StackExchange put me on the path of the 'multi_data' array, but finding documentation on it is virtually impossible. I think I have the syntax correct because the API isn't throwing an exception and it is updating the 'single_data' attributes, but won't update the drop down value. It is a simple yes/no drop down, so I've tried setting the value to both 'Yes' and '1', but it doesn't change. Any help is greatly appreciated.
1
ortrue
without the quotes?separately
, that probably doesn't help'1'
works perfect for me. Are you sure you got the name right? If it's been newly created, you will need to Flush Magento cache or else it won't know the field exists.