0

When I update a shipment in the admin with a tracking number, Magento will automatically figure out what kind of "speed" it is.

For example, I log on to admin -> Orders -> open an unprocessed order -> click to create a shipment. I would select "UPS", enter a tracking number, and submit the shipment. Once this is complete, Magento displays the following, even though I did not specify Next Day Air, nor is there any shipping rate request from UPS, as far as I can see on the admin side. The price is what the customer already paid during checkout.

Shipping & Handling Information
Track Order
United Parcel Service - *Next Day Air* $69.10

How or where does it figure out that this is a Next Day Air shipment?

UPDATE: made some clarifications.

UPDATE 2: In sales_flat_order.shipping_method, you'll find the shipping code responsible for the order.

4

It's not quite clear what you're asking, but in general Magento will communicate with the UPS API, which gives it access to UPS internal codes for package type, shipping, etc. Most of these are translated using code in the class file

app/code/core/Mage/Usa/Model/Shipping/Carrier/Ups.php

For example, the origin shipment codes for US domestic packages

#File: app/code/core/Mage/Usa/Model/Shipping/Carrier/Ups.php
        'originShipment'=>array(
            // United States Domestic Shipments
            'United States Domestic Shipments' => array(
                '01' => Mage::helper('usa')->__('UPS Next Day Air'),
                '02' => Mage::helper('usa')->__('UPS Second Day Air'),
                '03' => Mage::helper('usa')->__('UPS Ground'),
                '07' => Mage::helper('usa')->__('UPS Worldwide Express'),
                '08' => Mage::helper('usa')->__('UPS Worldwide Expedited'),
                '11' => Mage::helper('usa')->__('UPS Standard'),
                '12' => Mage::helper('usa')->__('UPS Three-Day Select'),
                '13' => Mage::helper('usa')->__('UPS Next Day Air Saver'),
                '14' => Mage::helper('usa')->__('UPS Next Day Air Early A.M.'),
                '54' => Mage::helper('usa')->__('UPS Worldwide Express Plus'),
                '59' => Mage::helper('usa')->__('UPS Second Day Air A.M.'),
                '65' => Mage::helper('usa')->__('UPS Saver'),
            ),

Or the actual method codes

        'method'=>array(
            '1DM'    => Mage::helper('usa')->__('Next Day Air Early AM'),
            '1DML'   => Mage::helper('usa')->__('Next Day Air Early AM Letter'),
            '1DA'    => Mage::helper('usa')->__('Next Day Air'),
            '1DAL'   => Mage::helper('usa')->__('Next Day Air Letter'),
            '1DAPI'  => Mage::helper('usa')->__('Next Day Air Intra (Puerto Rico)'),
            '1DP'    => Mage::helper('usa')->__('Next Day Air Saver'),
            '1DPL'   => Mage::helper('usa')->__('Next Day Air Saver Letter'),
            '2DM'    => Mage::helper('usa')->__('2nd Day Air AM'),
            '2DML'   => Mage::helper('usa')->__('2nd Day Air AM Letter'),
            '2DA'    => Mage::helper('usa')->__('2nd Day Air'),
            '2DAL'   => Mage::helper('usa')->__('2nd Day Air Letter'),
            '3DS'    => Mage::helper('usa')->__('3 Day Select'),
            'GND'    => Mage::helper('usa')->__('Ground'),
            'GNDCOM' => Mage::helper('usa')->__('Ground Commercial'),
            'GNDRES' => Mage::helper('usa')->__('Ground Residential'),
            'STD'    => Mage::helper('usa')->__('Canada Standard'),
            'XPR'    => Mage::helper('usa')->__('Worldwide Express'),
            'WXS'    => Mage::helper('usa')->__('Worldwide Express Saver'),
            'XPRL'   => Mage::helper('usa')->__('Worldwide Express Letter'),
            'XDM'    => Mage::helper('usa')->__('Worldwide Express Plus'),
            'XDML'   => Mage::helper('usa')->__('Worldwide Express Plus Letter'),
            'XPD'    => Mage::helper('usa')->__('Worldwide Expedited'),
        ),

etc.

If that's not what you were after, a little more specificity in your question would help.

  • The example action is taken in the admin -> orders -> click on an unprocessed order -> create shipment. Does that clarity my question? I think the current answer is more related to getting shipment rates from the carrier? – musicliftsme Oct 23 '13 at 15:58
  • @laketuna Not really — your question is pretty broad. Do you now know what controller action to look in? Do you not know what a controller action is? Are you asking for the point the API request is made? etc. – Alan Storm Oct 23 '13 at 16:13
  • I don't know what the controller action is, so I think that would be the best place to start, so I can trace it to the point when the API request is made. – musicliftsme Oct 24 '13 at 15:56

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.