0

We migrated from Magento 1 to Magento 2. All weight values were added in grams in Magento 1.

In Magento 2 the weight setting is in KG. So all product weights are 1000x too much.

What SQL query can I use to reduce all product weight values by 1000x?

EDIT: This causes problem with our shipping module.

2 Answers 2

1

please find the attribute code for the product attribute weight for me it was "weight" and id was 82,

  1. To find the attribute id for the attribute weight, go to the table eav_attribute and search for attribute code for "weight", you will find the ID, and note that ID.

  2. After that find the table "catalog_product_entity_decimal" since the attribute type is decimal and search for the attribute ID "82", or change it by which you have noted it down earlier and find all the values, as per your needs do operations simultaneously in all of them or as your choice.

Please let me know in the comments if you find this helpful, or if still you need the SQL query, please let me know.

Thanks for reading!

enter image description here

enter image description here

1
  • Thanks a lot! If you could share the SQL that would be awesome!
    – JDee
    Nov 3, 2021 at 8:50
0

You can safely ignore the weight description in Magento 2 admin - by default a weight description of KG is used and this is not changeable in the backend admin interface.

If your frontend theme and modules treat the weight value as grams then this will still work as expected.

1
  • Thanks for the reply. The problem is that our shipping module now sees some international shipments that are a few hundred / thousand KG's and we can not print the labels because of this.
    – JDee
    Nov 1, 2021 at 15:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.