I have a shippable product variant type. Now the default "Weight" has been added. Since I only have one flat rate shipping rate, I don't want to do any caculation based on weight etc. This is why I would like to remove the "Weight" field. As @bojanz told me this is not possible. He suggested making the filed optional. Since the field is locked, I can't configure that either.

What could we improve here?

Comments

Lukas von Blarer created an issue. See original summary.

mengi’s picture

I agree with making this field optional or even being able to remove it as a lot of times shipping is a flat rate.

joachim’s picture

It's possible to hide the weight field in the form display options, but I don't know what the consequences of that would be -- would Shipping complain at some point in checkout when it doesn't find a value there?

matolog’s picture

interested too.

steveoriol’s picture

Can we not set up a default value for this field ?

steveoriol’s picture

Here is what I have done for the moment and seems to work, in my case the type of product are tickets that weigh 10 grams each. so I hid the "weight" field and modify the following configuration file after exporting it (admin/config/development/configuration/single/export), modified and re-importing (admin/config/development/configuration/single/import):

File: field.field.commerce_product_variation.ticket.weight.yml (ticket are your product type)
change:
default_value: { }
by:

default_value:
  -
    number: '10'
    unit: g

It works, but I do not know for how long ...

willeaton’s picture

This doesn't work for existing products but is great for new products. I think I'm going to have to override the entity form, set a value of 0 and hide it.

UPDATE: couldnt do a form alter, I hid the field in the product variation form display panel. This removed the field from the form and didnt throw any errors.

mglaman’s picture

Status: Active » Closed (duplicate)
Related issues: +#3062282: Allow individual variations to be non-shippable

Closing as a duplicate for #3062282: Allow individual variations to be non-shippable. There the feature request is more laid out, and the field does not need to be configurable and will allow variations to opt-out.

bojanz’s picture

Status: Closed (duplicate) » Active

I am not sure it's the same request. People here have shippable variations, they just don't find the Weight field useful.

It does seem like there's a potential conflict with the other issue, though. Let's keep it open until we have a more definitive answer.

mglaman’s picture

True. Should this issue cover "we want to ship, but weight is not part of our data model" and the other issue "we have items which are not shippable, so we will omit the weight."

I wonder if we can find a happy medium where products are flagged as shippable, can or cannot have a weight and a way to opt-out of being shippable per variation.

jastraat’s picture

We would also like the option of having a product variation that is shippable without a required weight.

jastraat’s picture

Duplicated due to a site 5xx error

tanc’s picture

Just come across this issue as we're configuring shippable products but the client uses a flat-rate (their own courier) and weight is not a factor for them.

danharper’s picture

I'm have a similar use case to others, I'm using flat rate but not using weight in the calculations as the customer doesn't have that information.

It would be useful to set default value to 0.

UriDrupal’s picture

Experiencing the same similar case. There's a fixed rater of 2 prices, I don't need to calculate shipping costs based on Price, so having weight on a product variation is superfluous. Is there a way to turn it off?