Magento – Configurable Products – attribute label, “use default” issue

attributesconfigurable-productMySQL

When I create a configurable product, in the tab "associated products" the checkbox for "use default", label for attribute is unchecked.

I have fixed this altering the product.js (line 404), adding attribute.use_default == null:

                if (attribute.use_default == '1' || attribute.use_default == null  ) {
                use_default_checked = ' checked="checked"';
                label_readonly = ' readonly="readonly"';
            }

This work fine.

However now I would like to set this for all the products that I have already created.

I will accept answer that help me to create a query on DB

Best Answer

If you want to do it for all attributes of all configurable products, then:

UPDATE catalog_product_super_attribute_label SET use_default = 1

If you want to do it for particular product or particular attribute you have to JOIN with catalog_product_super_attribute table using product_super_attribute_id field of both tabels.

Related Topic