I want to update product image label for specific store view using API v1. First, I've created product
$res = $client->call($session, 'catalog_product.create', array(
'downloadable',
47,
'standardapiv1_' . uniqid(),
array(
'websites' => array(2),
'name' => 'Standard api v1',
'description' => 'Product description',
'short_description' => 'Product short description',
'weight' => '10',
'status' => '1',
'visibility' => '4',
'price' => '100',
'tax_class_id' => 1,
'meta_title' => 'Product meta title',
'meta_keyword' => 'Product meta keyword',
'meta_description' => 'Product meta description'
),));
and added product image to this product
$res2 = $client->call($session, 'product_media.create', array(
$res, array(
'file' =>$newFile,
'label'=>'standard api',
'types'=>array('thumbnail'),
'exclude'=>0
)
));
Product was successfully created. When I run this request to API
$res =$client->call($session, 'product_media.update', array(
1047,
'/i/m/image_10.jpg',
array(
'file'=>$newFile,
'label'=>'update lbl',
),
'2'));
I got this error Product with the 'standard-api-v1' url_key attribute already exists
.
If last parameter is not set - storeView - everything works well, so source of problem is looks like be here:
\app\code\core\Mage\Catalog\Model\Product\Attribute\Media\Api.php
line 256:
try {
$product->save();
} catch (Mage_Core_Exception $e) {
$this->_fault('not_updated', $e->getMessage());
}
Does anyone know, what am I doing wrong? I've made some research, and found answers, that it was a bug in EE 1.13