I am using Magento Enterprise.
I am trying to pull the Saturday delivery option from the UPS API
on my checkout page on the frontend. I can't seem to get anywhere with it at the moment. I have the option enabled on the admin and when I try to call the getAvailableMethods()
function and print the result I get the Saturday delivery option on the array but I can't get the option to display on the frontend. I have modified the UPS model
to include the code of the saturday delivery (which after a lot of research I've found out that does not work that way anymore) but it is still not doing anything. Is there a way in which I can get the delivery option on my frontend checkout page?
Here's some of the code I'm using
in my UPS Model
I've included the Saturday delivery option under my originShipment array
'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'),
'33' => Mage::helper('usa')->__('UPS Saturday Delivery'),
),
and under my method array
'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'),
'SAT' => Mage::helper('usa')->__('Saturday Delivery'),
),
'containers_filter' => array(
array(
'containers' => array('00'), // Customer Packaging
'filters' => array(
'within_us' => array(
'method' => array(
'01', // Next Day Air
'13', // Next Day Air Saver
'12', // 3 Day Select
'59', // 2nd Day Air AM
'03', // Ground
'14', // Next Day Air Early AM
'02', // 2nd Day Air
'33', // Saturday Delivery
)
),
'from_us' => array(
'method' => array(
'07', // Worldwide Express
'54', // Worldwide Express Plus
'08', // Worldwide Expedited
'65', // Worldwide Saver
'11', // Standard
'33', // Saturday Delivery
)
)
)
),
And I've enabled all options from my admin. Now in theory this should bring the saturday delivery on my frontend unless I'm using the wrong code for the Saturday delivery option. I'm not sure what I'm doing wrong here.
Thanks
This is an old question, but still a relevant one who's solution isn't readily available in my experience.
The issue with the above code is that it is assuming that Saturday delivery is a rate from UPS. However in the UPS API documentation they state that it is instead a shipping option. If you add this shipping option to the API request it will return ALL of the rates in that request with Saturday delivery applied.
For that reason the solution to this issue in Magento is to make two requests to the UPS API - once for non-Saturday rates and once for Saturday rates.
I've put together a module to add this functionality that can be found here.
https://github.com/PromInc/Magento-1.x-UPS-Saturday-Delivery
But for the sake of ensuring we understand what is happening I'll explain the code here (using the Core files for an example - of course don't overwrite your core files!!!):
Add a carrier to the carrier list - copying UPS.
Set the carrier code for the new carrier (upssaturday) to ups to ensure we load the right class and make the request to UPS.
Also set a variable to flag that this carrier has the Saturday delivery option enabled.
When parsing the XML response, modify the method code and display name to reflect that it is a Saturday delivery shipping method.
Add the Saturday delivery option to the XML request for obtaining quotes if enabled for this rate.