Created
July 22, 2015 10:40
-
-
Save rodde177/44eb13251676554c69a8 to your computer and use it in GitHub Desktop.
set tax class on collection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| error_reporting(E_ALL | E_STRICT); | |
| define('MAGENTO_ROOT', getcwd()); | |
| $mageFilename = MAGENTO_ROOT . '/app/Mage.php'; | |
| require_once $mageFilename; | |
| Mage::setIsDeveloperMode(true); | |
| ini_set('display_errors', 1); | |
| umask(0); | |
| Mage::app(); | |
| $productIds = Mage::getResourceModel('catalog/product_collection')->getAllIds(); | |
| Mage::getSingleton('catalog/product_action')->updateAttributes( | |
| $productIds, | |
| array('tax_class_id' => 2), | |
| 0 | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment