I have a Magento store with products count 70,000 approx. I want to update 5 custom attribute's value for all products.

I have a CSV file which contains SKU and value of custom attributes for all products. Is there any option available to update/set value for all text types attribute either using MySQL query or programmatically?

Thank you.

  • You can try magmi, it's much faster than default import functionality. Aug 3, 2018 at 5:50
  • As an idea, I would create a shell script , where I should do the update logic in batches . Aug 3, 2018 at 13:56

2 Answers 2


This should give you an idea for how to run a script to perform a mass update on your products.

 * Script to update custom attributes product values

$_productCollection = Mage::getModel('catalog/product')
$storeId = 0;

foreach($_productCollection as $_product)  {
    $product = Mage::getModel('catalog/product')->load($_product->getId());   
    $data = array(
                'custom_attribute_1' => 'VALUE_OF_ATTRIBUTE1',
                'custom_attribute_2 '=> 'VALUE_OF_ATTRIBUTE2',
    Mage::getSingleton('catalog/product_action')->updateAttributes(array($product->getId()), $data, $storeId); 

please follow this blog
its default magneto functionality
no need to do any coding


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.