Rank: Advanced Member
Groups: HelpDesk, Developers Joined: 11/9/2018(UTC) Posts: 564
Thanks: 122 times Was thanked: 26 time(s) in 25 post(s)
|
When UPS labels are enabled, you cannot generate a label when marking the shipment as shipped if the product name exceeds 50 characters. Or more specifically, if the total length of all product names on the shipment exceed 50 characters. The error response is: Quote: Ship operation failed for provider 'UPS OnLine® Tools' with error: An error occured while confirming shipment # 1 for order # 135170. Error code: 120503 error message: Shipment Description cannot exceed the length of 50 characters
Technically this is happening in Gold R12 but the AC9 gateway code is identical. Specifically the problem is in the BuildShipConfirmRequest() routine. You can't use product names as the description for the shipment, it'll just blow the character limit practically every time. Code:
// /ShipmentConfirmRequest/Shipment/Description
string description = string.Empty;
foreach (OrderItem item in orderShipment.OrderItems)
{
if (item.OrderItemType == OrderItemType.Product)
{
if (!string.IsNullOrEmpty(description)) description += ", ";
description += item.Name;
}
}
XmlUtility.SetElementValue(shipmentNode, "Description", description, true);
change the code to this in order to fix the issue: Code:
// /ShipmentConfirmRequest/Shipment/Description
string description = string.Empty;
foreach (OrderItem item in orderShipment.OrderItems)
{
if (item.OrderItemType == OrderItemType.Product)
{
if (!string.IsNullOrEmpty(description)) description += ", ";
description += item.Name;
}
}
// BEGIN MOD: AbleMods.com
// DATE: 4-21-2020
// prevent description from exceeding 50 characters
description = description.Length <= 50 ? description : description.Substring(0, 50);
// END MOD: AbleMods.com
XmlUtility.SetElementValue(shipmentNode, "Description", description, true);
|
|
|
|
Rank: Administration
Groups: Admin, Administrators, HelpDesk, System, Authorized User, Developers, Registered Joined: 10/5/2018(UTC) Posts: 175
Thanks: 8 times Was thanked: 17 time(s) in 15 post(s)
|
Thanks for reporting the issue. We will look into this.
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The AbleCommerce Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close