Skip to main content
Made code block for the code example in the question
Source Link

How to update a product price on a multi website environment using API (different price for different website)

For single website the following code working, but if I give only one website id in "website" array it is un selecting the product from other website.

$client = new SoapClient('http://example.com/api/soap/?wsdl'); $session = $client->login('exapmple*', 'exapmple'); $result = $client->call($session, 'catalog_product.update', array('PRIN-SKU', array( 'websites' => array(5), 'price' => '100', )));

$client = new SoapClient('http://example.com/api/soap/?wsdl');
$session = $client->login('exapmple*', 'exapmple');
$result = $client->call($session, 'catalog_product.update', array(
    'PRIN-SKU',
    array(
        'websites' => array(5),
        'price' => '100',
    )
));

How to update product price on a multi website environment using API (different price for different website)

For single website the following code working, but if I give only one website id in "website" array it is un selecting the product from other website.

$client = new SoapClient('http://example.com/api/soap/?wsdl'); $session = $client->login('exapmple*', 'exapmple'); $result = $client->call($session, 'catalog_product.update', array('PRIN-SKU', array( 'websites' => array(5), 'price' => '100', )));

How to update a product price on a multi website environment using API (different price for different website)

For single website the following code working, but if I give only one website id in "website" array it is un selecting the product from other website.

$client = new SoapClient('http://example.com/api/soap/?wsdl');
$session = $client->login('exapmple*', 'exapmple');
$result = $client->call($session, 'catalog_product.update', array(
    'PRIN-SKU',
    array(
        'websites' => array(5),
        'price' => '100',
    )
));
Source Link
Nived
  • 479
  • 1
  • 8
  • 13

How to update product price on a multi website environment using API (different price for different website)

How to update product price on a multi website environment using API (different price for different website)

For single website the following code working, but if I give only one website id in "website" array it is un selecting the product from other website.

$client = new SoapClient('http://example.com/api/soap/?wsdl'); $session = $client->login('exapmple*', 'exapmple'); $result = $client->call($session, 'catalog_product.update', array('PRIN-SKU', array( 'websites' => array(5), 'price' => '100', )));