Magento API

SOAP

About Magento API

Module: Mage_Catalog

Resource: catalog_product

Aliases:

  • product
Method:
  • catalog_product.currentStore (SOAP V1)
  • catalogProductCurrentStore (SOAP V2)

Allows you to set/get the current store view.

Aliases:

  • product.currentStore

Arguments:

Type Name Description
string sessionId Session ID
string storeView Store view ID or code (optional)

Returns:

Type Name Description
int/string storeView Store view ID

Examples

Request Example SOAP V1
$client = new SoapClient('http://magentohost/api/soap/?wsdl');

// If somestuff requires api authentification,
// then get a session token
$session = $client->login('apiUser', 'apiKey');

$result = $client->call($session, 'catalog_product.currentStore', 'english');
var_dump ($result);
Request Example SOAP V2
$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); // TODO : change url
$sessionId = $proxy->login('apiUser', 'apiKey'); // TODO : change login and pwd if necessary
 
$result = $proxy->catalogProductCurrentStore($sessionId, 'english');
var_dump($result);