Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New UPS XML Shipping Module available


Recommended Posts

I looks like the mod is displaying a service code

 

UPS Expedited, $2.00 ; Which happens to be 2

UPS Express, $1.00 ; Which happens to be 1

 

So the question, is it UPS returning the values , or is the mod not parsing the xml response?

 

 

But only happens when I have UPS Quoted Rates activated.

 

WHen I do not activate this , it displays correctly.

I look forward to your reponses and help.

 

Thanks

_________________________________________________________________________

 

David G Aschenbrener

Tranquil | Sense - Your Stop for Tranquility.

Link to comment
Share on other sites

No, I don't think so. I tested it with like 15 of each and it went well. First all the "little" stuff went in one box (when I first put the long ones in the shopping basket) and then the long ones went in a box that it fitted. So yes, I have confidence in it but more rigorous testing is always the best. Hopefully it will go well :)

 

Well, I've found a problem that causes it to time out but I don't know why. It can happen with just 2 or 3 certain products but the products have to be over 31" long and there has to be more than will fit in one 48x8x6 box. The strange thing is if I have an item marked RTS is being placed it in a box when possible. Just one of each of these makes the page timeout.

 

INSERT INTO `products` VALUES (324, 100, '', 'bamboo_pencil_red.jpg', '5.7500', '2003-02-07 12:18:43', '2007-01-31 19:27:52', '0000-00-00 00:00:00', '1.0', 1, 1, 0, 44, '0.0000', '33.0', '1.5', '1.5', 0),
(569, 99, '', 'bamboo_special.jpg', '15.9800', '2006-01-04 15:18:41', '2007-01-31 19:27:52', NULL, '14.0', 1, 1, 0, 23, '0.0000', '48.0', '8.0', '6.0', 1),
(647, 35, '', 'magdelena_ting_ting.jpg', '3.8900', '2006-05-10 11:49:30', '2007-01-31 20:28:02', NULL, '1.0', 1, 1, 0, 15, '0.0000', '42.0', '1.5', '1.5', 0);

 

Any ideas?

John Wisdom

Link to comment
Share on other sites

Jan,

 

I saw your 1.2.5 update to the file and updated mine, but it still ignores the ready to ship option unless it's too big for a box.

 

I found a way to work around this and it only has this problem with the 48x8x6 box. By making items 48x8x8 it no longer tries to fit them into a box and that solves it. I don't quite get why it doesn't get another 48x8x6 when it needs one but instead hangs, but it will get more 31x15x10 boxes as needed.

 

Here's an output

Array

