/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
This script will change the Tax-Class of ALL your products in the $storeId!!<br /> Be careful to use!<br /><br /> <pre> <?php $host = 'me.com'; $proxy = new SoapClient('http://'.$host.'/index.php/api/soap/?wsdl=1'); // Can be added in Magento-Admin -> Web Services $apiUser = '***'; $apiKey = '***'; // the id of the store, which products you want to update $storeId = 0; // the new TaxId, which you want to assign to ALL products $newTaxId = 2; try { $sessionId = $proxy->login($apiUser, $apiKey); foreach ($productList as $product): // just to be sure: check if the product belongs to the store which i want to update echo '<br /><br /><hr /><br /><br />'; endforeach; } catch (Exception $e) { echo "==> Error: ".$e->getMessage(); } ?> </pre>