Last active
April 14, 2016 11:51
-
-
Save roma-glushko/399fd34235774ae24c35900471e2aa88 to your computer and use it in GitHub Desktop.
Update product attribute of Magento 1.x
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
<?php | |
$allProductIds = Mage::getModel('catalog/product')->getCollection()->getAllIds(); | |
$attributeCode = 'some_eav_attribute'; | |
$attrData[$attributeCode] = 'some_value'; | |
$storeId = 0; | |
Mage::getSingleton('catalog/resource_product_action')->updateAttributes($allProductIds, $attrData, $storeId); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment