Skip to content

Instantly share code, notes, and snippets.

@rodde177
Created July 22, 2015 10:40
Show Gist options
  • Select an option

  • Save rodde177/44eb13251676554c69a8 to your computer and use it in GitHub Desktop.

Select an option

Save rodde177/44eb13251676554c69a8 to your computer and use it in GitHub Desktop.
set tax class on collection
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