Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New UPS XML Shipping Module available


Recommended Posts

I just installed the UPS XML Shipping Module to my site.

Everything seemed to install correctly. I was able to enter the admin,

install the new module, and select all the appropriate bubbles

(filled in access keys, user names, passwords, etc).

 

When I start select "Disallowed Shiping Methods",

I select the UPS services NOT to be offered.

However, at checkout_shiping.php I have all of them.

I can not update "Disallowed Shiping Methods".

 

Can someone assist me with this? Thanks in advance.

Link to comment
Share on other sites

I too am getting this error:

Warning: constant(): Couldn't find constant UPSXML_US_01 in ...

 

I did not skip Step #3 - and copied and pasted with the same result. I also, reinstalled the contribute files twice (to make sure I didn't put a file in the wrong area).

It is not the same error and the constant is defined in the language file (includes/languages/english/modules/shipping/upsxml.php). You might need to add it in another language "branch"?

Link to comment
Share on other sites

I am new to OScommerce

 

I am getting the error in checkout shipping :

 

Warning: constant() [function.constant]: Couldn't find constant UPSXML_Array in /home/content/f/r/a/franfill/html/catalog/includes/modules/shipping/upsxml.php on line 983

 

 

I made the changes in outline 3 both note1 and note2

 

if (tep_not_null($action)) {
switch ($action) {
  case 'save':
	foreach($_POST['configuration'] as $key => $value) {
	if (is_array($value) ) {
	  $value = implode( ", ", $value);
		  $value = ereg_replace (", --none--", "", $value);
		}
	  tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'");
	}
	tep_redirect(tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $HTTP_GET_VARS['module']));
	break;
  case 'install':

 

I changed code from:

 

while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) {

 

to

 

foreach($_POST['configuration'] as $key => $value) {

 

either way is not working..

 

 

 

any help, Thank You

Link to comment
Share on other sites

I got the above working not sure why I was getting the error,

 

 

I do have another question we sell our products by the box how can we show that for each product there is one package do I need to install the dimensional support to designate for each product in the cart is equal to 1 package.

Link to comment
Share on other sites

I do have another question we sell our products by the box how can we show that for each product there is one package do I need to install the dimensional support to designate for each product in the cart is equal to 1 package.

Yes, you would need the dimensional support. This would be a "ready-to-ship" item so you could use a "light" version of the dimensional support if you would want that.

Link to comment
Share on other sites

I suddenly started getting an error when customers only outside US try to check out Fatal error: Cannot use string offset as an array in /home/qsi1/public_html/includes/modules/shipping/upsxml.php on line 247

 

I believe this is what happened to me once before and I replaced the zones table in the database and it fixed the problem so I assumed it was a corrupted table. It could also be fixed both then and now by commenting out time in transit.

 

I replaced the zones table this time and it did not fix it however commenting out time in transit still does. I would really like to keep time in transit on does anyone have any idea what causes this. This is the second time it happened and I can not relate it to anything done recently. The site has been running for a long time.

Link to comment
Share on other sites

I suddenly started getting an error when customers only outside US try to check out Fatal error: Cannot use string offset as an array in /home/qsi1/public_html/includes/modules/shipping/upsxml.php on line 247

And now we have to guess what version you use and what code exactly is on line 247?

Link to comment
Share on other sites

I was getting pricing quotes way too low using just weight, so i decided to install the dimensional support hoping that i get more accurate quote.

I just installed the dimensional support module, but it seems that nothing has changed as far as pricing. i still get the same quotes as i did before. Also, i do not understand why, but i am still getting quotes which are way too low. Can someone help me, please!

Link to comment
Share on other sites

And now we have to guess what version you use and what code exactly is on line 247?

 

Ah Sarcasm so nice at the end of the week. But I deserve it I guess I humbly apologize for being an an end of the week idiot. Version 1.1.4 Here is line 247 $_type = $_type . ", ".$this->servicesTimeintransit[$type]["date"];

 

Since it only happened with International that is why last time it happened (about a year ago) I replaced the zone and the countries table and the problem went away. This time that solution did not work. But as I stated if I comment out the below it works perfectly but you lose the time in transit

 

// BOF Time In Transit: comment out this section if you don't want/need to have

// expected delivery dates

 

// $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 Lines 200-229

Link to comment
Share on other sites

Ah Sarcasm so nice at the end of the week.

Actually it is more frustration than anything else. Without enough information there is so little one can do.

 

Version 1.1.4 Here is line 247 $_type = $_type . ", ".$this->servicesTimeintransit[$type]["date"];

That is relatively old. I checked the later versions and found that more checks were added in case the Time in Transit errors.

 

The last line in this part was changed:

// BOF Time In Transit: comment out this section if you don't want/need to have 
// expected delivery dates

	$this->servicesTimeintransit = $this->_upsGetTimeServices();

to:

		// make sure that when TimeinTransit fails to get results (error or not available)
	// this is not obvious to the client
	$_upsGetTimeServicesResult = $this->_upsGetTimeServices();
	if ($_upsGetTimeServicesResult != false && is_array($_upsGetTimeServicesResult)) {
	$this->servicesTimeintransit = $_upsGetTimeServicesResult;
	}

The version number 1.1.4 in the upsxml.php file was not updated I guess (in the UPSXML 1.1.4 that line that you have at 247 is at 238) but I assume it still reads (which would be good):

			 	if (isset($this->servicesTimeintransit[$type])) {
				$_type = $_type . ", ".$this->servicesTimeintransit[$type]["date"]; // line 247
			}

I think that should avoid the error but it would still be interesting to see what UPS actually returns that causes it.

 

You could check that by registering a test user with the exact same address as one of your customers that experienced the error and then enabling logging in the upsxml.php module (plus adding the empty log file and making it writable for the server).

Then if you try to checkout you would see the data that is sent to UPS for the time in transit and what they return.

It might be something in your particular setup that causes that part to fail (or it was just a temporary glitch at UPS...).

Link to comment
Share on other sites

I was getting pricing quotes way too low using just weight, so i decided to install the dimensional support hoping that i get more accurate quote.

I just installed the dimensional support module, but it seems that nothing has changed as far as pricing. i still get the same quotes as i did before. Also, i do not understand why, but i am still getting quotes which are way too low. Can someone help me, please!

There is little to no information to go on here. Why don't you enable the logging of what is sent to UPS and what the UPS servers return and check that your site sends the correct weight to UPS (weight and LBS or KGS) and see for yourself what information is wrong.

Link to comment
Share on other sites

There is little to no information to go on here. Why don't you enable the logging of what is sent to UPS and what the UPS servers return and check that your site sends the correct weight to UPS (weight and LBS or KGS) and see for yourself what information is wrong.

 

Thanks, this is a very good idea. I am new to this, so can you tell me how to do it... thanks again.

Link to comment
Share on other sites

There is little to no information to go on here. Why don't you enable the logging of what is sent to UPS and what the UPS servers return and check that your site sends the correct weight to UPS (weight and LBS or KGS) and see for yourself what information is wrong.

 

Thanks, I got the log file and everything seems to be correct in terms of information that i am providing, but the quoted rate is $7.50 vs $9.96 if i get it from a UPS site directly. I am using LB, IN, currency USD the following is the address of the log:

Edited by Jan Zonjee
Link to comment
Share on other sites

Thanks, I got the log file and everything seems to be correct in terms of information that i am providing, but the quoted rate is $7.50 vs $9.96 if i get it from a UPS site directly. I am using LB, IN, currency USD the following is the address of the log:

Better change the name of the log now to something not easily guessable or remove it. Those logs contain your user names and password!

 

The dimensions of the box are sent as 12 x 12 x 12 inches, 6 LBS and a customer provided package. Any different to what you enter in the UPS site?

 

The complete set that is returned is:

UPS Ground $7.50
UPS 3 Day Select $11.62
UPS 2nd Day Air $14.95
UPS Next Day Air Saver $25.60
UPS Next Day Air Early A.M. $60.75
UPS Next Day Air $29.44

You would have to ask UPS why their rates seem different. As far as I know it uses the same database so I wouldn't know why $7.50 becomes $9.96.

Link to comment
Share on other sites

Better change the name of the log now to something not easily guessable or remove it. Those logs contain your user names and password!

 

The dimensions of the box are sent as 12 x 12 x 12 inches, 6 LBS and a customer provided package. Any different to what you enter in the UPS site?

 

The complete set that is returned is:

UPS Ground $7.50
UPS 3 Day Select $11.62
UPS 2nd Day Air $14.95
UPS Next Day Air Saver $25.60
UPS Next Day Air Early A.M. $60.75
UPS Next Day Air $29.44

You would have to ask UPS why their rates seem different. As far as I know it uses the same database so I wouldn't know why $7.50 becomes $9.96.

 

Thanks. I removed dimesional support, but i am still gettting $7.50. It was the reason i added dimensional support. I just wanted to make sure, that there is nothing else i should do before calling UPS, so i guess i will be calling UPS now. Thanks again, your help is greatly appreciated.

Link to comment
Share on other sites

I don't understand why, but all of a sudden i lost half the screen on the Modules menu under Shipping. It shows choices for shipping, but does not show the edit part of the screen, also i had more options after UPS, but now it just stops at UPS. I guess i need your help again. Thanks.

Link to comment
Share on other sites

When installing a fresh 1.3.5 version, should one start at the INSTALLATION section of the readme? There's a comment earlier that mention following the "instructions below this section," and that's where I gathered we land. I ask also because it seems a lot of files in the zip are not accounted for in the instructions, and I'm not seeing the module in my admin panel, so I'm missing something. Thanks for any help.

Link to comment
Share on other sites

I have been using this for about 6-8 weeks with no problems, then within the last 24-48 hrs, I noticed no one using UPS. So I logged on my site and noticed the option is not a vaild option.

 

My email log file contains 4 emails with PHP errors

 

1. UPSXML TimeInTransit Error: : experienced by customer with id 12 on 2009-03-04 09:03:31

 

2. Error from cURL: Error [60]: SSL certificate problem, verify that the CA cert is OK. Details:

error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed experienced by customer with id 12 on 2009-03-04 09:03:31

 

3.Error from cURL: Error [60]: SSL certificate problem, verify that the CA cert is OK. Details:

error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed experienced by customer with id 12 on 2009-03-04 09:03:31

 

4. UPSXML Rates Error: : experienced by customer with id 12 on 2009-03-04 09:03:31

 

Looking at the messages, Its states my cert could be bad, but that not set to expire until Oct 2010. I have not edited any of the files in quite some time, but my hosting company seems to update things all the time without letting us know.

 

So does anyone have a starting point in fixing this problem?

Edited by graysonhobby
Link to comment
Share on other sites

I have been using this for about 6-8 weeks with no problems, then within the last 24-48 hrs, I noticed no one using UPS. So I logged on my site and noticed the option is not a vaild option.

 

So does anyone have a starting point in fixing this problem?

The shipping upsxml.php file close to the bottom of the file:

			// uncomment the next line if you get curl error 60: error setting certificate verify locations
		// curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
		// uncommenting the next line is most likely not necessary in case of error 60
		// curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);

Link to comment
Share on other sites

The shipping upsxml.php file close to the bottom of the file:

			// uncomment the next line if you get curl error 60: error setting certificate verify locations
		// curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
		// uncommenting the next line is most likely not necessary in case of error 60
		// curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);

 

 

That solved it! Great Thanks!!

 

Now, why do you figure it just stopped working?

Link to comment
Share on other sites

Perhaps your hosting provider moved your shop to another server with a slightly different setup?

 

 

Yea, they tend to make changes like this several times a year. I knew it had something to do with them.

 

Now that I think of it, my site was down for about 30mins this past weekend.

 

 

 

One more thing..Is there a way to cap the shipping for UPS ground? I like for the customer to pay actually shipping up to $15 then I will cover anything over $15.

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