cancel
Showing results for 
Search instead for 
Did you mean: 

How to mass update products weight with MySQL query?

SOLVED

How to mass update products weight with MySQL query?

Dear, I need to update all my products that has 0.3 kg weight in Database/MySQL with Query, but can`t find where is stored. My Magento is 2.2 how can update the weight direct in the SQL for all products?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to mass update products weight with MySQL query?

Hello @kostianev

 

you can do following way

 

 

select * from eav_attribute where attribute_code='weight'; it will give you id of that attribute

select * from catalog_product_entity_decimal where attribute_id=82 // find that attribute value

update catalog_product_entity_decimal set value='' where attribute_id=82 and value='0.3'

you can do from the backend as well, filter by weight and mass update attribute.

 

If it will work then mark as solution.

 

 

 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

View solution in original post

2 REPLIES 2

Re: How to mass update products weight with MySQL query?

Hello @kostianev

 

you can do following way

 

 

select * from eav_attribute where attribute_code='weight'; it will give you id of that attribute

select * from catalog_product_entity_decimal where attribute_id=82 // find that attribute value

update catalog_product_entity_decimal set value='' where attribute_id=82 and value='0.3'

you can do from the backend as well, filter by weight and mass update attribute.

 

If it will work then mark as solution.

 

 

 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: How to mass update products weight with MySQL query?

Thank you very much! @Sunil Patel