Welcome, Guest. Please login or register.
Did you miss your activation email?
Login with username, password and session length


VirtueMart 1.1.5 - [SECURITY RELEASE] is available! Read more....

  Advanced search

216591 Posts in 58326 Topics- by 87991 Members - Latest Member: reid8hickman
Pages: [1] 2   Go Down
Print
Author Topic: UPS Shipping  (Read 12645 times)
Keith
Newbie
*
Posts: 5


View Profile
« on: May 18, 2007, 00:58:40 am »

We are using:

VirtueMart 1.0.7
Joomla! 1.0.11 Stable [ Sunbow ]
Hosted on a dedicated server at 1&1

The UPS shipping module is enabled and configured in the necessary places. The products have weights and dimensions. Our UPS login information is correct. File permissions are correct.

However, the plugin, does not work and does not display ANY ERRORS. No shipping is calculated.

Any suggestions?
Logged
thomas_freeman
Development Team
Sr. Member
*
Posts: 449



View Profile WWW
« Reply #1 on: May 18, 2007, 04:25:55 am »

Check your configuration and make sure that your checkout process includes a shipping step.  It is a common problem to have this setup to bypass it when you first setup VM.  Then later you start working on shipping but never see it.
Logged

Keith
Newbie
*
Posts: 5


View Profile
« Reply #2 on: May 18, 2007, 23:59:56 pm »

No already checked that. Here is the config we used for the store's checkout process:

Standard :
1. Shipping address request
2. Shipping method request
3. Payment method request
4. Complete Order
Logged
thomas_freeman
Development Team
Sr. Member
*
Posts: 449



View Profile WWW
« Reply #3 on: May 19, 2007, 05:58:12 am »

I'm guessing you have the debug information turned on and set to the highest level.

Do any of the other shipping methods work?  If another methods works but the UPS does not, then please post your ups file.

Thanks,
Thomas
Logged

Keith
Newbie
*
Posts: 5


View Profile
« Reply #4 on: May 21, 2007, 22:45:30 pm »

Yes, I am entering the UPS tables by hand and am using the Standard Shipping Module.  Angry
Not happy about this at all.

Yes, debugging is turned on.

Attached are the UPS files ( Some details have been changed for security reasons)


* ups.zip (8.91 KB - downloaded 477 times.)
Logged
thomas_freeman
Development Team
Sr. Member
*
Posts: 449



View Profile WWW
« Reply #5 on: May 22, 2007, 14:33:49 pm »

It doesn't look like you ever applied the UPS fix I posted earlier.  UPS changed the way their system works.  Just above line 300 there is a debug section.  If you have debug turned on, then it should be telling you something like "XML Result: ..."  What is it saying?

I've included the code from our previous fix here.  I've included from the debug section down, but all you need is from where Deneb's custom code ends to where it starts again.

Code:
if (DEBUG) {
echo "Cart Contents: " . $order_weight . " " . $weight_measure . "<br><br>\n";
echo "XML Post: <br>";
echo "<textarea cols='80'>" . $xmlPost . "</textarea>";
echo "<br>";
echo "XML Result: <br>";
echo "<textarea cols='80' rows='10'>" . $xmlResult . "</textarea>";
echo "<br>";
}
// END CUSTOM CODE - added by deneb


// Loop through the rate List
for ($i = 0; $i < $rate_list->getLength(); $i++) {
$currNode = & $rate_list->item($i);
if (in_array($currNode->childNodes[0]->getText(), $myservicecodes)) {
// Test for any shipper warnings first!
// if warning is present, we must use a different childNode numbering
$temp = $currNode->getElementsByTagName("RatedShipmentWarning");
$temp = $temp->item(0);
$shipment[$i]["RatedShipmentWarning"] = $temp->getText();
// First Element: Service Code
$temp = $currNode->getElementsByPath("Service");
$temp = $temp->item(0);
$shipment[$i]["ServiceCode"] = $temp->getText();

// Second Element: BillingWeight
$shipment[$i]["BillingWeight"] = $currNode->childNodes[3];
$temp = $currNode->getElementsByPath("BillingWeight/Weight");
$temp = $temp->item(0);
$shipment[$i]["BillingWeight"] = $temp->getText();

// Third Element: TransportationCharges
$shipment[$i]["TransportationCharges"] = $currNode->getElementsByPath("TransportationCharges/MonetaryValue");
$shipment[$i]["TransportationCharges"] = $shipment[$i]["TransportationCharges"]->item(0);
$shipment[$i]["TransportationCharges"] = $shipment[$i]["TransportationCharges"]->getText();

// Fourth Element: ServiceOptionsCharges
$shipment[$i]["ServiceOptionsCharges"] = $currNode->childNodes[5];
$temp = $currNode->getElementsByPath("ServiceOptionsCharges/MonetaryValue");
$temp = $temp->item(0);
$shipment[$i]["ServiceOptionsCharges"] = $temp->getText();

// Fifth Element: TotalCharges
$shipment[$i]["TotalCharges"] = $currNode->childNodes[6];
$temp = $currNode->getElementsByPath("TotalCharges/MonetaryValue");
$temp = $temp->item(0);
$shipment[$i]["TotalCharges"] = $temp->getText();

// Sixth Element: GuarenteedDaysToDelivery
$shipment[$i]["GuaranteedDaysToDelivery"] = $currNode->childNodes[7]->getText();
$temp = $currNode->getElementsByPath("GuaranteedDaysToDelivery");
$temp = $temp->item(0);
$shipment[$i]["GuaranteedDaysToDelivery"] = $temp->getText();

// Seventh Element: ScheduledDeliveryTime
$shipment[$i]["ScheduledDeliveryTime"] = $currNode->childNodes[8]->getText();
$temp = $currNode->getElementsByPath("ScheduledDeliveryTime");
$temp = $temp->item(0);
$shipment[$i]["ScheduledDeliveryTime"] = $temp->getText();

// Eighth Element: RatedPackage
// $shipment[$i]["RatedPackage"] = $currNode->childNodes[9];

// map ServiceCode to ServiceName
switch ($shipment[$i]["ServiceCode"]) {

case "01" :
$shipment[$i]["ServiceName"] = "UPS Next Day Air";
break;
case "02" :
$shipment[$i]["ServiceName"] = "UPS 2nd Day Air";
break;
case "03" :
$shipment[$i]["ServiceName"] = "UPS Ground";
break;
case "07" :
$shipment[$i]["ServiceName"] = "UPS Worldwide Express SM";
break;
case "08" :
$shipment[$i]["ServiceName"] = "UPS Worldwide Expedited SM";
break;
case "11" :
$shipment[$i]["ServiceName"] = "UPS Standard";
break;
case "12" :
$shipment[$i]["ServiceName"] = "UPS 3 Day Select";
break;
case "13" :
$shipment[$i]["ServiceName"] = "UPS Next Day Air Saver";
break;
case "14" :
$shipment[$i]["ServiceName"] = "UPS Next Day Air Early A.M.";
break;
case "54" :
$shipment[$i]["ServiceName"] = "UPS Worldwide Express Plus SM";
break;
case "59" :
$shipment[$i]["ServiceName"] = "UPS 2nd Day Air A.M.";
break;
case "64" :
$shipment[$i]["ServiceName"] = "n/a";
break;
case "65" :
$shipment[$i]["ServiceName"] = "UPS Express Saver";
break;

}
unset ($currNode);
}
}
// BEGIN CUSTOM CODE - added by deneb
Logged

Keith
Newbie
*
Posts: 5


View Profile
« Reply #6 on: May 22, 2007, 19:03:30 pm »

Hi Thomas - Thanks for the response.

Posted the code patch you supplied, and now I get the dreaded

Please select a Shipping Method!  - during checkout

any ideas?
Logged
Keith
Newbie
*
Posts: 5


View Profile
« Reply #7 on: May 22, 2007, 21:05:14 pm »

Ok - everything works now, here is what I did.

1) Added the block of code that Thomas gave me to ups.php ( see above )

2) I incorrectly was using our UPS account number instead of the XML access key.

Perhaps the syntax of the UPS shipping module configuration should have a small block of text stating that a developers  XML access key is needed in this area and that one needs to be requested if you don't already have one. Maybe a link to that page on UPS? https://www.ups.com/e_comm_access/laServ?CURRENT_PAGE=INTRO&OPTION=ACCESS_LICENSE&loc=en_US

Wink Thanks


Logged
Celtland
Newbie
*
Posts: 26


View Profile
« Reply #8 on: May 25, 2007, 02:10:21 am »

I'm having a similar problem (sort of).  Whenever I enable the UPS module, the shipping page takes forever to load then shows up completely blank/white - the page source is also blank.  I have made sure to enter my XML access key, account #, and password for UPS in the configuration.

I have also applied the fix in ups.php thomas_freeman posted above - I replaced what was there, and deleted the $shipment = array(); that appeared between the two sets of code (I didn't see it in the code posted above, so took it out - but for giggles I tried it with that piece of code as well -> same result unfortunately).  I have tried tweaking my product weight/dimensions - I'm up to whole units/pounds even though several of my products weigh less than a pound and are less than an inch high and wide, but still nothing happens.

I cannot debug because the shipping page is blank - and have done many searches of these forums looking for anything else that might clue me in.  I'm having no luck so far.  Any help is GREATLY appreciated.  Smiley
Logged
thomas_freeman
Development Team
Sr. Member
*
Posts: 449



View Profile WWW
« Reply #9 on: May 25, 2007, 02:44:58 am »

I know you may have already tried these but just to be thorough, are you sure you are seeing the shipping page?  Is it bypassing the page or showing the page blank?  (Could you post a screen shot?)

Have you gone into the VM configuration and turned on the debug?  I know you said you don't get anything but I want to double check that you have it turned on.

Finally, if you would like to PM me, I would be glad to take a look at your site.
Logged

Celtland
Newbie
*
Posts: 26


View Profile
« Reply #10 on: May 25, 2007, 02:58:57 am »

Thanks for responding so quickly.  I turned on the debug and enabled UPS just to see, and it seems I can only get to my homepage - anything else comes up blank.  I've attached a shot of the "About Us" page and PM'd you the site.  I appreciate your help!


** Edit **

The first time I tried to access anything except my home page it came up blank.  Now I can go to any page except the "problem" during checkout when I attempt to get to the shipping modules.  (I have the 4-step checkout selected.)

And thanks for mentioning it - when the page goes blank during checkout, it looks like I'm rerouted back to the main index.php.  But no matter how many times I reload the page, it won't show up (but it will if use a bookmarked page).


* blank_screen_ups_enabled.jpg (36.01 KB, 800x600 - viewed 489 times.)
« Last Edit: May 25, 2007, 03:13:41 am by Celtland » Logged
thomas_freeman
Development Team
Sr. Member
*
Posts: 449



View Profile WWW
« Reply #11 on: May 25, 2007, 03:33:43 am »

Hmmm.  That really sounds like a problem with your rewrites (You must be using a SEF solution.)   I think you should disable the SEF and see if it starts working.
Logged

Celtland
Newbie
*
Posts: 26


View Profile
« Reply #12 on: May 25, 2007, 03:41:55 am »

Thanks!  I'm using JoomSEF.  I'll disable it and see what happens.
Logged
Celtland
Newbie
*
Posts: 26


View Profile
« Reply #13 on: May 25, 2007, 04:51:32 am »

I uninstalled JoomSEF, disabled SEO in Joomla global configuration, and renamed the .htaccess file.  Weird - but it's the same result as before - the screen goes blank when I get to the shipping page.  Perhaps fresh eyes in the morning will help.  Thanks again.
Logged
Celtland
Newbie
*
Posts: 26


View Profile
« Reply #14 on: May 26, 2007, 00:55:41 am »

I've decided to forego the UPS shipping module for now - it might be the stomach flu or most of the day yesterday I spent on it still unable to get it work.  Smiley  I'll keep JoomSEF for the time being and try try again later.  Thanks again for your help, Thomas.
Logged
Pages: [1] 2   Go Up
Print
Jump to: