Sometimes we need to perform a quick bulk update of a specific product attribute for the whole catalog. But as we know, fetching the whole Product entity takes a lot of resources.

So in this tutorial I will show you how to update a single product attribute value without loading the whole Product object.

In this standalone script, which can be placed on the project root and executed as php -f update-attr.php, I’ll show you how to update the attribute “has_upload_file” for all of the products.


Leave a comment