Created
January 22, 2014 02:51
-
-
Save lukluk/8552706 to your computer and use it in GitHub Desktop.
Update Attribute Value
This file contains 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
$productCollection = Mage::getModel('catalog/product')->getCollection(); | |
foreach($productCollection as $_product) | |
{ | |
echo "\n".'updating '.$_product->getSku()."...\n"; | |
$product = Mage::getModel('catalog/product')->load($_product->getEntityId()); | |
$product->setData('add_ten_pence', 1)->getResource()->saveAttribute($product, 'add_ten_pence'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment