Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New UPS XML Shipping Module available


Recommended Posts

None of my product dimensions are saving in admin, think I better revert to a backup and reinstall. However, quick question before I do:

 

Does the MVS with UPSXML have dimensional support or does it needed to be added after? I'm confused because the docs with MVS say it doesn't have it but I see a section of code in upsxml.php to toggle this feature on or off.

Perhaps using the dimensions support part of the newer UPSXML packages might help for the save problem (or it might be a register_globals problem?). There was also a problem with saving in the admin with the new update of this year. A reset of an array was needed as far as I can remember.

 

The trouble you experience with MVS is better asked in the MVS thread (it is often in the first page or the top of the shipping forum). I have tried to understand how MVS works but it is a very complicated piece of code so I can't offer you any advice.

 

The dimensions part in UPSXML was developed independently from the MVS contribution and in principle should not need to conflict with it.

Link to comment
Share on other sites

I'm no PHP guru, but the file upsxml.php has the following suggestions:

 

// when cURL is not compiled into PHP (Windows users, some Linux users)

// you can set the next variable to "1" and then exec(curl -d $xmlRequest, $xmlResponse)

// will be used

$this->use_exec = '0';

 

I'd try setting this value to 1 and then come back here if it doesn't work. Hopefully someone who actually knows PHP will help you out, unlike me. I really have no clue if this will work, but I prefer to try some of the basic options before posting to the forum for help. Good luck my friend. :-)

 

Ok great I didn't see that. Well now in our logging this is what comes up

 

Error from cURL using exec() since there is no $xmlResponse

UPS RESPONSE using exec():

Link to comment
Share on other sites

I have installed this module for UPS per the instructions and everytime I go to the checkout page on my shopping cart it crashed the web server. If I uninstall the UPS module in the admin panel, everything is OK, so it is definitely this module that is crashing my web server. Any ideas?

 

 

 

 

I have just released my own version of the UPS XML Rates and Services Shipping Module. I wanted to release it early to get feedback and bug reports. I dare say I have not tested it on any system but my own, so please consider it very beta.

I plan on improving this by extending it to support the more obscure features of the UPS XML gateway, and introduce intelligent product packing for anyone who has installed Tom Croix's Canada Post 3.1 module with dimensional support.

Enjoy.

Torin...

Link to comment
Share on other sites

I need to see if anybody out there knows how to impliment free shipping with purchase over a certain amount in to this module. Do I do it for the module, or do I just do this site wide?

Link to comment
Share on other sites

Thanks JanZ. I had my web hosting admin test the cURL and it was functioning properly. But I remembered reading something about cURL in the installation instructions. I followed the instructions for setting up logging to see if I could figure it out from there and low-and-behold it started working! I commented out the logging again and it still worked. It turns out it is the $this->use_exec variable that was the problem. I changed it from 0 to 1 and that fixed the problem. Here are the instructions:

 

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

 

If anyone else is having a problem with this contribution they should try changing that variable!

Are the admins sure cURL is working properly on that server?
Link to comment
Share on other sites

  • 2 weeks later...
Do I need an "XML Access Key" or "HTML Access Key".

 

Saleem

 

 

Not sure what you mean. The Access Key is a number you get from UPS after you set up the account. You enter it into the Access Key field in the Modules>Shipping section of the osCommerce Admin. John

Link to comment
Share on other sites

I need some help, in my shopping cart I have two items, 6lbs total, totaling $1700, UPSXML returns $29.28

 

I then goto UPS.com and enter in the exact same thing, 2 items, $1700 declared value, 6 lbs total, UPS.com returns $21.28

 

daily pickup, options, all the same.

 

I've tried logging into UPS and not logging in and still get $21.28. I dont have any surcharges enabled in UPSXML, can anyone tell me whats going on?

Link to comment
Share on other sites

daily pickup, options, all the same.
Sure? Residential versus Commercial? Package Tare Weight set correctly in admin (standard is plus 3). Insurance (not correct in UPSXML, the total value of the shipment is given with each box at the moment)?
Link to comment
Share on other sites

To all who try to compare rates between UPS and UPS XML; UPS updates rates for the HTML version occasionally and the rates for the XML request system are live, up-to-date, rates. So, you will see different rate reports between the two from time to time.

Link to comment
Share on other sites

Thanks for this module!

 

I know this is probably user error - but I did read all the documentation, and I searched the forums and still am stumped.

 

I have set up options in the admin for shipping, set up my account info and when I get to the checkout screen I do not see any optoins show up as selectable by the shopper for the UPS XML module.

 

Here's what I see >

shipping.jpg

 

What am I doing wrong? Can anyone help?

Link to comment
Share on other sites

My shop uses gram's in the 'weight' box due to the “tpgpost 2.4” contrib. witch calculates the local postal fees.

 

This contrib. thinks that the my shops gram's are infect KG. and give an 'to heavy' error.

 

UPS needs an input of kilogram’s (thus: weight/1000) Where can I change the UPSXML contrib. to make it work for the Dutch/European market?

Grtz

 

HanZ

 

 

 

-----------

Life is simple, only people make it complicated...

Louis Couperus, Dutch writer (1863-1923)

Link to comment
Share on other sites

I'm having a problem on checkout. After I log in as a customer I go to my shopping cart and click Checkout and I get a message that the page I'm looking for, catalog/checkout_shipping.php, is not available. I just installed the UPSXML contribution (yes, I've searched the support topic for that to no avail). It was working before that, not working now. I've looked through the code and can't find a reason why it wouldn't display the page.

 

Ideas, please?

Link to comment
Share on other sites

I have read all 55 pages - searched the code per the previous posts and I can't find this anywhere -

 

I need to edit the display date. When I try to even add - Delivery Date - to the LANGUAGE file that defines the shipping types, it doesn't display the dates at all.

 

I want to change the listings to look like this:

 

[shipping type] - Est. Delivery mm/dd/yyyy

 

Can anyone help? I'm using the most recent release of UPS XML.

 

Thanks :D

Link to comment
Share on other sites

UPS needs an input of kilogram’s (thus: weight/1000) Where can I change the UPSXML contrib. to make it work for the Dutch/European market?
To make it work for you look for this piece of code (assuming you don't use any dimensions support) around line 273:

		} else {
		// The old method. Let osCommerce tell us how many boxes, plus the weight of each (or total? - might be sw/num boxes)
		$this->items_qty = 0; //reset quantities
		for ($i = 0; $i < $shipping_num_boxes; $i++) {
// divide by 1000 to get kilograms, the function _addItem will round it
			$this->_addItem(0, 0, 0, $shipping_weight/1000);
		}
	}

A few lines further you also need to make a change:

$this->weight_for_timeintransit = round($shipping_num_boxes * ($shipping_weight/1000),1);

Link to comment
Share on other sites

I want to change the listings to look like this:

 

[shipping type] - Est. Delivery mm/dd/yyyy

There is a provision for this in the UPSXML shipping file around line 323 (change the last setting in the admin to use the Detailed setting) :

					} else {
				  if (isset($this->servicesTimeintransit[$type])) {
					$eta_array = explode("-", $this->servicesTimeintransit[$type]["date"]);
					$months = array (" ", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
					$eta_arrival_date = $months[(int)$eta_array[1]]." ".$eta_array[2].", ".$eta_array[0];
					$_type .= ", <acronym title='Estimated Delivery Date'>EDD</acronym>: ".$eta_arrival_date;
				  }		  
				}

The date that comes from UPS comes in the "database like form": 2006-12-03 so to you would need to change this to something like:

					} else {
				  if (isset($this->servicesTimeintransit[$type])) {
					$eta_array = explode("-", $this->servicesTimeintransit[$type]["date"]);
					$eta_arrival_date = $eta_array[1]."/".$eta_array[2]."/".$eta_array[0];
					$_type .= " - Est. Delivery ".$eta_arrival_date;
				  }		  
				}

Link to comment
Share on other sites

Hello,we recently installed this module. We followed all steps properly. It seems to be installed correctly however upon checkout this error occurs:This is currently the only shipping method available to use on this order. United Parcel Service (XML) 110007: No Services found for origin and destination addresses.If you prefer to use ups as your shipping method, please contact PinkTwoLips via Email. Can anyone help me with this?Thanks

Link to comment
Share on other sites

Hello,we recently installed this module. We followed all steps properly. It seems to be installed correctly however upon checkout this error occurs:This is currently the only shipping method available to use on this order. United Parcel Service (XML) 110007: No Services found for origin and destination addresses.If you prefer to use ups as your shipping method, please contact PinkTwoLips via Email. Can anyone help me with this?Thanks
See this post a few posts back. That should give more detailed information about what goes wrong. The actual error seems to be straight from UPS, complaining about the addresses you are supplying. If you do the logging you will see what is sent out to UPS, that might give a clue what is missing/wrong.
Link to comment
Share on other sites

I want to ship parcels longer as 1.5 meter with the UPSXML contri (due to length restictions by TNT) and all the rest with TNT post(TPGpost contri).

 

Is it possible to add this feature for instance with ship2 pay? and what has to be altered.

Grtz

 

HanZ

 

 

 

-----------

Life is simple, only people make it complicated...

Louis Couperus, Dutch writer (1863-1923)

Link to comment
Share on other sites

I want to ship parcels longer as 1.5 meter with the UPSXML contri (due to length restictions by TNT) and all the rest with TNT post(TPGpost contri).

 

Is it possible to add this feature for instance with ship2 pay? and what has to be altered.

I think the solution for this is the MVS contribution. As far as I know it contains an adapted version of UPSXML (HallMarc knows everything about that).
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...