Jump to content
Latest News: (loading..)
Sign in to follow this  
sormui

UPS XML problem

Recommended Posts

I've installed UPS XML but when I try to checkout, I am getting this error on the page:

 

ERROR: No boxes to ship unpackaged product

 

Fatal error: Cannot break/continue 1 level in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\oscommerce\catalog\includes\modules\shipping\upsxml.php on line 543

 

What did I do wrong or what did I miss? Please help ..... Thanks in advance!!!

Share this post


Link to post
Share on other sites
I've installed UPS XML but when I try to checkout, I am getting this error on the page:

What did I do wrong or what did I miss? Please help ..... Thanks in advance!!!

Can everyone help please?? :'(

Edited by sormui

Share this post


Link to post
Share on other sites
What did I do wrong or what did I miss? Please help ..... Thanks in advance!!!

From the readme.txt:

There is a Package Definition interface in Admin where one can create various packages in which product will ship. The

package definition is located in Admin->Tools->Packaging, and should be pretty straightforward.

Share this post


Link to post
Share on other sites
From the readme.txt:

Hi Jan,

 

Thanks for your help. My problem has been solved but I'm getting another error during checkout as follows:

 

United Parcel Service (XML)

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

 

It that my access key issue? Just wondering if UPS XML only works in United States? I would like to ship from Canada. How can make it compatible? Thanks a lot!!!

Share this post


Link to post
Share on other sites
My problem has been solved but I'm getting another error during checkout as follows:

 

United Parcel Service (XML)

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

 

It that my access key issue?

My crystal ball is broke so I can't know what you mean by that.

 

In case of an error like that I always tell people to enable logging, preferably using a full path for the log file (you would have known that if you tried reading a few pages of the UPS XML thread in the General Contribution Support forum). Around line 90 in /shipping/upsxml.php (example of a full path in the last line):

		// to enable logging, create an empty "upsxml.log" file at the location you set below, give it write permissions (777) and uncomment the next line
	  //	$this->logfile = '/tmp/upsxml.log';

	// to enable logging of just the errors, do as above but call the file upsxml_error.log
	//	  $this->ups_error_file = '/srv/www/htdocs/catalog/includes/modules/shipping/upsxml_error.log';

Just wondering if UPS XML only works in United States? I would like to ship from Canada. How can make it compatible?
Do you ever read the docs that come with a contribution? The original contributor (Torin Walker) who wrote 90% of the code mentioned he created it because the standard ups.php that comes with osC does not work for Canada.

Share this post


Link to post
Share on other sites
My crystal ball is broke so I can't know what you mean by that.

 

In case of an error like that I always tell people to enable logging, preferably using a full path for the log file (you would have known that if you tried reading a few pages of the UPS XML thread in the General Contribution Support forum). Around line 90 in /shipping/upsxml.php (example of a full path in the last line):

		// to enable logging, create an empty "upsxml.log" file at the location you set below, give it write permissions (777) and uncomment the next line
	  //	$this->logfile = '/tmp/upsxml.log';

	// to enable logging of just the errors, do as above but call the file upsxml_error.log
	//	  $this->ups_error_file = '/srv/www/htdocs/catalog/includes/modules/shipping/upsxml_error.log';

Do you ever read the docs that come with a contribution? The original contributor (Torin Walker) who wrote 90% of the code mentioned he created it because the standard ups.php that comes with osC does not work for Canada.

Hi Jan,

 

I find the following error in the error log:

 

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

UPS RESPONSE using exec():

 

What does that mean? How can I fix it? Thanks!

Share this post


Link to post
Share on other sites
I find the following error in the error log:

What does that mean? How can I fix it? Thanks!

It means that in your attempts to make it work you set an option to "1" around line 98 in /shipping/upsxml.php:

		// 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 = '1';

You should set it back to 0. Setting it to true (1) is more of a last resort. Most likely your ISP has blocked the use of exec on the server.

 

After that there might be another error (error 60 in cURL is the most common, see lines around 853 in that case to uncomment some code to fix that) or UPS XML works.

Share this post


Link to post
Share on other sites
It means that in your attempts to make it work you set an option to "1" around line 98 in /shipping/upsxml.php:

		// 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 = '1';

You should set it back to 0. Setting it to true (1) is more of a last resort. Most likely your ISP has blocked the use of exec on the server.

I tried to set it to "0" but I have the following error:

Fatal error: Call to undefined function curl_init() in C:\Program Files\Apache Software Foundation\Apache2.2 htdocs\oscommerce\catalog\includes\modules\shipping\upsxml.php on line 852

 

By the way, I am still testing my online shopping cart in my local machine so still using "localhost". I haven't uploaded my codes to the web hosting yet. Would it a problem to test UPS XML function?

 

