1

When I enable multiple variants for product type that has Dimensions and Weight, fields "Dimensions and Weight" become available for every single variant. Product is tablet and all variants have a same dimensions and weight.

Is it possible to have common "Dimensions and Weight" fields for a single product, not for every variant?

Application info:

  • Craft Pro 3.4.27
  • Craft Commerce 3.1.11
1
  • 2
    You might need a custom module that listens to the onSaveProduct or whatever it is? Have some custom fields on the product that contain your default dimensions, then if the variant dimensions are left blank populate them automatically from your custom field entered values? That's probably how I'd do it. Jul 15 '20 at 8:57
1

This is actually one of Commerce's best features IMO - that you CAN have separate dimensions/weights for variants - for us this is absolutely essential.

Of course, there are definitely times when it is not needed, too.

In these cases, we have a 'Standard Box' section that we store standardised entries in, with the appropriate data.

We then just relate these to the variant using a relations field.

Works really well...however, the behaviour is of course not the same as using the in-built fields - e.g. your shipping calculator needs to be aware of this etc.

2
  • Thank you for your idea, but I am afraid it is not optimal in my case. I have mobile phones and tablets and the number of "Standard boxes" will be almost the same as number of products probably. Maybe I can make custom fields for Dimensions and Weight for product and ignore default fields per variant, but would be nice to find native solution. Jul 15 '20 at 7:44
  • Sure, was more commentary than a suggestion per se. Clive's comment above is probably how I would look to do it in your case too... Jul 15 '20 at 11:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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