Skip to content

UPS plugin. Incorrect total shipment weight with German store language #8306

Description

@hias-hias

nopCommerce: 4.90.8
UPS plugin: 4.90.3
Server: Linux

When using German as the storefront language, the UPS plugin calculates an incorrect ShipmentTotalWeight.

Steps to reproduce:

  1. Set a product’s weight to 2 kg.
  2. Select “Pack by one item per package”.
  3. Add one unit to the cart.
  4. Request shipping rates with German selected as the storefront language.

The request contains:

  • PackageWeight.Weight: "2.00" KGS
  • ShipmentTotalWeight.Weight: "200.00" KGS

UPS returns:
111547: Weight is out of allowable range.

With English selected, both values are correctly sent as "2.00" and the request succeeds.

The likely cause is decimal.TryParse using the current culture when reading package weights that were formatted using InvariantCulture.

Expected behavior:
Use culture-independent parsing when calculating ShipmentTotalWeight, so shipping rates work regardless of storefront language.

Related: #8065 fixed InvoiceLineTotal, but the total-weight calculation appears to have a similar culture issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions