News:

Support the VirtueMart project and become a member

Main Menu

UPS shipping otions do not show

Started by felixp, September 16, 2009, 17:54:02 PM

Previous topic - Next topic

felixp

I have the USPS and UPS (version 1.0) modules enabled and configured. It's the identical setup on live and test servers. On the test server everything shows up, but on live server the UPS shipping options do not show.

I've attached a screen shot; the UPS options should be above the USPS options. Any help is appreciated.

I'm running:
Joomla - 1.5.6
VirtueMart - 1.1.3

[attachment cleanup by admin]
Joomla - 1.5.6
VirtueMart - 1.1.3

lowmips

Visit my website at www.lowmips.com
View my newsletters Here (sign up for newsletters on the front page of my website)

felixp

Now it's not even finishing loading the page. It was doing this yesterday too. Seems like it's not communicating with ups.com for whatever reason.

[attachment cleanup by admin]
Joomla - 1.5.6
VirtueMart - 1.1.3

felixp

Ok here's the debug info:

Debug: Using existing Session 2ceb47ad914b1161b3001b62ad472569, ID: ljlln6kf0baj1g2b7cj495v1l3.
Debug: calculating tax based on shipping address
Debug: Starting Shipping module: ups
Debug: Connection opened to www.ups.com
Debug: Now posting the variables.
Cart Contents: 2 LBS

XML Post:

<?xml version="1.0"?><AccessRequest xml:lang="en-US"> <AccessLicenseNumber>xxxxxxxx</AccessLicenseNumber> <UserId>xxxxxxxx</UserId> <Password>xxxxxxx</Password></AccessRequest><?xml version="1.0"?><RatingServiceSelectionRequest xml:lang="en-US"> <Request>  <TransactionReference>  <CustomerContext>Shipping Estimate</CustomerContext>  <XpciVersion>1.0001</XpciVersion>  </TransactionReference>  <RequestAction>rate</RequestAction>  <RequestOption>shop</RequestOption> </Request> <PickupType>  <Code>06</Code> </PickupType> <Shipment>  <Shipper>   <Address>    <PostalCode>45244</PostalCode>    <CountryCode>US</CountryCode>   </Address>  </Shipper>  <ShipTo>   <Address>    <PostalCode>45209</PostalCode>    <CountryCode>US</CountryCode>    <ResidentialAddressIndicator/>   </Address>  </ShipTo>  <ShipFrom>   <Address>    <PostalCode>45244</PostalCode>    <CountryCode>US</CountryCode>   </Address>  </ShipFrom>  <Package>   <PackagingType>    <Code>02</Code>   </PackagingType>   <PackageWeight>    <UnitOfMeasurement>     <Code>LBS</Code>    </UnitOfMeasurement>    <Weight>2</Weight>   </PackageWeight>  </Package> </Shipment></RatingServiceSelectionRequest>


XML Result:

HTTP/1.0 200 OK
Server: Apache
Content-Length: 7322
Content-Type: application/xml
Expires: Wed, 16 Sep 2009 18:00:00 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Wed, 16 Sep 2009 18:00:00 GMT
Connection: close

<?xml version="1.0"?>
<RatingServiceSelectionResponse><Response><TransactionReference><CustomerContext>Shipping Estimate</CustomerContext><XpciVersion>1.0001</XpciVersion></TransactionReference><ResponseStatusCode>1</ResponseStatusCode><ResponseStatusDescription>Success</ResponseStatusDescription></Response><RatedShipment><Service><Code>03</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>2.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>13.31</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>13.31</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery/><ScheduledDeliveryTime/><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>13.31</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>13.31</MonetaryValue></TotalCharges><Weight>2.0</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>2.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>12</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>2.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>14.72</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>14.72</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>3</GuaranteedDaysToDelivery><ScheduledDeliveryTime/><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>14.72</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>14.72</MonetaryValue></TotalCharges><Weight>2.0</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>2.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>02</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>2.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>19.83</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>19.83</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>2</GuaranteedDaysToDelivery><ScheduledDeliveryTime/><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>19.83</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>19.83</MonetaryValue></TotalCharges><Weight>2.0</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>2.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>13</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>2.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>26.69</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>26.69</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery><ScheduledDeliveryTime/><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>26.69</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>26.69</MonetaryValue></TotalCharges><Weight>2.0</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>2.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>14</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>2.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>61.66</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>61.66</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery><ScheduledDeliveryTime>8:00 A.M.</ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>61.66</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>61.66</MonetaryValue></TotalCharges><Weight>2.0</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>2.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>01</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>2.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>28.96</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>28.96</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery><ScheduledDeliveryTime>10:30 A.M.</ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>28.96</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>28.96</MonetaryValue></TotalCharges><Weight>2.0</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>2.0</Weight></BillingWeight></RatedPackage></RatedShipment></RatingServiceSelectionResponse>



Debug: Starting Shipping module: uspsv4

XML Post:

http://production.shippingapis.com/ShippingAPI.dll?API=RateV3&XML=<RateV3Request USERID="xxxxxxxxx" PASSWORD="xxxxxxxx"><Package ID="0"><Service>All</Service><ZipOrigination>45244</ZipOrigination><ZipDestination>45209</ZipDestination><Pounds>2</Pounds><Ounces>2</Ounces><Size>REGULAR</Size><Machinable>FALSE</Machinable></Package></RateV3Request>


XML Result:

<?xml version="1.0"?><RateV3Response><Package ID="0"><ZipOrigination>45244</ZipOrigination><ZipDestination>45209</ZipDestination><Pounds>2</Pounds><Ounces>2</Ounces><Size>REGULAR</Size><Machinable>FALSE</Machinable><Zone>1</Zone><Postage CLASSID="23"><MailService>Express Mail Sunday/Holiday Guarantee</MailService><Rate>29.80</Rate></Postage><Postage CLASSID="25"><MailService>Express Mail Flat-Rate Envelope Sunday/Holiday Guarantee</MailService><Rate>30.00</Rate></Postage><Postage CLASSID="2"><MailService>Express Mail Hold ForPickup</MailService><Rate>17.30</Rate></Postage><Postage CLASSID="27"><MailService>Express Mail Flat-Rate Envelope Hold For Pickup</MailService><Rate>17.50</Rate></Postage><Postage CLASSID="3"><MailService>Express Mail</MailService><Rate>17.30</Rate></Postage><Postage CLASSID="13"><MailService>Express Mail Flat-Rate Envelope</MailService><Rate>17.50</Rate></Postage><Postage CLASSID="1"><MailService>Priority Mail</MailService><Rate>5.50</Rate></Postage><Postage CLASSID="16"><MailService>Priority Mail Flat-Rate Envelope</MailService><Rate>4.95</Rate></Postage><Postage CLASSID="28"><MailService>Priority Mail Small Flat-Rate Box</MailService><Rate>4.95</Rate></Postage><Postage CLASSID="17"><MailService>Priority Mail Regular/Medium Flat-Rate Boxes</MailService><Rate>10.35</Rate></Postage><Postage CLASSID="22"><MailService>Priority Mail Large Flat-Rate Box</MailService><Rate>13.95</Rate></Postage><Postage CLASSID="4"><MailService>Parcel Post</MailService><Rate>5.45</Rate></Postage><Postage CLASSID="5"><MailService>Bound Printed Matter</MailService><Rate>2.54</Rate></Postage><Postage CLASSID="6"><MailService>Media Mail</MailService><Rate>3.16</Rate></Postage><Postage CLASSID="7"><MailService>Library Mail</MailService><Rate>3.00</Rate></Postage></Package></RateV3Response>


Cart Contents: 2.1
Joomla - 1.5.6
VirtueMart - 1.1.3

lowmips

The XML replies for both the UPS and USPS queries are valid.
What services have you checked in the UPS setup?
Visit my website at www.lowmips.com
View my newsletters Here (sign up for newsletters on the front page of my website)

felixp

Quote from: lowmips on September 17, 2009, 03:03:02 AM
The XML replies for both the UPS and USPS queries are valid.
What services have you checked in the UPS setup?

I have them all checked except UPS Worldwide Expedited SM, UPS 2nd Day Air A.M, and n/a.
Joomla - 1.5.6
VirtueMart - 1.1.3

lowmips

Strange...it's getting results but not showing them.  What's the website URL?
Visit my website at www.lowmips.com
View my newsletters Here (sign up for newsletters on the front page of my website)

felixp

Quote from: lowmips on September 17, 2009, 14:38:49 PM
Strange...it's getting results but not showing them.  What's the website URL?

It's www.fmca.com  -  the link for the Store is under the Home main menu called Store Test. And the only product that has inventory is Men's Pocket T-Shirt-Ash Gray. Thanks for the help.
Joomla - 1.5.6
VirtueMart - 1.1.3

lowmips

I created a test account and tried to checkout.  I got a semi-rendered page, as you did in one of your screenshots.  Obviously, an error is occurring.  But your server is set to not show errors.  So if you could turn the error logging up in your php config that would be a good starting place. 
-Reggie
Visit my website at www.lowmips.com
View my newsletters Here (sign up for newsletters on the front page of my website)

felixp

Thank you for trying Reggie. I'll have to have my IT Manager turn on error logging and report back what I find.
Joomla - 1.5.6
VirtueMart - 1.1.3

felixp

Part of the problem was our firewall blocking the communication. We fixed that but now the page renders correctly, but no UPS options show up. Could you look at it again for me?
Joomla - 1.5.6
VirtueMart - 1.1.3

felixp

I found the problem; the variable $rate_list->getLength() is 0 so it doesn't even run through that For loop.

But on my test server, which is running the same exact code in the same exact environment shows that it equals 6.

I'm lost at why that would be.
Joomla - 1.5.6
VirtueMart - 1.1.3

lowmips

I assume you mean lines 222-223:

// Loop through the rate List
for ($i = 0; $i < $rate_list->getLength(); $i++) {


That is weird. You posted an xml result earlier that is valid.  Check the lines above it to see if the XML libraries are working as expected:

Line 155:
$xmlResult = vmConnector::handleCommunication($upsURL, $xmlPost );
Here's where xmlResult is set.  Check what it is.  If empty, you should get a nice error message on the next line.  If not empty, maybe it contains something unexpected.

Line 165:

$xmlDoc->parseXML( $xmlResult, false, true );

This is never checked for success.  Maybe it's failing? Catch the result and check it.  Should be boolean true or false.

Visit my website at www.lowmips.com
View my newsletters Here (sign up for newsletters on the front page of my website)

lowmips

Come to think of it, I bet it's choking on this part:

HTTP/1.0 200 OK
Server: Apache
Content-Length: 7322
Content-Type: application/xml
Expires: Wed, 16 Sep 2009 18:00:00 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Wed, 16 Sep 2009 18:00:00 GMT
Connection: close


I think I added code to my UPSv2 module that parses this out if it exists.
-Reggie
Visit my website at www.lowmips.com
View my newsletters Here (sign up for newsletters on the front page of my website)

felixp



$xmlDoc->parseXML( $xmlResult, false, true );

This is coming back as false (0), but on my test server it's a 1.
Joomla - 1.5.6
VirtueMart - 1.1.3