Jump to content
torinwalker

New UPS XML Shipping Module available

Recommended Posts

by the way... At first I tried to do it like  just by adding a 2nd $eta_arrival_date+2, but of course it doesn't look at work days and weekends so it won't work.
You could add a little bit of PHP to look for that, but it won't take notice of official holidays on Mondays and Tuesdays of course.

// START doing things differently 

              
   if (isset($this->servicesTimeintransit[$type])) {
   $eta_array = explode("-", $this->servicesTimeintransit[$type]["date"]);
   $eta_unix = strtotime($this->servicesTimeintransit[$type]["date"]);
   $day_of_eta = date('w', $eta_unix); // get numeric representation of the day of the week: 0 is Sunday
   if ($day_of_eta == 4 ) { // 4 = Thursday
    $eta_upper_limit_unix = strtotime("+4 days", $eta_unix);
   } elseif ($day_of_eta == 5 ) { // 5 = Friday
    $eta_upper_limit_unix = strtotime("+3 days", $eta_unix);
   } else {
    $eta_upper_limit_unix = strtotime("+2 days", $eta_unix);
   }
   $eta_upper_limit_date = date("M j, Y", $eta_upper_limit_unix); // print date as (e.g.) May 1, 2005
   $months = array (" ", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
   $eta_arrival_date = $months[(int)$eta_array[1]]." ".(int)$eta_array[2].", ".$eta_array[0];
  $_type = "<b>".$_type."</b>";
  $_type .= " - Delivery within: ".$eta_arrival_date . " - " . $eta_upper_limit_date."<font color='#FF0000'>*</font>";
  }
       //END of doing things differently:

Share this post


Link to post
Share on other sites

Need help here...

Been using this vor quite some time now, version 1.1.3a

 

I have always had my choice of UPS shipping methods until I decided to uninstall through the Admin and then re-install it. After re-installing it, the ONLY UPS shipping option is Ground and I have 3 others that should be there too.

 

Anyone have any ideas as to why the Ground option is the only one?


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites

hi again. I had given up on this along time ago and decided to just use USPS, but now the time has come that I am in need of the UPS shipping option on my site. I orginally had the problem with the "Fatal error: Call to a member function on a non-object in /path/to/catalog/includes/classes/xmldocument.php on line 57" error.

Well, I cant get it to come up while trying out UPS shipping now, so maybe it fixed itself........??

 

Anyhow, my big problem is that the shipping costs on OSC dont match that of the UPS site for me. The UPS XML module returns lower values then that of the UPS website calculator. Im using the 1.1.3 version. Ive tried MANY different combinations and have double checked all my settings in the module many times....simply cant get them to match up. Any ideas that could help me out?

 

Thanks ALOT in advance! :thumbsup:

Share this post


Link to post
Share on other sites

nevermind most of the above post, I was doing something stupid.

 

I AM still curious as to the solution to the "Fatal error: Call to a member function on a non-object in /path/to/catalog/includes/classes/xmldocument.php on line 57" error. I believe I was the first to notice the issue on here, and never read a solution to it.

 

I believe I started out with version 1.04.1 and then upgraded to version 1.1.3. Im not sure if I had the error after upgrading or not, as its been awhile since I used the UPS XML module. I know that it SEEMS to be working ok now, but im afraid if I go live with the UPS shipping that cutomers may end up getting the above error. Is there any way to know that it wont come up? Did anybody positively figure this glitch out? Thanks!

Share this post


Link to post
Share on other sites

Thanks again Jan.

It works and is exactly as I wanted it to be!

 

The holliday thing won't be a big problem..

Share this post


Link to post
Share on other sites
Need help here...

Been using this vor quite some time now, version 1.1.3a

 

I have always had my choice of UPS shipping methods until I decided to uninstall through the Admin and then re-install it. After re-installing it, the ONLY UPS shipping option is Ground and I have 3 others that should be there too.

 

Anyone have any ideas as to why the Ground option is the only one?

 

 

Anyone?


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites
Anyone have any ideas as to why the Ground option is the only one?
I think you will to have to do some debugging to find out where the problem is.

You could for example start with adding a bit of PHP to the page checkout_shipping.php, in the JavaScript area (so that your customers don't see it) to find out if the allowed types are the culprit:

function rowOutEffect(object) {
 if (object.className == 'moduleRowOver') object.className = 'moduleRow';
}
<?php
   $allowed_types = explode(",", MODULE_SHIPPING_UPSXML_TYPES);
   echo '<pre>allowed types is : ';
   print_r($allowed_types);
   echo '<pre>';
?>
//--></script>
</head>

If Ground is the only one that shows up, there is a starting point (check the table where MODULE_SHIPPING_UPSXML_TYPES is stored next). If all your options are shown, start logging the request to UPS and the replies. Maybe UPS is only returning Ground options?

Share this post


Link to post
Share on other sites
I think you will to have to do some debugging to find out where the problem is.

You could for example start with adding a bit of PHP to the page checkout_shipping.php, in the JavaScript area (so that your customers don't see it) to find out if the allowed types are the culprit:

function rowOutEffect(object) {
?if (object.className == 'moduleRowOver') object.className = 'moduleRow';
}
<?php
? ?$allowed_types = explode(",", MODULE_SHIPPING_UPSXML_TYPES);
? ?echo '<pre>allowed types is : ';
? ?print_r($allowed_types);
? ?echo '<pre>';
?>
//--></script>
</head>

If Ground is the only one that shows up, there is a starting point (check the table where MODULE_SHIPPING_UPSXML_TYPES is stored next). If all your options are shown, start logging the request to UPS and the replies. Maybe UPS is only returning Ground options?

 

 

Ok, I added it in, but what do I do with it or what does it do? Is it supposed to display something?

 

In the database, the "configuration_value" is:

2nd Day Air, Ground, Worldwide Express, Standard, 3 Day Select

Edited by PopTheTop

L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites
Ok, I added it in, but what do I do with it or what does it do? Is it supposed to display something?

 

In the database, the "configuration_value" is:

2nd Day Air, Ground, Worldwide Express, Standard, 3 Day Select

It is supposed to show these values in the source of checkout_shipping.php (in the head of the HTML page, at the end of the JavaScript code, so that it is not visible output for a customer but you can make a test order and see if all these configuration values show up.

Share this post


Link to post
Share on other sites

I see now...

 

This is what it spits out when I view the page source code...

 

<pre>allowed types is : Array

(

[0] => 2nd Day Air

[1] => Ground

[2] => Worldwide Express

[3] => Standard

[4] => 3 Day Select

)

<pre>

 

So it is showing all the ones I have checked in Admin. How do I enable logging? I do not see it when I edit the UPS shipping module.


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites

Actually, I just noticed that I do have a HUGE log file called upsxml.log

 

This is what it shows...

 

------------------------------------------

UPS URL: https://wwwcie.ups.com:443/ups.app/xml/Rate

UPS REQUEST: <?xml version="1.0"?>

<AccessRequest xml:lang="en-US">

  <AccessLicenseNumber>XXXXXXXXXXXXXXXX</AccessLicenseNumber>

  <UserId>XXXXXXXXXXXXXXXX</UserId>

  <Password>XXXXXXXXXXXXXXXX</Password>

</AccessRequest>

<?xml version="1.0"?>

<RatingServiceSelectionRequest xml:lang="en-US">

  <Request>

      <TransactionReference>

          <CustomerContext>Rating and Service</CustomerContext>

          <XpciVersion>1.0001</XpciVersion>

      </TransactionReference>

      <RequestAction>Rate</RequestAction>

      <RequestOption>shop</RequestOption>

  </Request>

  <PickupType>

      <Code>03</Code>

  </PickupType>

  <Shipment>

      <Shipper>

          <Address>

              <City>Providence</City>

              <StateProvinceCode>UT</StateProvinceCode>

              <CountryCode>US</CountryCode>

              <PostalCode>84332</PostalCode>

          </Address>

      </Shipper>

      <ShipTo>

          <Address>

              <City>Hillsboro</City>

              <StateProvinceCode>MO</StateProvinceCode>

              <CountryCode>US</CountryCode>

              <PostalCode>63050</PostalCode>

<ResidentialAddressIndicator/>

          </Address>

      </ShipTo>

      <Package>

          <PackagingType>

              <Code>02</Code>

          </PackagingType>

          <PackageWeight>

              <UnitOfMeasurement>

                  <Code>LBS</Code>

              </UnitOfMeasurement>

              <Weight>3.9</Weight>

          </PackageWeight>

      </Package>

  </Shipment>

  <CustomerClassification>

      <Code>01</Code>

  </CustomerClassification>

</RatingServiceSelectionRequest>

 

UPS RESPONSE: <?xml version="1.0"?><RatingServiceSelectionResponse><Response><TransactionReference><CustomerContext>Rating and Service</CustomerContext><XpciVersion>1.0001</XpciVersion></TransactionReference><ResponseStatusCode>1</ResponseStatusCode><ResponseStatusDescription>Success</ResponseStatusDescription></Response>

<RatedShipment><Service><Code>03</Code></Service><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>4.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>9.00</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>9.00</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery></GuaranteedDaysToDelivery><ScheduledDeliveryTime></ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>9.00</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>9.00</MonetaryValue></TotalCharges><Weight>3.9</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>4.0</Weight></BillingWeight></RatedPackage></RatedShipment>

<RatedShipment><Service><Code>12</Code></Service><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>4.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>16.04</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>16.04</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>3</GuaranteedDaysToDelivery><ScheduledDeliveryTime></ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>16.04</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>16.04</MonetaryValue></TotalCharges><Weight>3.9</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>4.0</Weight></BillingWeight></RatedPackage></RatedShipment>

<RatedShipment><Service><Code>02</Code></Service><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>4.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>20.64</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>20.64</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>2</GuaranteedDaysToDelivery><ScheduledDeliveryTime></ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>20.64</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>20.64</MonetaryValue></TotalCharges><Weight>3.9</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>4.0</Weight></BillingWeight></RatedPackage></RatedShipment>

<RatedShipment><Service><Code>13</Code></Service><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>4.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>38.87</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>38.87</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery><ScheduledDeliveryTime></ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>38.87</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>38.87</MonetaryValue></TotalCharges><Weight>3.9</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>4.0</Weight></BillingWeight></RatedPackage></RatedShipment>

<RatedShipment><Service><Code>01</Code></Service><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>4.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>43.25</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>43.25</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery><ScheduledDeliveryTime>12:00 Noon</ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>43.25</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>43.25</MonetaryValue></TotalCharges><Weight>3.9</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>4.0</Weight></BillingWeight></RatedPackage>

</RatedShipment></RatingServiceSelectionResponse>

 

Can you make heads or tails of this?

Edited by PopTheTop

L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites
Can you make heads or tails of this?
Yes, if you look at the codes in between the tags <Service><Code>##</Code></Service> you will find that got quotes for: 01, 02, 03, 12, and 13. These are defined in includes/languages/english/modules/shipping/upsxml.php as e.g. define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_US_ORIGIN_01', 'UPS Next Day Air');

 

So you got quotes for UPS Ground, UPS Next Day Air, UPS 2nd Day Air, UPS Next Day Air Saver, and UPS 3 Day Select. You had:

[0] => 2nd Day Air

[1] => Ground

[2] => Worldwide Express

[3] => Standard

[4] => 3 Day Select

as allowed types so after the exclusion proces you should have seen three quotes: for UPS Ground, UPS 2nd Day Air and UPS 3 Day Select.

 

So far everything looks normal...

 

Try commenting out the exclusion of choices (around line 238):

                // BOF limit choices
         //      if (!exclude_choices($type)) continue;
               // EOF limit choices

and see if they now all come up...

Share this post


Link to post
Share on other sites

This contribution sounds fantastic.

1 question:

 

Is it possible to add a handling charge and/or % markup to the UPS rates automatically?

 

...I suppose anything is possible.

 

Curious if this is built in.


Sam M. - Seattle

Share this post


Link to post
Share on other sites
Is it possible to add a handling charge and/or % markup to the UPS rates automatically?

 

...I suppose anything is possible.

 

Curious if this is built in.

A handling fee is actually built in (see the admin part). A percent markup is another thing, but you can do anything you like with the quotes. See e.g. my post on page 20 for an example.

Share this post


Link to post
Share on other sites
Yes, if you look at the codes in between the tags <Service><Code>##</Code></Service> you will find that got quotes for: 01, 02, 03, 12, and 13. These are defined in includes/languages/english/modules/shipping/upsxml.php as e.g.  define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_US_ORIGIN_01', 'UPS Next Day Air');

 

So you got quotes for UPS Ground, UPS Next Day Air, UPS 2nd Day Air, UPS Next Day Air Saver, and UPS 3 Day Select. You had:

[0] => 2nd Day Air

[1] => Ground

[2] => Worldwide Express

[3] => Standard

[4] => 3 Day Select

as allowed types so after the exclusion proces you should have seen three quotes: for UPS Ground, UPS 2nd Day Air and UPS 3 Day Select.

 

So far everything looks normal...

 

Try commenting out the exclusion of choices (around line 238):

 ? ? ? ? ? ? ? ?// BOF limit choices
? ? ? ? ?// ? ? ?if (!exclude_choices($type)) continue;
? ? ? ? ? ? ? ?// EOF limit choices

and see if they now all come up...

 

 

I got the following shipping choices by doing that:

UPS Ground $9.00

UPS 3 Day Select - 3 Business Days $16.04

UPS 2nd Day Air - 2 Business Days $20.64

UPS Next Day Air Saver - 1 Business Days $38.87

UPS Next Day Air - 1 Business Days @ 12:00 Noon $43.25


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites
I got the following shipping choices by doing that:

UPS Ground $9.00

UPS 3 Day Select - 3 Business Days $16.04

UPS 2nd Day Air - 2 Business Days $20.64

UPS Next Day Air Saver - 1 Business Days $38.87

UPS Next Day Air - 1 Business Days @ 12:00 Noon $43.25

Hmm, interesting since with 1.13a you should have gotten something like:

 

UPS Ground, 2005-05-15 $9.00

UPS 3 Day Select, 2005-05-13 $16.04

 

It looks like you have made modifications whereby the function exclude_choices doesn't work OK anymore. For Ground it still works because it either expects "UPS Ground" or "UPS Ground (# Business Days)". I think if you change the function exclude_choices to match your modifications it should work again:

 

function exclude_choices($type) {
   // used for exclusion of UPS shipping options, read from db
   $allowed_types = explode(",", MODULE_SHIPPING_UPSXML_TYPES);
   if (strstr($type, "UPS")) {
       // this will chop off "UPS" from the beginning of the line - typically something like UPS Next Day Air (1 Business Days)
       $type_minus_ups = explode("UPS", $type );
           if (strstr($type, "-")) {
           // this will chop off - x Business Days)
           $type_minus_bd = explode("-", $type_minus_ups[1] );
           // get rid of white space with trim
           $type_root = trim($type_minus_bd[0]);
       } else { // end if (strstr($type, "-"))
           // if service description contains UPS but not - x Business days):
           $type_root = trim($type_minus_ups[1]);
       } // end if (strstr($type, "UPS"):
   } elseif (strstr($type, "-")) {
       // if service description doesn't contain UPS, but does - x Business Days):
       $type_minus_ups_bd = explode("-", $type );
       $type_root = trim($type_minus_ups_bd[0]);
   } else { // service description neither contain UPS nor (x Business Days)
       $type_root = trim($type);
   }
   for ($za = 0; $za < count ($allowed_types); $za++ ) {
       if ($type_root == trim($allowed_types[$za])) {
           return true;
           exit;
       } // end if ($type_root == $allowed_types[$za] ...
   }
   // if the type is not allowed:
   return false;
}

Share this post


Link to post
Share on other sites
Hmm, interesting since with 1.13a you should have gotten something like:

 

UPS Ground, 2005-05-15 $9.00

UPS 3 Day Select, 2005-05-13 $16.04

 

It looks like you have made modifications whereby the function exclude_choices doesn't work OK anymore. For Ground it still works because it either expects "UPS Ground" or "UPS Ground (# Business Days)". I think if you change the function exclude_choices to match your modifications it should work again:

 

 

 

I do not recall ever changing anything. I will download the latest version and re-install to see if that does the trick.

Edited by PopTheTop

L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites

Ok, re-uploaded v1.13a and everything works now. I have another question, how do I get rid of the expected delivery date. I do not want that to be displayed at all, just the shipping choice names.

 

Currently displaying:

 

UPS Ground, 2005-05-19 $9.00

UPS 3 Day Select, 2005-05-19 $16.04

Edited by PopTheTop

L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites
I have another question, how do I get rid of the expected delivery date. I do not want that to be displayed at all, just the shipping choice names.

Glad to hear it works again. To answer your question, the most efficient way is probably to comment out line 207-215

/* BOF Time In Transit

       $this->servicesTimeintransit = $this->_upsGetTimeServices();  
       if ($this->logfile) {
           error_log("------------------------------------------\n", 3, $this->logfile);
           error_log("Time in Transit: " . $this->timeintransit . "\n", 3, $this->logfile);
       }

// EOF Time In Transit */

Share this post


Link to post
Share on other sites
Glad to hear it works again. To answer your question, the most efficient way is probably to comment out line 207-215

/* BOF Time In Transit

? ? ? ?$this->servicesTimeintransit = $this->_upsGetTimeServices(); ?
? ? ? ?if ($this->logfile) {
? ? ? ? ? ?error_log("------------------------------------------\n", 3, $this->logfile);
? ? ? ? ? ?error_log("Time in Transit: " . $this->timeintransit . "\n", 3, $this->logfile);
? ? ? ?}

// EOF Time In Transit */

 

Which file is that in?

 

Also, any more info on troubleshooting the "Fatal error: Call to a member function on a non-object in /path/to/catalog/includes/classes/xmldocument.php on line 57" error?

Share this post


Link to post
Share on other sites

Hello

 

I use UPS XML Rates and Services v1.0 contribution

 

I have the following error:

10002: The XML document is well formed goal the document is not valid.

I do not manage to find my problem

 

Here file XML:

------------------------------------------
DATE AND TIME: 2005-05-26 20:51:14
UPS URL: https://wwwcie.ups.com:443/ups.app/xml/TimeInTransit
UPS REQUEST: <?xml version="1.0"?>
<AccessRequest xml:lang="en-US">
  <AccessLicenseNumber>9BD112D9145H8947</AccessLicenseNumber>
  <UserId>hg45pmkj12</UserId>
  <Password>hgets45p</Password>
</AccessRequest>
<?xml version="1.0"?>
<TimeInTransitRequest xml:lang="en-US">
  <Request>
      <TransactionReference>
          <CustomerContext>Time in Transit</CustomerContext>
          <XpciVersion>1.0001</XpciVersion>
      </TransactionReference>
      <RequestAction>TimeInTransit</RequestAction>
  </Request>
  <TransitFrom>
      <AddressArtifactFormat>
          <PoliticalDivision2>Asnieres</PoliticalDivision2>
          <PoliticalDivision1>FR</PoliticalDivision1>
          <CountryCode>FR</CountryCode>
          <PostcodePrimaryLow>92600</PostcodePrimaryLow>
      </AddressArtifactFormat>
  </TransitFrom>
  <TransitTo>
      <AddressArtifactFormat>
          <PoliticalDivision2>Butry</PoliticalDivision2>
          <PoliticalDivision1>FR</PoliticalDivision1>
          <CountryCode>FR</CountryCode>
          <PostcodePrimaryLow>95760</PostcodePrimaryLow>
          <PostcodePrimaryHigh>95760</PostcodePrimaryHigh>
      </AddressArtifactFormat>
  </TransitTo>
  <PickupDate>20050528</PickupDate>
  <ShipmentWeight>
      <UnitOfMeasurement>
          <Code>KGS</Code>
      </UnitOfMeasurement>
      <Weight>10</Weight>
  </ShipmentWeight>
  <InvoiceLineTotal>
      <CurrencyCode>USD</CurrencyCode>
      <MonetaryValue>100</MonetaryValue>
  </InvoiceLineTotal>
</TimeInTransitRequest>

UPS RESPONSE: <?xml version="1.0"?><TimeInTransitResponse><Response><TransactionReference><CustomerContext>Time in Transit</CustomerContext><XpciVersion>1.0001</XpciVersion></TransactionReference><ResponseStatusCode>1</ResponseStatusCode><ResponseStatusDescription>Success</ResponseStatusDescription><Error><ErrorSeverity>Warning</ErrorSeverity><ErrorCode>270035</ErrorCode><ErrorDescription>Please note that the ship date been changed</ErrorDescription></Error></Response><TransitResponse><PickupDate>2005-05-28</PickupDate><TransitFrom><AddressArtifactFormat><PoliticalDivision2>Asnieres</PoliticalDivision2><Country>FRANCE</Country><CountryCode>FR</CountryCode><PostcodePrimaryLow>92600</PostcodePrimaryLow></AddressArtifactFormat></TransitFrom><TransitTo><AddressArtifactFormat><PoliticalDivision2>Butry</PoliticalDivision2><Country>FRANCE</Country><CountryCode>FR</CountryCode><PostcodePrimaryLow>95760</PostcodePrimaryLow></AddressArtifactFormat></TransitTo><AutoDutyCode>02</AutoDutyCode><ShipmentWeight><UnitOfMeasurement><Code>KGS</Code></UnitOfMeasurement><Weight>10.0</Weight></ShipmentWeight><InvoiceLineTotal><CurrencyCode>USD</CurrencyCode><MonetaryValue>100.00</MonetaryValue></InvoiceLineTotal><Disclaimer>Services listed as guaranteed are backed by a money-back guarantee for transportation charges only. See Terms and Conditions in the Service Guide for details. Certain commodities and high value shipments may require additional transit time for customs clearance.</Disclaimer><ServiceSummary><Service><Code>24</Code><Description>UPS Express</Description></Service><Guaranteed><Code>Y</Code></Guaranteed><EstimatedArrival><BusinessTransitDays>1</BusinessTransitDays><Time>12:00:00</Time><PickupDate>2005-05-30</PickupDate><PickupTime>17:45:00</PickupTime><HolidayCount>0</HolidayCount><DelayCount>0</DelayCount><Date>2005-05-31</Date><DayOfWeek>TUE</DayOfWeek><TotalTransitDays>1</TotalTransitDays><CustomerCenterCutoff>16:00:00</CustomerCenterCutoff><RestDays>0</RestDays></EstimatedArrival></ServiceSummary><ServiceSummary><Service><Code>26</Code><Description>UPS Express Saver</Description></Service><Guaranteed><Code>Y</Code></Guaranteed><EstimatedArrival><BusinessTransitDays>1</BusinessTransitDays><Time>23:30:00</Time><PickupDate>2005-05-30</PickupDate><PickupTime>17:45:00</PickupTime><HolidayCount>0</HolidayCount><DelayCount>0</DelayCount><Date>2005-05-31</Date><DayOfWeek>TUE</DayOfWeek><TotalTransitDays>1</TotalTransitDays><CustomerCenterCutoff>16:00:00</CustomerCenterCutoff><RestDays>0</RestDays></EstimatedArrival></ServiceSummary><ServiceSummary><Service><Code>25</Code><Description>UPS Standard</Description></Service><Guaranteed><Code>N</Code></Guaranteed><EstimatedArrival><BusinessTransitDays>1</BusinessTransitDays><Time>23:30:00</Time><PickupDate>2005-05-30</PickupDate><PickupTime>17:45:00</PickupTime><HolidayCount>0</HolidayCount><DelayCount>0</DelayCount><Date>2005-05-31</Date><DayOfWeek>TUE</DayOfWeek><TotalTransitDays>1</TotalTransitDays><CustomerCenterCutoff>16:00:00</CustomerCenterCutoff><RestDays>0</RestDays></EstimatedArrival></ServiceSummary><MaximumListSize>35</MaximumListSize></TransitResponse></TimeInTransitResponse>
------------------------------------------
Business Transit: UPS Express = 2005-05-31
Business Transit: UPS Express Saver = 2005-05-31
Business Transit: UPS Standard = 2005-05-31
------------------------------------------
Time in Transit: 0
------------------------------------------
DATE AND TIME: 2005-05-26 20:51:17
UPS URL: https://wwwcie.ups.com:443/ups.app/xml/Rate
UPS REQUEST: <?xml version="1.0"?>
<AccessRequest xml:lang="en-US">
  <AccessLicenseNumber>9BD112D9145H8947</AccessLicenseNumber>
  <UserId>hg45pmkj12</UserId>
  <Password>hgets45p</Password>
</AccessRequest>
<?xml version="1.0"?>
<RatingServiceSelectionRequest xml:lang="en-US">
  <Request>
      <TransactionReference>
          <CustomerContext>Rating and Service</CustomerContext>
          <XpciVersion>1.0001</XpciVersion>
      </TransactionReference>
      <RequestAction>Rate</RequestAction>
      <RequestOption>shop</RequestOption>
  </Request>
  <PickupType>
      <Code></Code>
  </PickupType>
  <Shipment>
      <Shipper>
          <Address>
              <City>Asnieres</City>
              <StateProvinceCode>FR</StateProvinceCode>
              <CountryCode>FR</CountryCode>
              <PostalCode>92600</PostalCode>
          </Address>
      </Shipper>
      <ShipTo>
          <Address>
              <City>Butry</City>
              <StateProvinceCode>FR</StateProvinceCode>
              <CountryCode>FR</CountryCode>
              <PostalCode>95760</PostalCode>
          </Address>
      </ShipTo>
      <Package>
          <PackagingType>
              <Code></Code>
          </PackagingType>
          <Dimensions>
              <UnitOfMeasurement>
                  <Code>CM</Code>
              </UnitOfMeasurement>
              <Length>2.00</Length>
              <Width>2.00</Width>
              <Height>2.00</Height>
          </Dimensions>
          <PackageWeight>
              <UnitOfMeasurement>
                  <Code>KGS</Code>
              </UnitOfMeasurement>
              <Weight>1</Weight>
          </PackageWeight>
          <PackageServiceOptions>
              <InsuredValue>
                  <CurrencyCode>FRA</CurrencyCode>
                  <MonetaryValue>100</MonetaryValue>
              </InsuredValue>
          </PackageServiceOptions>
      </Package>
      <Package>
          <PackagingType>
              <Code></Code>
          </PackagingType>
          <Dimensions>
              <UnitOfMeasurement>
                  <Code>CM</Code>
              </UnitOfMeasurement>
              <Length>2.00</Length>
              <Width>2.00</Width>
              <Height>2.00</Height>
          </Dimensions>
          <PackageWeight>
              <UnitOfMeasurement>
                  <Code>KGS</Code>
              </UnitOfMeasurement>
              <Weight>1</Weight>
          </PackageWeight>
          <PackageServiceOptions>
              <InsuredValue>
                  <CurrencyCode>FRA</CurrencyCode>
                  <MonetaryValue>100</MonetaryValue>
              </InsuredValue>
          </PackageServiceOptions>
      </Package>
  </Shipment>
  <CustomerClassification>
      <Code>03</Code>
  </CustomerClassification>
</RatingServiceSelectionRequest>

UPS RESPONSE: <?xml version="1.0"?><RatingServiceSelectionResponse><Response><TransactionReference><CustomerContext>Rating and Service</CustomerContext><XpciVersion>1.0001</XpciVersion></TransactionReference><ResponseStatusCode>0</ResponseStatusCode><ResponseStatusDescription>Failure</ResponseStatusDescription><Error><ErrorSeverity>Hard</ErrorSeverity><ErrorCode>10002</ErrorCode><ErrorDescription>The XML document is well formed but the document is not valid</ErrorDescription><ErrorLocation><ErrorLocationElementName>RatingServiceSelectionRequest/PickupType/Code</ErrorLocationElementName></ErrorLocation></Error></Response></RatingServiceSelectionResponse>

If somebody can help me? :sweating:

 

Nicolas

Share this post


Link to post
Share on other sites
The root cause is that in includes/modules/shipping/upsxml.php (from 1.1.5) there is a line early in the file that says:

define('DIMENSIONS_SUPPORTED', 1);

Make it:

define('DIMENSIONS_SUPPORTED', 0);

and the error will go away.

 

 

Thank you very much for this information and it did clear this error, but now I get this message.........any ideas??

 

United Parcel Service (XML) United Parcel Service (XML)

10002: The XML document is well formed but the document is not valid

If you prefer to use ups as your shipping method, please contact The JTV Group via Email.

 

Thanks,

Sandra

Share this post


Link to post
Share on other sites
I have the following error:

10002: The XML document is well formed goal the document is not valid.

I do not manage to find my problem

I don't know what causes the error but there are few strange things in the request:

1. a package of 1 kg with a size of 2x2x2 cm? That is probably not allowed because of the dimensions. Better yet: do not use the packaging module the code is not 100% OK.

2. you live in France but the currency code is US dollar?

 

Better ask a forum moderator to delete or modify your message: you left your password etc. for your UPS account in the post :(

Share this post


Link to post
Share on other sites
10002: The XML document is well formed but the document is not valid
I guess it could have a lot of reasons. Not having the correct information of your account with UPS added in the admin section could be one of them.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×