getRequestedPackageLineItemsAllInOne() creates invalid packages

Created on 5 December 2024, 17 days ago

Problem/Motivation

When creating a new shipment from the order admin screen the following error occurs:
Error: Call to a member function render() on null in Drupal\commerce_fedex\Plugin\Commerce\ShippingMethod\FedEx->getRequestedPackageLineItemsAllInOne()

This error exposes that the getRequestedPackageLineItemsAllInOne() function is designed incorrectly. It iterates over packages and then tries to insert a single line item with the shipment title as the description.

Steps to reproduce

Create a FedEx shipping method. Set the packer to "All in one". Create a new shipment on the order shipments admin screen.

Proposed resolution

Rewrite getRequestedPackageLineItemsAllInOne() so it iterates over line items in the shipment and adds each shipment item as a line item in the rate request like it does in getRequestedPackageLineItemsIndividual()

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States rhovland Oregon

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024