Magento API : store and not storeView

I have just configured my Magento Store in multi-domain and multi-view as I explained into my previous acticle and I have updated my API to update my view.

I read frequently the Magento API documentation and each method have a storeView parameter :

Type Name Description
string sessionId Session ID
string productproductId Product ID
array productData Array of catalogProductCreateEntity
string storeView Store view ID or code (optional)
string identifierType Defines whether the product ID or SKU is passed in the ‘product’ parameter

I spent a lot of time and I have tested with storeView parameters and It never worked ! Only the global information were updated. I have finally checked the WSDL schema (i.e. https://host/api/v2_soap/?wsdl=1) and the soreView parameter does not exist ! This is store !

With the right parameter, It is working as expected :

	$myproductData=array(
			'description' => "$mydescription");

	// return product id
	return $myproxy->catalogProductUpdate((object)
				array(
					'sessionId' => $mysessionid->result,
					'productId' => &$myproductid,
					'identifierType' => 'id',
					'store' => $storeview,
					'productData' => $myproductData));

It is really too bad that Magento publish erroneous documentation !

Et voila,

Nicolas Portais
Author Photographer
http://www.mystockphoto.fr/
http://photos-art.pro/

Ce contenu a été publié dans Magento, avec comme mot(s)-clé(s) , , , , , , , . Vous pouvez le mettre en favoris avec ce permalien.

2 réponses à Magento API : store and not storeView

  1. Nastya dit :

    Hi Nicolas,
    thank you for this post, you ve really saved me!

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Captcha (solve the arithmetic equation) * Time limit is exhausted. Please reload CAPTCHA.