It’s pretty easy when you have the eavSetup in your setup module. It’s only necessary to execute:

$eavSetup->updateAttribute(Product::ENTITY, $attributeCode, $attributeField, $value);

For example, if I want to change the ‘position’ field value of the ‘price’ product attribute:

$eavSetup->updateAttribute('catalog_product', 'price', 'position', 100);

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.