(

[0] => Array

(

[length] => 48.0

[width] => 8.0

[height] => 8.0

[current_weight] => 8.0

[price] => 34.99

)

 

[1] => Array

(

[length] => 47.0

[width] => 8.0

[height] => 8.0

[current_weight] => 14.0

[price] => 15.98

)

 

[2] => Array

(

[length] => 72.0

[width] => 14.0

[height] => 12.0

[current_weight] => 65.0

[price] => 143

)

 

[3] => Array

(

[id] => 31

[name] => Large

[description] => 31x15x10

[length] => 31.0

[width] => 15.0

[height] => 10.0

[empty_weight] => 2.0

[max_weight] => 20.00

[volume] => 4650.0

[x] => 10.0

[y] => 15.0

[z] => 31.0

[remaining_volume] => 3750

[current_weight] => 3.4

[products] => Array

(

[0] => Array

(

[id] => 52

[name] => Larkspur - Natural Light Blue - 4 oz

[model] =>

[image] => larkspur_light_blue.jpg

[price] => 5.7500

[quantity] => 1

[weight] => 0.7

[length] => 30.0

[width] => 5.0

[height] => 3.0

[ready_to_ship] => 0

[final_price] => 5.75

[tax_class_id] => 1

[attributes] =>

[x] => 3.0

[y] => 5.0

[z] => 30.0

[volume] => 450

[largest_box_it_will_fit] => 5

)

 

[1] => Array

(

[id] => 715

[name] => Plumosum Cones - Preserved and Dyed - Burgundy

[model] =>

[image] => Plumosum_Cones_burgundy.jpg

[price] => 12.7500

[quantity] => 1

[weight] => 0.7

[length] => 30.0

[width] => 5.0

[height] => 3.0

[ready_to_ship] => 0

[final_price] => 12.75

[tax_class_id] => 1

[attributes] =>

[x] => 3.0

[y] => 5.0

[z] => 30.0

[volume] => 450

[largest_box_it_will_fit] => 5

)

 

)

 

[price] => 18.5

)

 

[4] => Array

(

[id] => 31

[name] => Large

[description] => 31x15x10

[length] => 31.0

[width] => 15.0

[height] => 10.0

[empty_weight] => 2.0

[max_weight] => 20.00

[volume] => 4650.0

[x] => 10.0

[y] => 15.0

[z] => 31.0

[remaining_volume] => 0

[current_weight] => 13

[products] => Array

(

[0] => Array

(

[id] => 524

[name] => Case - Triticum (wheat) - Natural - 20 bunches - 20% off

[model] =>

[image] => Triticum_natural.jpg

[price] => 68.6400

[quantity] => 1

[weight] => 11.0

[length] => 31.0

[width] => 15.0

[height] => 10.0

[ready_to_ship] => 0

[final_price] => 68.64

[tax_class_id] => 1

[attributes] =>

[x] => 10.0

[y] => 15.0

[z] => 31.0

[volume] => 4650

[largest_box_it_will_fit] => 5

)

 

)

 

[price] => 68.64

)

 

[5] => Array

(

[id] => 45

[name] => 48x8x6

[description] => 48x8x6

[length] => 48.0

[width] => 8.0

[height] => 6.0

[empty_weight] => 2.0

[max_weight] => 25.00

[volume] => 2304.0

[x] => 6.0

[y] => 8.0

[z] => 48.0

[remaining_volume] => 1257.75

[current_weight] => 11.2

[products] => Array

(

[0] => Array

(

[id] => 324

[name] => Bamboo - Pencil - Red - 10 pieces

[model] =>

[image] => bamboo_pencil_red.jpg

[price] => 5.7500

[quantity] => 1

[weight] => 1.0

[length] => 31.0

[width] => 1.5

[height] => 1.5

[ready_to_ship] => 0

[final_price] => 5.75

[tax_class_id] => 1

[attributes] =>

[x] => 1.5

[y] => 1.5

[z] => 31.0

[volume] => 69.75

[largest_box_it_will_fit] => 5

)

 

[1] => Array

(

[id] => 364{4}21

[name] => Eucalyptus - Preserved - Washed - Jade Green

[model] =>

[image] => euc_jade_green_washed.jpg

[price] => 4.6500

[quantity] => 1

[weight] => 1.2

[length] => 30.0

[width] => 5.0

[height] => 3.0

[ready_to_ship] => 0

[final_price] => 8.35

[tax_class_id] => 1

[attributes] => Array

(

[4] => 21

)

 

[x] => 3.0

[y] => 5.0

[z] => 30.0

[volume] => 450

[largest_box_it_will_fit] => 5

)

 

[2] => Array

(

[id] => 650{1}41

[name] => Straight Ting Ting - Dyed

[model] =>

[image] => Ting_ting_natural_straight.jpg

[price] => 3.3000

[quantity] => 6

[weight] => 1.0

[length] => 36.0

[width] => 2.0

[height] => 1.0

[ready_to_ship] => 0

[final_price] => 3.3

[tax_class_id] => 1

[attributes] => Array

(

[1] => 41

)

 

[x] => 1.0

[y] => 2.0

[z] => 36.0

[volume] => 72

[largest_box_it_will_fit] => 3

)

 

[3] => Array

(

[id] => 650{1}41

[name] => Straight Ting Ting - Dyed

[model] =>

[image] => Ting_ting_natural_straight.jpg

[price] => 3.3000

[quantity] => 6

[weight] => 1.0

[length] => 36.0

[width] => 2.0

[height] => 1.0

[ready_to_ship] => 0

[final_price] => 3.3

[tax_class_id] => 1

[attributes] => Array

(

[1] => 41

)

 

[x] => 1.0

[y] => 2.0

[z] => 36.0

[volume] => 72

[largest_box_it_will_fit] => 3

)

 

[4] => Array

(

[id] => 647

[name] => Magdelena Ting Ting - Natural

[model] =>

[image] => magdelena_ting_ting.jpg

[price] => 3.8900

[quantity] => 1

[weight] => 1.0

[length] => 42.0

[width] => 1.5

[height] => 1.5

[ready_to_ship] => 0

[final_price] => 3.89

[tax_class_id] => 1

[attributes] =>

[x] => 1.5

[y] => 1.5

[z] => 42.0

[volume] => 94.5

[largest_box_it_will_fit] => 3

)

 

[5] => Array

(

[id] => 650{1}41

[name] => Straight Ting Ting - Dyed

[model] =>

[image] => Ting_ting_natural_straight.jpg

[price] => 3.3000

[quantity] => 6

[weight] => 1.0

[length] => 36.0

[width] => 2.0

[height] => 1.0

[ready_to_ship] => 0

[final_price] => 3.3

[tax_class_id] => 1

[attributes] => Array

(

[1] => 41

)

 

[x] => 1.0

[y] => 2.0

[z] => 36.0

[volume] => 72

[largest_box_it_will_fit] => 3

)

 

[6] => Array

(

[id] => 650{1}41

[name] => Straight Ting Ting - Dyed

[model] =>

[image] => Ting_ting_natural_straight.jpg

[price] => 3.3000

[quantity] => 6

[weight] => 1.0

[length] => 36.0

[width] => 2.0

[height] => 1.0

[ready_to_ship] => 0

[final_price] => 3.3

[tax_class_id] => 1

[attributes] => Array

(

[1] => 41

)

 

[x] => 1.0

[y] => 2.0

[z] => 36.0

[volume] => 72

[largest_box_it_will_fit] => 3

)

 

[7] => Array

(

[id] => 650{1}41

[name] => Straight Ting Ting - Dyed

[model] =>

[image] => Ting_ting_natural_straight.jpg

[price] => 3.3000

[quantity] => 6

[weight] => 1.0

[length] => 36.0

[width] => 2.0

[height] => 1.0

[ready_to_ship] => 0

[final_price] => 3.3

[tax_class_id] => 1

[attributes] => Array

(

[1] => 41

)

 

[x] => 1.0

[y] => 2.0

[z] => 36.0

[volume] => 72

[largest_box_it_will_fit] => 3

)

 

[8] => Array

(

[id] => 650{1}41

[name] => Straight Ting Ting - Dyed

[model] =>

[image] => Ting_ting_natural_straight.jpg

[price] => 3.3000

[quantity] => 6

[weight] => 1.0

[length] => 36.0

[width] => 2.0

[height] => 1.0

[ready_to_ship] => 0

[final_price] => 3.3

[tax_class_id] => 1

[attributes] => Array

(

[1] => 41

)

 

[x] => 1.0

[y] => 2.0

[z] => 36.0

[volume] => 72

[largest_box_it_will_fit] => 3

&nb

Edited by John Wisdom

John Wisdom

Link to comment
Share on other sites

I saw your 1.2.5 update to the file and updated mine, but it still ignores the ready to ship option unless it's too big for a box.
You didn't miss the mistake I had in it?

 

I found a way to work around this and it only has this problem with the 48x8x6 box. By making items 48x8x8 it no longer tries to fit them into a box and that solves it. I don't quite get why it doesn't get another 48x8x6 when it needs one but instead hangs, but it will get more 31x15x10 boxes as needed.
I will take a better look at it in the next few days.
Link to comment
Share on other sites

Actually, I didn't see 1.2.5 until early this morning so it has your correction.

 

I'll continue to work at it to see if I can come up with anything.

 

Once the problem showed up (customer called) it took me a while to figure out that it was this module because it was timing out on 2 items.

John Wisdom

Link to comment
Share on other sites

I looks like the mod is displaying a service code

 

UPS Expedited, $2.00 ; Which happens to be 2

UPS Express, $1.00 ; Which happens to be 1

 

So the question, is it UPS returning the values , or is the mod not parsing the xml response?

But only happens when I have UPS Quoted Rates activated.

 

WHen I do not activate this , it displays correctly.

I look forward to your reponses and help.

 

Thanks

 

Is anyone else having this issue?

 

Anyone?

 

Anyone?

 

Mueller.

 

Mueller.

_________________________________________________________________________

 

David G Aschenbrener

Tranquil | Sense - Your Stop for Tranquility.

Link to comment
Share on other sites

Is anyone else having this issue?

 

Anyone?

 

Anyone?

 

Mueller.

 

Mueller.

By Quoted rates I'm assuming you mean "negotiated rates", which I haven't used. Is everything working correctly when "negotiated rates" are not activated? Do the other UPS rates look correct and it's just those two? I don't know the Canadian options but you may be getting unusual quotes because those options are not available for the postal code you are trying.

 

If you have installed and uninstalled this module you might want to take a look at your database configuation table to make sure the present install is clean. I had a problem when I was setting mine up with duplicate entries that caused problems.

 

I did look at the log you posted a few days ago and it does have weight but no dimensions. There are 3 echo statements in version 1.2.5 that you can uncomment out one at a time to help debug.

John Wisdom

Link to comment
Share on other sites

So the question, is it UPS returning the values , or is the mod not parsing the xml response?

But only happens when I have UPS Quoted Rates activated.

 

WHen I do not activate this , it displays correctly.

UPSXML works fine, but UPS is not returning any negotiated rates. If they did, the shipping quote should be in a tag like this (according to their docs):

<NegotiatedRates>
 <NetSummaryCharges>
<GrandTotal>
  <MonetaryValue>###.##</MonetaryValue>
</GrandTotal>
 </NetSummaryCharges>
</NegotiatedRates>

and that is not present in your error.log.

So either you don't have any negotiated rates (discounted rates because you are a good customer of UPS with a large number of packages to ship) or something is wrong at the UPS side IMHO.

Link to comment
Share on other sites

Thank You guys.

 

It does work and I am in error because, I assume that because I had an account that I had quoted rates.

 

This is infact not the case.

 

Please accept my appologies for the persitant digging.

 

Keep up the great work and I will be making a contribution ot this mod shortly.

 

Sincerely,

_________________________________________________________________________

 

David G Aschenbrener

Tranquil | Sense - Your Stop for Tranquility.

Link to comment
Share on other sites

Well, I've found a problem that causes it to time out but I don't know why. It can happen with just 2 or 3 certain products but the products have to be over 31" long and there has to be more than will fit in one 48x8x6 box. The strange thing is if I have an item marked RTS is being placed it in a box when possible. Just one of each of these makes the page timeout.

 

Any ideas?

:blush: :'( Blooper:

In the function packProducts the RTS is being reset...oops. Should be changed to:

		$index_of_largest_box = count($emptyBoxesArray)-1;
	// Get the product array and expand multiple qty items.
	$productsRemaining = array();
	for ($i = 0; $i < count($productsArray); $i++) {
		$product = $productsArray[$i];
		// sanity checks on the product, no need for ready-to-ship items
		if ($product['ready_to_ship'] == '0') {
					  $product['ready_to_ship'] = '1';
					  for ($x = 0; $x <= $index_of_largest_box; $x++) {
						  if ($this->fitsInBox($product, $emptyBoxesArray[$x])) {
			  $product['ready_to_ship'] = '0';
			  $product['largest_box_it_will_fit'] = $x;
			} 
					  } // end for ($x = 0; $x <= $index_of_largest_box; $x++) 
		} // end if ($product['ready_to_ship'] == '0')

I tried this once with the Bamboo Special and other products and it timed out before this change. But after that it only gave one package, which is not correct either :(

Link to comment
Share on other sites

I tried this once with the Bamboo Special and other products and it timed out before this change. But after that it only gave one package, which is not correct either.
Another blooper, I was still reading in an UPS response in a text file, which happened to be exactly the weight I was expecting :-"

It now worked for that particular set of products.

Link to comment
Share on other sites

As I obsessed over this last night and I looked at older versions I thought this may have been the problem. I even tried changing it around but I was kind of like Stevie Wonder with a Rubic's cube.

 

I'll run it through an assortment of products and see how it works out.

John Wisdom

Link to comment
Share on other sites

It's working perfectly now and the packaging routine is very fast. I ran a wide variety of items utilizing all the boxes and mixed in several RTS with no problems.
Excellent news. I added the fix to the contributions version (1.2.6 now). Haven't done any additional testing though. I rely on you :D
Link to comment
Share on other sites

UPS_XML v1.2.6

 

Well, I was trying to avoid posting here, but I'm afraid I've got a problem after installing this contrib. I've seen mention of the same errors, but I haven't found a definitive fix. I hope someone here can help me get this figured out.

 

I did not install the Dimensional Support.

On step 5 of the installation instructions I chose option 1 and changed the Configuration Table "set_function" field from "VARCHAR(255)" to "TEXT".

 

I set everything in the Admin configuration (UPS username, password, and Access Key), and chose to exclude several of the rates options, but not all. I left about 5 of them.

 

So, I got to step 8 and added a product to my cart, then went to checkout and it hung for awhile when tring to load checkout_shipping.php. After several minutes I was prompted to download checkout_shipping.php (I'm using Firefox on a Mac). Uh, so I knew I had something wrong;)

 

I then checked my email and received several PHP_Error_Log messages, you can see those here...

1st email.....Error from cURL: Error [7]:  experienced by customer with id 2 on 
2007-02-03 11:15:31

2nd email.....UPSXML TimeInTransit Error: :  experienced by customer with id 2 on 
2007-02-03 11:15:32

3rd email......UPSXML Rates Error: 

	   Rating and Service
	   1.0001

   0
   An unknown error occured while attempting to contact the UPS 
gateway
  : 

	   Rating and Service
	   1.0001

   0
   An unknown error occured while attempting to contact the UPS 
gateway
experienced by customer with id 2 on 2007-02-03 11:16:32

 

Oh, and I had set it to test mode too....

 

I started searching the contrib forum and also Google, and saw these mentioned, but I couldn't find what the cause may be or the solution.

 

Can someone here please clue me in?

 

Thanks for your time:)

 

Adam

Edited by awarner20

We see our customers as invited guests to a party, and we are the hosts. It's our job every day to make every important aspect of the customer experience a little bit better. - Jeff Bezos

Link to comment
Share on other sites

Try this

 

If cURL is not compiled into PHP (Windows users (?) and some Linux users) you can change line 74 to : $this->use_exec = '1'; Using exec() cURL from the command line interface (CLI) is then used. See for more information "Changes from 1.1.3 to 1.1.4" in the changes.txt file.

If exec() is disabled and logging is enabled, this will be logged also.

Here is the section of the changes.txt file it is referring to:

 

Changes from 1.1.3 to 1.1.4

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

Modification of catalog/includes/modules/shipping/upsxml.php in function _post to

1. also log cURL errors if they occur

2. add the date and time of the UPS request to the log file.

3. The two lines:

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);

curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);

are commented out again. These need only be uncommented if you get curl error 60:

"error setting certificate verify locations" and likely only the first one.

Search the cURL website (http://curl.haxx.se) for more details on this error.

For a list of the cURL options and a list of errors, see http://curl.haxx.se/docs/manpage.html.

4. As default, cURL is assumed to be compiled into PHP. If not (some Linux users and apparently

Windows users) you can try setting line 74 to: $this->use_exec = '1';

Code for checking if exec() can be called and using it to execute cURL was taken from the file authorizenet_direct.php from the contribution Authorize.Net Consolidated 1.7b with Curl Fix

(contribution 2184). Without using addslashes() on the xmlRequest before using it in the exec() statement would give a 100001 error from UPS: The XML document is not well formed.5. Editing of some comments regarding the Time in Transit code

John Wisdom

Link to comment
Share on other sites

I found the solution to the above post! After a little more searching I found this thread....it talks about curl errors and hosting with GoDaddy specifically. Thanks to fdelarosa59 for this answer!

 

http://www.oscommerce.com/forums/index.php?showtopic=247419

 

All seems good!

 

To the UPS XML contrib author(s)......Thanks for such a great contrib too!

We see our customers as invited guests to a party, and we are the hosts. It's our job every day to make every important aspect of the customer experience a little bit better. - Jeff Bezos

Link to comment
Share on other sites

I have read this ENTIRE thread... I've seen this mentioned a couple of times with no real solution. I am getting this error:

 

Fatal error: Cannot redeclare class xmldocument in /home/eric9sr/public_html/catalog/admin/includes/classes/xmldocument.php on line 19

 

the xmldocument.php is only in the two classes folders.

 

Any other ideas?

 

Thanks

Link to comment
Share on other sites

I have read this ENTIRE thread... I've seen this mentioned a couple of times with no real solution. I am getting this error:

 

Fatal error: Cannot redeclare class xmldocument in /home/eric9sr/public_html/catalog/admin/includes/classes/xmldocument.php on line 19

 

the xmldocument.php is only in the two classes folders.

 

Any other ideas?

 

Thanks

 

(sorry originally posted as someone else)

Link to comment
Share on other sites

check and see if you have an extra upsxml.php file in moduules/shipping and that is probably the problem. Did you rename one to upsxml_old.php or something like that? That has caused problems for people before. If you have one renamed remove it and try it again.

John Wisdom

Link to comment
Share on other sites

This is a fantastic contribution.

 

I have several situations where large orders have a total weight of hundreds of pounds.

I'm getting an error:

 

111035: The maximum per package weight for the selected service from the selected country is 150 pounds.

 

What can I do to make this work?

 

My settings are:

Enable UPS Shipping = True

UPS Rates Access Key = (ENTERED)

UPS Rates Username = (ENTERED)

UPS Rates Password = (ENTERED)

Pickup Method = Daily Pickup

Packaging Type = Package

Customer Classification Code = 01

Shipping Origin = US Origin

Origin City = (ENTERED)

Origin State/Province = (ENTERED)

Origin Country = US

Origin Zip/Postal Code = (ENTERED)

Test or Production Mode = Production

Unit Weight = LBS

Unit Length = IN

Dimensions Support = No

Quote Type = Commercial

Negotiated rates = False

UPS Account Number = NULL

Handling Type = NULL

Handling Fee = NULL

Enable Insurance = True

UPS Currency Code = USD

Tax Class = Taxable Goods

Shipping Zone = NONE

Sort order of display = 10

Disallowed Shipping Methods = NULL

Shipping Delay = 1

Email UPS errors = Yes

Time in Transit View Type = Raw

Sam M. - Seattle

Link to comment
Share on other sites

John,

Thank you. I was guessing that...so I set it to 10,000 pounds (way more then I need).

 

I still get the error with the same 150 lbs.

 

Is this some sort of error that's kicked back from UPS or can I set the max weight for USA locally?

I haven't found the setting in the UPSXML module.

 

What tells the module I'm over weight?

Also, I saw something about splitting the weight into multiple packages....can this work if I don't use the package size function?

Sam M. - Seattle

Link to comment
Share on other sites

John,

Thank you. I was guessing that...so I set it to 10,000 pounds (way more then I need).

 

I still get the error with the same 150 lbs.

 

Ummmm, you need to set it for a realistic number and it has to be less than 150lbs or you will keep getting that error. It's the maximum weight of a box that you will ship. If I were you I would use the real weight that your boxes will go up to.

 

You might want to look into the dimensional support part of this module is you product line varies on weight and size.

John Wisdom

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...