2

I came through a problem with shipping labels on Magento 1.9.

When I try to create a label for UPS (using button "ship" and checking "create shipping label") a popup appears (so far so good) BUT after I create my package and clicking "ok" I got an

"Missing or invalid ship from address line 1".

As far as I know this is coming from UPS API.

My addresses are OK, I tried with several ones, but still got this error message.

Does someone have an idea about what is going on?

  • Not sure this is a Magento problem. Request to UPS is sent in Mage_Usa_Model_Shipping_Carrier_Ups::_doShipmentRequest and XML request looks ok. Xml answer is just a Failure status from UPS saying "Missing or invalid ship from address line 1". I have sent a message to UPS to get some advices. – Moyray Jul 19 '14 at 21:30
1

I have found how to fix this!

This was due to a too long shipper address (more than the 35 max characters allowed by UPS) and a little bug in Magento.

In Mage_Usa_Model_Shipping_Carrier_Ups::_formShipmentRequest method the address line 1 for shipper is set like this:

$addressPart->addChild('AddressLine1', $request->getShipperAddressStreet());
$addressPart->addChild('AddressLine2', $request->getShipperAddressStreet2());

As you could see the address line 1 is set with getRecipientAddressStreet() and NOT getRecipientAddressStreet1() which leads to insert address line 1 AND 2 in address line 1 shipper address in UPS request.

Could simple be fixed by replacing getRecipientAddressStreet by getRecipientAddressStreet1. I would recommend to extends class in a module.

  • And you have the same issue for return label with: $addressPart->addChild('AddressLine1', $request->getRecipientAddressStreet()); $addressPart->addChild('AddressLine2', $request->getRecipientAddressStreet2()); – Moyray Jul 21 '14 at 12:39
  • I'm surprised this "bug" hasn't been fixed yet. From what I can tell getShipperAddressStreet() prints out address line 1 and address line 2. – Daniel West Jun 22 '15 at 8:36
1

The solution is, UPS error "missing or invalid ship from company name" typically means the company name on your Ship From address exceeds the UPS character limits.

UPS Ship From company names can be a maximum of 35 chars (including spaces).

There is no bug at all in Magento

  • It might not be a bug but it is bad integration. – Daniel West Jun 22 '15 at 8:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.