Skip to content

Weight-based Shipping Rates ignore pricing breakpoints due to inconsistent weight unit handling #2381

@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 a Shipping Method is configured with Charge By: Weight, the correct pricing break (shipping tier) should be selected based on the cart’s total weight. As the cart weight increases and crosses defined breakpoints, the corresponding Shipping Breakdown price should be applied.

Actual Behaviour:

The pricing breaks are ignored or applied inconsistently. In many cases, the system always returns the same base shipping price regardless of the cart’s total weight, as if the breakpoints are not being evaluated correctly.

Steps To Reproduce:

  1. Create a Shipping Method and set Charge By to Weight
  2. Assign the Shipping Method to a Zone
  3. Create a Shipping Rate with multiple pricing breaks (Shipping Breakdowns) based on weight (e.g. 5, 10)
  4. Add products with variant weights set 2kg
  5. Increase the cart total weight so that it crosses defined breakpoints (add 4 quantity from the variant (4 * 2 = 8))
  6. Observe that the returned shipping price does not change according to the configured tiers

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