Skip to content

UPS REST "A shipment cannot have a KGS/IN or LBS/CM or OZS/CM as its unit of measurements" #38618

@sanmic

Description

@sanmic

Preconditions and environment

Magento version 2.4.7

Steps to reproduce

Set European Union as Origin of the Shipment in Sales->Delivery Methods->UPS

Expected result

UPS rates is visible in checkout and cart.

Actual result

No UPS rates is visible in checkout and cart.

Additional information

Seems like UnitOfMeasurement is hardcoded to "IN".
If you have European Union (other origins may experience the same problem) as Origin of the Shipment this will cause an error in the UPS REST request:
"A shipment cannot have a KGS/IN or LBS/CM or OZS/CM as its unit of measurements"

1147 foreach ($rowRequest->getPackages() as $package) {
1148 $rateParams['RateRequest']['Shipment']['Package'][] = [
1149 "PackagingType" => [
1150 "Code" => "{$params['48_container']}",
1151 "Description" => "Packaging"
1152 ],
1153 "Dimensions" => [
1154 "UnitOfMeasurement" => [
1155 "Code" => "IN",
1156 "Description" => "Inches"
1157 ],
1158 "Length" => "5",
1159 "Width" => "5",
1160 "Height" => "5"
1161 ],
1162 "PackageWeight" => [
1163 "UnitOfMeasurement" => [
1164 "Code" => "{$rowRequest->getUnitMeasure()}"
1165 ],
1166 "Weight" => "{$this->_getCorrectWeight($package['weight'])}"
1167 ]
1168 ];
1169 }

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Labels

Area: ShippingComponent: UpsIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Progress: doneReported on 2.4.7Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions