manfield Posted July 11, 2013 Share Posted July 11, 2013 If you negotiated rates with UPS, you may would like to receive correct data from the carrier, during price calculation. Since the standard module does not consider this case, here is the hack to make it work. Modify file /modules/upscarrier/xml.tpl Just after <Shipment> tag, add: <RateInformation> <NegotiatedRatesIndicator /> </RateInformation> Then modify /modules/upscarrier/upscarrier.php, row 1732. Substitute block // Return results if (isset ($resultTab['RATINGSERVICESELECTIONRESPONSE']['RESPONSE']['RESPONSESTATUSDESCRIPTION']) && $resultTab['RATINGSERVICESELECTIONRESPONSE']['RESPONSE']['RESPONSESTATUSDESCRIPTION'] == 'Success') return array('connect' => true, 'cost' => $resultTab['RATINGSERVICESELECTIONRESPONSE']['RATEDSHIPMENT']['TOTALCHARGES']['MONETARYVALUE'] * $conversionRate); with // Return results if (isset ($resultTab['RATINGSERVICESELECTIONRESPONSE']['RESPONSE']['RESPONSESTATUSDESCRIPTION']) && $resultTab['RATINGSERVICESELECTIONRESPONSE']['RESPONSE']['RESPONSESTATUSDESCRIPTION'] == 'Success') { if (isset($resultTab['RATINGSERVICESELECTIONRESPONSE']['RATEDSHIPMENT']['NEGOTIATEDRATES'])) { return array('connect' => true, 'cost' => $resultTab['RATINGSERVICESELECTIONRESPONSE']['RATEDSHIPMENT']['NEGOTIATEDRATES']['NETSUMMARYCHARGES']['GRANDTOTAL']['MONETARYVALUE'] * $conversionRate); } else { return array('connect' => true, 'cost' => $resultTab['RATINGSERVICESELECTIONRESPONSE']['RATEDSHIPMENT']['TOTALCHARGES']['MONETARYVALUE'] * $conversionRate); } } Link to comment Share on other sites More sharing options...
PascalVG Posted July 11, 2013 Share Posted July 11, 2013 Hi Manfield, Thanks for posting! pascal 1 Link to comment Share on other sites More sharing options...
shturmie Posted November 4, 2013 Share Posted November 4, 2013 Hi Manfield, Thank you so very much for posting this. However the suggested updates didn't have an impact for us. For us, after making the code updates you suggested, the module still returns the non negotiated rates. Would you have any other suggestions/recommendations? Link to comment Share on other sites More sharing options...
manfield Posted November 4, 2013 Author Share Posted November 4, 2013 Hi, UPS carrier module caches results in a table: PS_UPS_CACHE I suggest you to truncate the table, then retry. Probably you're looking at old results. Let me know. Link to comment Share on other sites More sharing options...
shturmie Posted November 4, 2013 Share Posted November 4, 2013 Thank you so much for the quick response! Unfortunately, truncating PS_UPS_CACHE didn't make a difference. Link to comment Share on other sites More sharing options...
manfield Posted November 4, 2013 Author Share Posted November 4, 2013 Hi, in order to help you I need more information. Try to send this message (https://www.dropbox.com/s/copub9o64hr5348/UPScarrierXMLTemplate, replacing your account data to XXX I typed in the file) as POST request to: https://onlinetools.ups.com/ups.app/xml/Rate You may use a Firefox add on called Poster: http://screencast.com/t/HibT53U7j to easily submit the request and check response. You may send the response to manfredi[at]fabvla.com, I will check and tell you. Link to comment Share on other sites More sharing options...
shturmie Posted November 4, 2013 Share Posted November 4, 2013 WOW, you are amazing! Thank you so much for sending all this along and offering to assist! In the process of me updating the file that you have sent, I realized that we must be using the wrong ShipperNumber. Once I have updated the Your MyUps ID (ShipperNumber in the xml), all worked perfectly. Thank you so much!!!! 1 Link to comment Share on other sites More sharing options...
manfield Posted November 4, 2013 Author Share Posted November 4, 2013 Awesome. You're welcome. Link to comment Share on other sites More sharing options...
panamahatpub Posted May 27, 2015 Share Posted May 27, 2015 This is a great tip! It is amazing that this is not included in the module itself. In the UPS Module v1.3.5 there is a drop-down for Pickup Type that greatly affects the rates returned by the UPS API. When using your hack, which Pickup Type will result in the correct negotiated rate being returned by the API? Daily Pickup Customer Counter One Time Pickup On Call Air Suggested Retail Rates Letter Center Air Service Center Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now