Magento : Fastest way to update a product attribute
-
30-10-2019 - |
Question
I'm looking for the fastest and reliable method for mass attribute update. Below are the methods am aware of but I don't know with which I should go.
$store_id = 0;
Mage::getSingleton('catalog/product_action')->updateAttributes(
array($product_id),
array('attribute_code' => $attribute_code),
$store_id
);
or
$product->setData($attribute_code, 1234);
$product->getResource()->saveAttribute($product, $attribute_code);
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange