KOC Admin Posted February 25, 2021 Share Posted February 25, 2021 Hi Y'all, I'm looking for a query to update the shipping weight of all products currently in store to 150 grams. I found a query with google but it date's back to 2013-2017 UPDATE ps_product SET weight=1 WHERE id_category_default=581 Does this still apply? or is it different in 1.7.*? Thanks in advance Cheers, Falco Link to comment Share on other sites More sharing options...
GayatriY Posted February 25, 2021 Share Posted February 25, 2021 Hi, Yes, query is correct weight will be update in product table, it will work in PS 1.7.*. If you have product combination then you need to update in product_attribute. Take database backup before apply query, just to avoid loss of data Link to comment Share on other sites More sharing options...
KOC Admin Posted February 28, 2021 Author Share Posted February 28, 2021 On 2/25/2021 at 1:04 PM, GayatriY said: Hi, Yes, query is correct weight will be update in product table, it will work in PS 1.7.*. If you have product combination then you need to update in product_attribute. Take database backup before apply query, just to avoid loss of data Thanks for your reply however I get the table ps_product does not exist. I have a table called psxs_category_product however it does not seem to have a row called Weight. Anyone got an idea what i'm doing wrong? Link to comment Share on other sites More sharing options...
endriu107 Posted February 28, 2021 Share Posted February 28, 2021 You are looking in incorrect table, there is strucure in datatbase so each table start name have PREFIX_ default prefix is ps_ you have prefix psxs_ so in your case table name will be psxs_product. Link to comment Share on other sites More sharing options...
GayatriY Posted March 1, 2021 Share Posted March 1, 2021 23 hours ago, KOC Admin said: Thanks for your reply however I get the table ps_product does not exist. I have a table called psxs_category_product however it does not seem to have a row called Weight. Anyone got an idea what i'm doing wrong? Check in your database with psxs_product. I have ps_ prefix in database that's why I wrote ps_product. In your database you have psxs_ prefix. In product table you will get the weight field. Link to comment Share on other sites More sharing options...
KOC Admin Posted March 1, 2021 Author Share Posted March 1, 2021 On 2/28/2021 at 11:59 AM, endriu107 said: You are looking in incorrect table, there is strucure in datatbase so each table start name have PREFIX_ default prefix is ps_ you have prefix psxs_ so in your case table name will be psxs_product. 9 hours ago, GayatriY said: Check in your database with psxs_product. I have ps_ prefix in database that's why I wrote ps_product. In your database you have psxs_ prefix. In product table you will get the weight field. Thanks both, got the correct table, however the query said it would affect 0 rows. I got it working by using the following instead. UPDATE psxs_product SET weight=0.15 So I left out WHERE id_category_default=581, all my products now have the correct weight! thanks again! Cheers Falco 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now