Author Topic: UPS International shows no price *FIX*  (Read 1727 times)

jerepops

  • Beginner
  • *
  • Posts: 28
UPS International shows no price *FIX*
« on: February 18, 2011, 19:03:16 pm »
Already saw 2 threads with this problem. I ran into this problem yesterday and was able to figure it out. Here is the fix. Hope it helps someone.

Open the file ups.php in administrator/components/com_virtuemart/classes/shipping

Change line 232 from:
if( $currNode->childNodes[$e]->nodeName == 'RatedShipmentWarning') {

to:

while( $currNode->childNodes[$e]->nodeName == 'RatedShipmentWarning') {

the problem is ups sometimes returns more then one 'RatedShipmentWarning' so you need to loop through all of them.  The "if" satement just goes through one occurrence, so if more then one was returned then the shipping price would get mapped wrong.  The  "while" statement will continue to loop through the warnings until there are no more.

and boom goes the dyanmite!