Where is weight in product data (shipping area) stored - how to edit it in bulk ?

Where is weight in product data (shipping area) stored - how to edit it in bulk ?

ericnickus
Tourist
8 0 1

I am able to export product data however there is a field in product called weight (in the shipping area)  but this weight is NOT in the product export!    I have a field called Variant_Grams, which I assumed was the weight , but I changed all the Variant_Grams, and still doesn't show right in the products in admin.    

I guess what I really want to know is where is this field coming from and how can i edit it and also how to edit it in bulk (i have 800 products ).   Thanks 

 

Replies 8 (8)

Ablestar_Daniel
Shopify Partner
96 13 18

Hello,

 

If you have a spreadsheet like this is should set the weights correctly in Shopify:

Screenshot 2024-02-15 at 2.53.39 PM.png

 

There's a couple gotchas though:

  • You'll need to have the correct Option values if you have multiple variants for a product
  • The weight needs to be in grams. If you use a different weight unit for your product you'll need to convert that to grams first. Eg, if you use pounds and want to show '1 lb' you'll need to enter 454 (grams) in the cell for it to work

If that's still not working could you send over part of the CSV you're using and I can take a look.

 

Best,

Daniel

 

Founder @ Ablestar ✦
Manage product data, spreadsheets, Google Shopping data, and metafields with Ablestar Bulk Product Editor. Use previews, undos, and automations to be confident your product data is correct.
Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
ericnickus
Tourist
8 0 1

Right!? So that 'Variant_Grams' in the product table (export) should be the same one that shows up in the shipping area in the products (admin) - I already read to keep it in grams, but maybe I am having some issues with extra product records or something , I will look again and if I still can't get it , I will send that to you thanks so much , 

 

CHeers

 

ericnickus1
Shopify Partner
2 0 0

Sir,   I continue to have this issue.   I changed the Variant_Grams field in the export table and re-import.   However, the price still shows up on the products in the shipping area some weird value.     I even went into the settings and shipping and delivery area and there was a custom defined package . I took that weight down to almost zero.   Didn't change anything.    I am, starting to think maybe there's some 'custom' coding left by the initial developer who set this up that could be affecting it  ?  I am attaching the spreadsheet (partial) I am so grateful for any wisdom you can share with me about this . 

 

Liam
Shopify Staff
2807 310 805

You could use the GraphQL API to update the weight field of a variant, using the productVariantUpdate mutation. It would look something like:

 

mutation {
  productVariantUpdate(input: {
    id: "gid://shopify/ProductVariant/44835344515286", 
    weight: 100.0, 
    weightUnit: KILOGRAMS
  }) {
    productVariant {
      id
      weight
      weightUnit
    }
    userErrors {
      field
      message
    }
  }
}

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

ericnickus
Tourist
8 0 1

You know , that is a seriously good answer .  But I still won't know where this weight is stored in the system.    I have altered 'Variant_Grams'. and didn't change anything.   I should test in shipping , but on the product admin, still shows some weird weight.      Please advise if you know how to explain to me where this variable is coming from and I will accept the answer.     Also ; is this answer the same as editing the 'Variant_Grams'. field in the bulk csv export ? (edited the csv already , did'nt change that weight field in admin.  Thank so much 

 

Liam
Shopify Staff
2807 310 805

That should be working - there doesn't seem to be another field that would correspond to the weight field on the admin. I'll look into this a bit more!

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

ericnickus
Tourist
8 0 1

Hello,  Can you just verify what the other guy said (above). that weight has to be in grams.   Because I have another person telling me they have a shopify site and it's in pounds and it works.    Also so to clarify: I put the grams amount in the `Variant Grams` field and  'lb' in the `Variant Weight Unit`  field?     Or will it work with a pounds amount in the `Variant Grams` field as well ?   As for the other issue you don't have to check into it further, it was more one of those things (possibly my fault) rather than a shopify problem.

ericnickus1
Shopify Partner
2 0 0

Nevermind then I am closing this but in case anyone else reads it , I just had a difficult time exporting and importing, I guess I was using a spreadsheet then converting to mysql table , then working on it , then back to a spreadsheet, but found another way to just write code in javascript that modifies the csv files instead.  I am sure there is even a way to just handle a thousand products with just excel or (i have numbers[macos] ), so I hope to eventually be that good at a spreadsheet application to make all my changes  i need.    As far as Variant Grams, it is the weight in the products table, and you can make Variant Weight Unit lb.  and still put the grams weight in the Variant Grams field, it will work .   Maybe it even has to be in grams even if you put lb as the weight unit as the gentleman above said.  I mean every thing else he said was true, so Im not going to try to see what happens because it works that way.  Cheers