Skip to content

Shipping methods hidden when delivery_note exists #47

@robsoned

Description

@robsoned

Description
Intelipost shipping methods are not shown when a delivery option contains a delivery_note. The module creates a carrier-level RateError before checking the delivery_risk_areas configuration, causing Magento to hide all Intelipost methods—even though the Intelipost API returns valid delivery options. This occurs regardless of whether risk-area handling is enabled or disabled.

Steps to Reproduce

  1. Configure the Intelipost module normally.
  2. Enter a destination postal code that triggers a delivery_note in the Intelipost API response
  3. Proceed to checkout and attempt to retrieve shipping methods.

Expected Behavior

  • Shipping methods that Intelipost returns as valid should appear in the checkout.
  • A delivery_note should not cause the entire carrier to error out.
  • Risk-area behavior should respect the delivery_risk_areas configuration:
  • If disabled: skip only the affected method.
  • If enabled: show the method normally, optionally log or annotate it.

Actual Behavior

  • When a delivery_note is present, the module immediately creates a RateError.
  • The carrier RateResult is marked as error = true before the configuration is evaluated.
  • Magento filters out all Intelipost shipping methods.

Additional Context

The issue is caused by the placement of setError(true) and append($error) before the delivery_risk_areas check. Any delivery_note, even when Intelipost still returns multiple valid delivery options, triggers a full carrier failure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions