$productIds = [1,2,34]; // List of product Ids $productAttribute = \Magento\Framework\App\ObjectManager::getInstance() ->create('Magento\Catalog\Model\ResourceModel\Product\Action'); $productAttribute->updateAttributes($productIds, ['name' => 'New Name for all product'], // List of attribute you want to update NVP $storeId );
Idea gets from best-way-to-update-products-attribute-value
No comments:
Post a Comment