Skip to content

Product variant weight_unit defaults to mm instead of a valid weight unit #2383

@Huncsuga

Description

@Huncsuga
  • Lunar version: 1.2.1
  • Laravel Version: 12.42.0
  • PHP Version: 8.3.28
  • Database Driver & Version: MySQL 8.0.37

Expected Behaviour:

When creating a product and its related variants, the weight_unit field should default to a valid weight measurement unit, such as kg, g, or lbs.

Actual Behaviour:

When a product variant is created, the weight_unit field is automatically set to mm by default in the database.
mm is a length unit, not a weight unit, which leads to incorrect or inconsistent behavior when weight-based logic (e.g. shipping rates, weight calculations) is applied.

Steps To Reproduce:

  1. Create a new product in the Lunar admin panel..
  2. Check the database record for the created product variant.
  3. Observe that weight_unit is set to mm by default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions