Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New UPS XML Shipping Module available


Recommended Posts

Hello,

 

I would like to get this thing working, but with all of the updates, it is very hard to follow to do the installation. Also, when trying to access the packaging page, it gives a file of htaccess.php error.... there was no file found in the installation nor on the osc site.... I've searched all over to get this figured out... but not having much luck.... any help will be appreciated....

 

Thanks

RJ

Empire Metal Art

Link to comment
Share on other sites

  • 4 weeks later...
For Any One That Doesn't Have This Working.... and is getting the

Error....

I did have cURL enabled on my server and I've spent a lot of time debugging this damn thing.... and this is what you have to do to find out why its not working....

 

Find this line of code:

 

curl_setopt($ch, CURLOPT_TIMEOUT, (int)$timeout);

 

And add this after it:

 

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
? curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);

Find this line of code:

   

error_log("UPS RESPONSE: " . $xmlResponse . "\n", 3, $this->logfile);

 

And change it to this:

   

error_log("Error Message: " . curl_error($ch) . "\nUPS RESPONSE: " . $xmlResponse . "\n", 3, $this->logfile);

 

$this->logfile needs to point to the complete UNIX filepath inorder to work...

IE:  /home/yourwebspace/public_html/osc/tmp/logfile.log

 

If you still can't get logfile to work... change:

   

, 3, $this->logfile); (in the last change)

 

-to this-

   

, 1, '[email protected]'); ?(replacing [email protected] with your email address)

 

This will allow you to see any error messages thrown by cURL as well as if you get any response from the UPS server.

 

I hope this helps most of you with problems, or at least figure out why you have these problems.

 

 

 

 

I made these changes and still get the error... I checked phpinfo() and got this about curl:

CURL support enabled

CURL Information libcurl 7.9.5 (OpenSSL 0.9.6b) (ipv6 enabled)

 

I also these errors in BOX_TOOLS_PACKAGING:

Warning: main(includes/classes/htaccess.php): failed to open stream: No such file or directory in /home/virtual/site73/fst/var/www/html/catalog/admin/packaging.php on line 59

 

Warning: main(): Failed opening 'includes/classes/htaccess.php' for inclusion (include_path='.:/php/includes:/usr/share/php') in /home/virtual/site73/fst/var/www/html/catalog/admin/packaging.php on line 59

 

 

And when I click new package I get:

Warning: Missing argument 1 for shownewpackageform() in /home/virtual/site73/fst/var/www/html/catalog/admin/packaging.php on line 201

 

 

Can anyone help?

Link to comment
Share on other sites

Ok... I'll answer my own questions, but still confused.

 

I reinstalled this on a totally different server and was able to contect to ups...FINALLY! The new server had newer version of cURL but not by much.

CURL support enabled

CURL Information libcurl/7.10.7 OpenSSL/0.9.7d zlib/1.1.4

 

To fix the errors in the tools > packaging...

I commmented out line 59... It was asking for a file htaccess.php that didn't exist. Is this bad? Why was line 59 in the code???

 

To fix the other error when clicking on new package...

I deleted argument($error) from the function showNewPackageForm($error). Is this bad?

Why was it there???

 

I'm not a php programer by no means... I understand the logic behind programming so I was able to figure this out. I guess I can pick my hair up off the floor now...

Edited by opie
Link to comment
Share on other sites

  • 2 weeks later...

This module works great!

 

I would like to offer a way to either separate items for faster shipment or combine items to save cost like Amazon.com does.

 

I would like to force an item that is dropped shipped to be charged a completely separate shipping charge.

 

I would also like to be able to choose which shipping methods are offered in the admin panel.

 

Anyone up for the coding challenge? If not I'll take it.

Link to comment
Share on other sites

This module works great!

 

I would like to offer a way to either separate items for faster shipment or combine items to save cost like Amazon.com does.

 

I would like to force an item that is dropped shipped to be charged a completely separate shipping charge.

 

I would also like to be able to choose which shipping methods are offered in the admin panel.

 

Anyone up for the coding challenge?  If not I'll take it.

I agree, it's a great module!

 

As to the items you mentioned above, you might want to touch base with Craig Garrison through this thread. He has been working on something that might go a long way towards achieving what you want and I'm certain would be thrilled to have some assistance.

 

Just as a personal aside... If you are feeling spunky and familiar with the UPSXML contribution - I have been trying to get it set up so the store owner could select which available methods are offered to the customer (a la USPS Methods contribution). I think it's overkill and messy looking to have (for example) Next Day, Next Day Early AM and Next Day Saver plus the other options presented in the customer's shipping options. (See my thread on this here). I am still struggling with this and will stay with it until I get it sorted out, but sure would appreciate some guidance.

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Link to comment
Share on other sites

I am using this module and love it.

 

However, can anyone suggest why it is adding three pounds (3 lbs) to my shopping cart weight at checkout?

 

I can still work with this bug (if it is a bug), since worse case my customers simply pay a little more for shipping. But sooner or later they are going to figger out what is going on and we will be in hot water for putting our thumb on the scale.

Link to comment
Share on other sites

3 pounds is the default tare (packaging) weight that comes set in osC. You can change this to whatever you want in your Admin -> Configuration -> Shipping/Packaging area.

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Link to comment
Share on other sites

  • 2 weeks later...

New version just uploaded:

 

Admin selectable shipping methods, Time In Transit International error fix, updated install instructions

 

UPSXML_1.04

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Link to comment
Share on other sites

Excellent job Stuart.

After backing up the db, I exchanged the includes/modules/shipping/upsxml.php file with the new one, made the changes in the admin/modules.php and admin/includes/functions/general.php, made a note of the data (UPS Rates Access Key, password etc.), removed the UPSXML from shipping, re-installed, put in the data again and it worked like a charm. No more error messages with international shipping either. Great!

 

Two small notes: I saw that you (and the people before you) didn't change the $Id line in the top:

"$Id: upsxml.php,v 1.01 2003/07/04 10:00:00 torinwalker Exp $".

 

Also I noticed a typo that has gone unnoticed so far since at least version 1.3. Somewhere around line 632 it says" MODULE_SHIPPING_UPSXML_RATES_TEXT_COMM_UNKNWON_ERROR" but it should be "MODULE_SHIPPING_UPSXML_RATES_TEXT_COMM_UNKNOWN_ERROR".

Link to comment
Share on other sites

I'm getting this error when I checkout or try to view the shipping modules..

 

Fatal error: Cannot redeclare class xmldocument in /home/virtual/site73/fst/var/www/html/catalog/includes/classes/xmldocument.php on line 18

Link to comment
Share on other sites

There are 2 "xmldocument.php" files.

 

One belongs at catalog/includes/classes/xmldocument.php

and the other at catalog/admin/includes/classes/xmldocument.php

 

are they both at the right location?

 

If so, do a search on your entire osc folder and see if "class xmldocument" appears anywhere in your files other than ONE TIME in each of the 2 above mentioned files.

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Link to comment
Share on other sites

You'll have to check the UPS TOS to confirm this, but I believe its a no-no to use your key for other UPS shipping accounts.

 

If your clients have their own UPS account, then I think they need their own keys.

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Link to comment
Share on other sites

I have installed this great contribution. But I cannot get it to work. Everytime I try to check out, I get the following error on the Shipping page of my website:

 

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

 

 

I emailed UPS about it, but I have yet to get a response back.

 

Anybody here have any ideas?

 

Thanks,

Craig

Link to comment
Share on other sites

You'll have to check the UPS TOS to confirm this, but I believe its a no-no to use your key for other UPS shipping accounts.

 

If your clients have their own UPS account, then I think they need their own keys.

 

 

You are correct sir, UPS did email me back with specific dirctions for our current client.

 

Thanks for the information. Much apreciated.

 

Chris

Link to comment
Share on other sites

I installed this contrib and it connected right away to UPS and gave rates (very high ones - but that's for later).

 

Is it supposed to show an ETA next to the UPS delivery choices? I'm not seeing any.

 

Also, has anyone managed to get the dimensional side of it working without errors and if so, is it useful?

 

Thanks;

Marvin

Best & Thanks;
Marvin
----------------------
osCommerce 2.3.3.4 

Link to comment
Share on other sites

You should see transit days ONLY for domestic (USA to USA) shipments. The international transit needs some work to make them appear (anyone handy with coding is welcome to fix this - it's beyond my capabilities).

 

I've been using dimensional support for 1-1/2 years on a pre-MS1 store without any problems.

Edited by mugitty

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Link to comment
Share on other sites

Hi Stuart;

 

Thanks for your reply!

 

I changed my store's settings to a valid US address and then used a valid US address as a ship-to location and the ETA's did indeed show up. Programming ETA's for Canada is beyond me (I'm a copy & paste person) :-)

 

I have a theory question about the UPS contribution. I had already installed the Canada Post hack and it works perfectly. I thought the UPS hack made use of the box sizes that I already inputted for Canada post.

 

It doesn't seem to as the dimension hack has a separate screen in the admin for creating UPS boxes. Is my understanding wrong? It seems that I would have to enter box sizes for both Canada Post and for the UPS hack.

Best & Thanks;
Marvin
----------------------
osCommerce 2.3.3.4 

Link to comment
Share on other sites

Hi Stuart,

 

I have seen you post many times praising the dimensions support and that you haven't had any problems with it. Would you, or anyone else out there using the dimensions support, test this out in your cart and tell me whether you encounter the same problem?

 

The problem is with a mixed cart, a cart with both ready to ship and non-ready to ship items placed in it.

 

When a product that is not marked ready to ship is added to the cart and then a product that is marked ready to ship is added to the cart the module is not recognizing that the ready to ship item is ready to ship. It puts both items into one box.

 

Now if the ready to ship item is placed in the cart first, it works the way it is supposed to and each item is placed in its own box.

 

In fact, when there is more than one ready to ship item in the cart and there are any none ready to ship items in the cart, the only way I can get the ready to ship packages to be recognized as ready to ship is to add them in first and then the non-ready to ship items.

 

Do you know of how I can get the products sorted in such a way that all ready to ship items would be dealt with first, since this seems to be the only way that the module gives us the correct quote?

 

I would appreciate any help, I can get with this.

 

Katrina

Link to comment
Share on other sites

quick question before I install this, I wanted to verify something quick.....

 

in the readme it states:

 

STEP 3 *** If you have already installed USPS Methods or UPS Choice, you can skip this step

 

 

 

Are those shipping modules different then the stock ones that came in my 2.2MS2?

Both USPS and UPS are installed in my shipping modules section, but im guessing the ones mentioned in step3 are different modules, correct?

 

Thanks

Link to comment
Share on other sites

Hi Stuart,

Nice mod. Thanks for your work!

 

2 questions? As Opie had asked...

 

I commmented out line 59... It was asking for a file htaccess.php that didn't exist. Is this bad? Why was line 59 in the code???

 

Why is this requiring htaccess.php, and there is no htaccess.php?

 

Also, I saw somewhere in the install instructions I think, something like...

 

add this to your .htaccess to keep people from viewing your xml config...

 

Where is this located?

 

Thanks again,

Thanks!

 

Starkness

Link to comment
Share on other sites

Yes, they are different than the stock ones that come with osC. Both of them and the newest version of UPSXML use a new function that allows choosing the shippings methods from the Admin area that you want to show your customers, so you will need to follow that step to add the new function.

 

For testing, once you've got it installed, you can find some comparisons of the various options that exist within UPSXML and the UPS website HERE. Note that the changes to the install instructions mentioned in the first part of the post have been corrected already in the latest version of UPSXML.

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Link to comment
Share on other sites

Marvin;

I know that the original author of UPSXML with dimensional support had referred to some of the code in the Canada Post module when developing UPSXML. I don't know if that extended to the packaging, as I've never used Canada Post. I'll look at it this weekend to see if I can sort out how they both could use the same packaging information.

 

Katrina;

I never have noticed that situation. I'll do some testing and see if I can come up with an answer for you (Afraid it will be this weekend before I can test).

 

Starkness;

I never noticed the bit about protecting the XML config (guess I'll have to re-read the original install instructions and get back to you!). As for my own installation, I have just commented out the call to the .htaccess file, without any apparent problems being caused. I don't know to this day why it was there in the original contribution.

 

Sid04

OOPS! When I did a minor update, I neglected to remove that second ZIP file that I had stored in the folder containing all of the files for the contribution. You should ignore the second ZIP file and use the files that are extracted when you initially open the download.

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

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...