Skip to content

Product measurements not saving correctly #702

@TresBlue

Description

@TresBlue

Which component is this issue related to?

Umbraco Commerce (Core)

Which Umbraco Commerce version are you using? (Please write the exact version, example: 10.1.0)

13.2.0

Bug summary

As per #559, when creating a product all measurements need to be filled with a value for proper handling with shipments.

However our shop has a lot of products where just the weight matters. When entering 0 values for length, width and height, and then hitting saveandpublish, the proper shipment costs for the product are not calculated.

When checking the database the measurements field of the product looks like this: {"weight": 300}. Changing this by hand to {"length": 0, "width": 0, "height": 0, "weight": 300} actually fixes the issue.

Furthermore, when examining the orderline with the 'wrong' measurements (e.g. Models.Order.Orderlines.First().ProductMeasurements) it's null.

Specifics

Image

Steps to reproduce

Create a dynamic shipping method with weight costs. Create a product in the backoffice with a value for weight, with length, width and height to 0. Shipping costs should still be calculated.

For the 'fix', create a method in something like a controller to update the measurements by hand to {"length": 0, "width": 0, "height": 0, "weight": 300} and saveandpublish there. The proper costs should now be calculated.

Expected result / actual result

The proper shipping costs should be calculated based on the weight regardless of entering length, width and height.

Dependencies

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions