Add new attribute to existing magento custom product

I have about 500 custom products in which I need to add a new attribute.

For example, they already have color as an attribute. How can I add size to existing custom products?

+6
source share
5 answers

Adding an attribute to an attribute set and then updating all the attributes of simple products is not enough. Magento asks which β€œcustom attributes” to use when initially creating a custom product; therefore, the new attribute will not apply to existing configurable products (products) and their subsidiaries. I tested the DB crawl algorithm described below on CE 1.6.2 and it seems to work:

  • Create Attribute
  • Drag it to the appropriate attribute set.
  • Go to phpmyadmin, table ' catalog_eav_attribute and look at the last one, pay attention to the attribute identifier, also pay attention to the product identifier β†’ go to catalog_product_entity and find the desired custom product and pay attention to entity_id β†’ this is product_id
  • Go to catalog_product_super_attribute and insert a new record using product_id and attribute_id , check product_super_attribute_id
  • Go to catalog_product_super_attribute_label and insert a new entry with product_super_attribute_id and the value of your new attribute, for example, "Color" or "Size", which you used when adding the attribute to admin
  • Go back to the administrator and click on the custom product, you will notice that none of your child products are associated with your custom product.
  • Click one of the child products and select the appropriate attribute value, you can also change sku.
  • Export all child products and add new sku attributes and values ​​to it, import them and you are done, or you may need to manually change everything in admin without using a data stream.

credit: http://www.magentocommerce.com/boards/viewthread/43288/#t330918

+17
source

You define this attribute in the attribute set that is used, and then update all products using the data stream

+1
source

If size is the intended custom attribute, I'm not sure if it will be that simple. Magento does not allow you to override the attributes by which an element is configured after creation.

After creating an attribute and adding it to the attribute set, you probably have to hack it at the database level to configure the attribute. This means that your simple child products also need to be modified to have a size attribute.

Good luck. Be sure to come back and tell us what you did to make it work.

Thanks Joe

+1
source

Try adding the attribute to the editing product, and not to the "Manage attributes" section.

For me, it automatically adds itself to this set of product attributes, as well as to all other products in this set of attributes.

In fact, I now have no problem using the "Attribute Management" section to add new attributes.

+1
source

There is a dirty hack for opening a custom product, then selecting a duplicate, selecting the old and new attribute, duplicating without SKU, and then deleting the original custom product and simple products. After that you can give the same SKU for duplication. Then you just need to make new simple products.

This is a quick workaround, if not many simple products.

0
source

Source: https://habr.com/ru/post/885880/


All Articles