Magento UPS-Extension

After purchasing the "UPS Shipment" extension and downloading the file bms-magento-upsshipment-1.3.3.zip, it is unpacked and copied to the root directory of the Magento installation. The SOAP (PHP) extension must be enabled for this. After activating the extension, the error "Missing or invalid Shipto AttentionName" may occur when shipping to an address outside Germany. In this case, UPS requires not only the actual recipient but also the "Attn." entry, which is not transmitted by Magento.

 

 The error occurs in the file

 

/app/code/community/MDN/UpsShipment/Model/Convertor/Shipment.php

 

In this case, it helps to add the missing entry after the line (around line 69)

 

$shipTo['Name'] = $helper->checkMaxLength(implode(' ', $name));

 

using the following instructions:

 

if ($shippingAddress->getcountry_id() != 'DE') {

                $shipTo['AttentionName'] = $shipTo['Name'];

}

 

Additionally, the extension then makes itself known through the error message "Missing or invalid Shipper AttentionName", which is a similar issue.  Here, we modify the file

 

/app/code/community/MDN/UpsShipment/Model/Configuration.php

 

in which we add the following line, for example, after the line (around line 69)

 

'Name'                    => Mage::getStoreConfig('upsshipment/shipper/name', $storeId),

 

'AttentionName'           => Mage::getStoreConfig('upsshipment/shipper/name', $storeId),

 

With this, everything should work smoothly. Tested with Magento CE 1.8.0.0.