I have a EE 1.14 website whose product data we are updating with the SOAP API. I have come across an interesting problem related to 1.14 url keys and using SOAP. In 1.14 the url_key attribute must be set at store scope according to this document, http://devdocs.magento.com/guides/m1x/install/installing_upgrade_from-ee112.html. We have have multiple store views of which the url key is set at a global scope (the attribute is set to store scope, we just set it globally) so the product pages share the same url in different stores and this works fine AFAK. However when we update a product with the API only updating a couple of attributes, e.g
$data = array( 'price' => 24.95, 'special_price' => null ); $product = $soap->catalogProductUpdate($session_id, "sku123", $data, 1, 'sku');
the whole product gets saved and all attributes that are set to store scope are saved with their global data, at the store scope passed. This would not be too much of a big deal for most attributes, just makes the db a bit bigger than it needs to be I guess, but for url_key in 1.14 it results in an error due to a unique key index on the value column of catalog_product_entity_url_key
If I updated at global scope the url_key doesn't get duplicated and all is fine. e.g
$data = array( 'price' => 24.95, 'special_price' => null ); $product = $soap->catalogProductUpdate($session_id, "sku123", $data, null, 'sku');
So my question, is there a tidy way to only update the passed product attributes via the API and leave the rest of the product as is? Or some other kind of work around so that we don't set the url at store scope for every product we update with the API.
Update - Turns out this isn't only a problem when using the API. In admin on the edit product page, if the admin user changes the scope to store view and saves the same thing happens