After that there might be another error (error 60 in cURL is the most common, see lines around 853 in that case to uncomment some code to fix that) or UPS XML works.

I have tried to uncomment 2 lines of codes around line 853 but get the same error as above.

Share this post


Link to post
Share on other sites
I tried to set it to "0" but I have the following error:

Fatal error: Call to undefined function curl_init() in C:\Program Files\Apache Software Foundation\Apache2.2 htdocs\oscommerce\catalog\includes\modules\shipping\upsxml.php on line 852

 

By the way, I am still testing my online shopping cart in my local machine so still using "localhost". I haven't uploaded my codes to the web hosting yet. Would it a problem to test UPS XML function?

No, but cURL needs to be available on your PC (to be able to use a https connection, UPS XML needs a secure connection).

It might be as simple as downloading a file, saving it in the extensions folder of PHP, enabling it in php.ini (uncomment a line) and restart the webserver (Apache). I found someone wrote a blog entry about installing cURL on a PC.

It also contains links to download curl from the curl website. Looked very informative to me (I use a Mac, curl is on it by default...).

Share this post


Link to post
Share on other sites
No, but cURL needs to be available on your PC (to be able to use a https connection, UPS XML needs a secure connection).

It might be as simple as downloading a file, saving it in the extensions folder of PHP, enabling it in php.ini (uncomment a line) and restart the webserver (Apache). I found someone wrote a blog entry about installing cURL on a PC.

It also contains links to download curl from the curl website. Looked very informative to me (I use a Mac, curl is on it by default...).

I tried to follow the instructions to install curl on my PC but doesn't seem to solve the problem. How can I check if I have installed curl properly?

Share this post


Link to post
Share on other sites
How can I check if I have installed curl properly?
You should check in osC->admin->Tools->Server info. Half way there should be a section titled curl. Mine says "CURL support : enabled" and "CURL Information : libcurl/7.13.1 OpenSSL/0.9.7l zlib/1.2.3".

On that blog page is also a little script you can put in a singe page (add start and end PHP tags), save it in a folder in e.g. the catalog area. Go to that page with your browser (type in the address bar something like http://localhost/catalog/your_curl_file.php and you should see some result.

Share this post


Link to post
Share on other sites
You should check in osC->admin->Tools->Server info. Half way there should be a section titled curl. Mine says "CURL support : enabled" and "CURL Information : libcurl/7.13.1 OpenSSL/0.9.7l zlib/1.2.3".

I can't find "curl" section. :(

 

On that blog page is also a little script you can put in a singe page (add start and end PHP tags), save it in a folder in e.g. the catalog area. Go to that page with your browser (type in the address bar something like http://localhost/catalog/your_curl_file.php and you should see some result.

I tried to test it but I see the following fatal error:

Fatal error: Call to undefined function curl_init() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\your_curl_file.php on line 3

 

I have enabled "extension=php_curl.dll" in php.ini. How can I get cURL run? Please help .... Thanks a lot! :rolleyes:

Edited by sormui

Share this post


Link to post
Share on other sites
I can't find "curl" section. :(

I tried to test it but I see the following fatal error:

Fatal error: Call to undefined function curl_init() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\your_curl_file.php on line 3

 

I have enabled "extension=php_curl.dll" in php.ini. How can I get cURL run? Please help .... Thanks a lot! :rolleyes:

Hi Jan,

 

I think I have fixed the problem finally. Different shipping methods are shown but no matter what the contents are going to be shipped, it always shows the same price. It doesn't make sense. Would it be UPS problem? Or is it my problem? How can I fix it? Thanks for your help!!!

Share this post


Link to post
Share on other sites
Different shipping methods are shown but no matter what the contents are going to be shipped, it always shows the same price. It doesn't make sense. Would it be UPS problem? Or is it my problem? How can I fix it? Thanks for your help!!![/color]
You didn't happen to check the box with Do you receive discounted rates from UPS and want to use these for shipping quotes? in the admin for UPSXML? That would explain it (UPS Ground $3, UPS Next Day Air Saver $13, UPS Standard $11).

Share this post


Link to post
Share on other sites
You didn't happen to check the box with Do you receive discounted rates from UPS and want to use these for shipping quotes? in the admin for UPSXML? That would explain it (UPS Ground $3, UPS Next Day Air Saver $13, UPS Standard $11).

Jan, for:

Negotiated rates

Do you receive discounted rates from UPS and want to use these for shipping quotes? Note: You need to enter your UPS account number below.

 

If I choose "true", the prices seem to be fixed but if I choose "false", the prices are various.

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
Sign in to follow this  

×