Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New UPS XML Shipping Module available


Recommended Posts

I get this error when attempting to run tests, on the second page of checkout. After reviewing my cart and clicking continue, this comes up.

 

Any ideas? I have double checked the userid, password, and access key several times, and double checked all the installation instructions to make sure I have added the needed code correctly. I'm stumped.

Best thing to do is (temporarily) enable logging of all that is sent to UPS and all that is received from UPS. Follow the instructions in the source code of includes/modules/shipping/upsxml.php (starts around line 85)

// end insurance addition
// 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';

Using a full path like the last line seemed to work best in my experience.

Link to comment
Share on other sites

Best thing to do is (temporarily) enable logging of all that is sent to UPS and all that is received from UPS. Follow the instructions in the source code of includes/modules/shipping/upsxml.php (starts around line 85)

// end insurance addition
// 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';

Using a full path like the last line seemed to work best in my experience.

 

Thank you. I missed the part on how to turn on logging. I'm too new with PHP to feel comfortable doing that myself...and it would have been ugly. :) I'll see what I see and post the log if I can't figure it out.

 

Aaron

Link to comment
Share on other sites

Warning: error_log(): "sendmail_from" not set in php.ini or custom "From:" header missing in .........products\order\includes\modules\shipping\upsxml.php on line 795

 

Warning: error_log(): "sendmail_from" not set in php.ini or custom "From:" header missing in ........products\order\includes\modules\shipping\upsxml.php on line 1005

 

Warning: error_log(): "sendmail_from" not set in php.ini or custom "From:" header missing in ........products\order\includes\modules\shipping\upsxml.php on line 795

 

Warning: error_log(): "sendmail_from" not set in php.ini or custom "From:" header missing in ........products\order\includes\modules\shipping\upsxml.php on line 857

 

I'm getting this error on checkout (......./products/order/checkout_shipping.php)

 

and I am getting: 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

 

 

Where the option is to choose your shipping method not sure what to do here....??? Someone please help me!

Link to comment
Share on other sites

Warning: error_log(): "sendmail_from" not set in php.ini or custom "From:" header missing in .........products\order\includes\modules\shipping\upsxml.php on line 795

 

Warning: error_log(): "sendmail_from" not set in php.ini or custom "From:" header missing in ........products\order\includes\modules\shipping\upsxml.php on line 1005

 

Warning: error_log(): "sendmail_from" not set in php.ini or custom "From:" header missing in ........products\order\includes\modules\shipping\upsxml.php on line 795

 

Warning: error_log(): "sendmail_from" not set in php.ini or custom "From:" header missing in ........products\order\includes\modules\shipping\upsxml.php on line 857

 

I'm getting this error on checkout (......./products/order/checkout_shipping.php)

 

and I am getting: 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

Where the option is to choose your shipping method not sure what to do here....??? Someone please help me!

 

 

I think I know why I am having an email error. I have to have my email.php to include

 

if (EMAIL_TRANSPORT == 'smtp') {
ini_set("SMTP","mail.website.com");
ini_set("smtp_port","8989");

ini_set("sendmail_from","[email protected]");
	return mail($to_addr, $subject, $this->output,
'From: ' . $from . $this->lf . 'To: ' . $to .
$this->lf . implode($this->lf, $this->headers) .
$this->lf . implode($this->lf, $xtra_headers));
  } else {
	return mail($to, $subject, $this->output,
'From: '.$from.$this->lf.implode($this->lf,
$this->headers).$this->lf.implode($this->lf,
$xtra_headers));
  }
}

 

**Of course I edited out my websites name.

 

This is because SMTp is disabled on the server and I am running on windows. So How do i go around this?

Link to comment
Share on other sites

So How do i go around this?
It looks like getting errors mailed to you is a problem on your server. You can turn that off in the admin section (shipping->upsxml).

 

You can still log the errors.

 

Try logging all of the info that gets sent to UPS and is received from UPS (see my post a few posts higher, UPS sends detailed information about the error). Looks like cURL errors to me though (but those get logged too).

Link to comment
Share on other sites

Jan, Can you point me to the post? Im searching but I'm having a hard time finding the one you are talking about. And cURL is installed on the server...???

 

Thank you for your help I need this fixed ASAP! My client is starting to get upset.

Link to comment
Share on other sites

It is really only a few post back (post 876 on the previous page).

:-" Ok Call me Blonde..I was searching pages back... and I all needed to do was scroll up..... Sorry now I feel like an idiot.

 

This is the error in my log file

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
UPS RESPONSE:

Link to comment
Share on other sites

NM Google site searched it in the forums and found where you had already answered it. I had to uncomment line 775!

 

Just one question.... Im sending out 4 different packages with a total of 32 lbs how do I change it so it isnt 1x 32 lbs but 4 X 8???

Link to comment
Share on other sites

Hi everyone, this is a great contribution, if only I could get it to work!

 

anyways it's returning this error checkout_shipping.php:

 

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

 

and in upsxml.log I'm getting this:

 

 Error from cURL using exec() since there is no $xmlResponse
UPS RESPONSE using exec(): 
------------------------------------------
Time in Transit: 0
------------------------------------------

 

and that shows up after </TimeInTransitRequest>

 

according to my host, we have the following version of cURL enabled and compiled into PHP:

 

\"libcurl/7.10.5 OpenSSL/0.9.6 zlib/1.1.4\"

 

so I know it can't be that.

 

the one thing I can think of is I currently have SSL disabled on the store for testing purposes and we need to buy a different certificate, could that be the trouble? if not, any ideas are appreciated.

Link to comment
Share on other sites

Hi, if someone can help me I installed contrib., everything is working nice and smooth, just one thing is bothering. In my shipping calculator, Shipping Options: in cart, when l selecting international location (some other country) international methods are displayed but I receive email with error:

 

UPSXML TimeInTransit Error: 270013: Invalid Shipment Contents Value experienced by customer with id on 2006-05-19 18:31:51

 

 

If anyone know what can be the problem, please let me know, thanks.

Link to comment
Share on other sites

Need some help please!

 

I followed the instructions step by step and am having a problem with the mod.

 

When I go to admin--> UPS(XML) --> install, it doesn't "install". When the modules.php page reloads, it still shows Install and there's no edit/remove buttons.

 

Is there something I missed?

 

Sorry if its already in this topic. 45 pages of searching is a little difficult. :-)

 

Thanks!!!

Link to comment
Share on other sites

I am also getting a blank page at the checkout_shipping.php point;

 

the Amazon cURL 'test' works for me.

 

I have uncommented the upsxml.log file, created a blank, chmod 777'ed it, changed the path additionally so that there is no confusion. My empty file stays exactly that way, empty. (It has one word in it that I put there)

 

I tried to enable display errors- that is, I edited php.ini, the one that using the <php info ?> command would generate ... turns out- I forgot to apachectl restart ..

 

Low and behold, xmldoument.php was not in it's proper place, I have a wack-ass multi store setup thats largely different than any other install. Symbolic-link-central.

 

Anyhow- in closing;

 

The answer is in the forum, other than that, the hardest thing was getting the access key from UPS because the link to get it is not obvious. The deal there is;

 

Sign up for UPS Online Tools, pick XML rate information, and agree to several different licenses along the way, three form submittals later, a developer key will show up in your email. Do it one more time to get the access key.

 

.....

 

The question here is now, test or production server. If i'm using a UPS World Ship terminal, do I care if I leave it on Test since i'm not doing any manifesting with it anyway?

Link to comment
Share on other sites

vdefabis,

 

I ran into this same problem but I basically caused this by modifying one of the files. Anyway, what I found was that it was installing everytime and I had clicked "Install". When I looked at my database I could see the repeated installed information. So, you may want to look at your database to check for the installed info. I think I just changed the address bar on my browser to reflect the edit function and it worked, but I might have just down it using PHPmyadmin.

 

Hope this helps

John Wisdom

Link to comment
Share on other sites

I am having a problem with the packaging routine where 2 different type items that need to go into different boxes are being boxed together. Even if I make the dimensions where it will not fit into a certain box it is still using that box.

 

So, I'm wondering how hard would it be to assign products to boxes. Say, an item that is 36 x 1 x 1 to a long box and an item that is 10x10x10 to a different box. This would also help with having an oversize box available, which I know has been discussed in this thread befoe. Bottom line is the packaging routine uses the biggest box every time so an oversize box cannot be listed.

 

In my case it's using one box for the quote where I'm having to use 2 boxes for the actual shipment. No matter how I tweak things around I can't seem to find a good solution.

 

Any thoughts are greatly appreciated.

John Wisdom

Link to comment
Share on other sites

I just installed this module and all works fine except I was expecting to see the raw/detailed transit times for the proposed shipping methods. All I get is the available methods and cost but no details. Anyone know why?

 

Thanks!

Link to comment
Share on other sites

Set up the log like it describes in the instructions and it gives a detailed log. The log gets very big very quickly on an active site, but it's helpful in seeing how items are being packaged and if any items are not being packaged in the quotes.

John Wisdom

Link to comment
Share on other sites

John,

I am having a problem with the packaging routine where 2 different type items that need to go into different boxes are being boxed together. Even if I make the dimensions where it will not fit into a certain box it is still using that box.
But the long item does fit into the oversize box (in reference to your previous post, haven't tried it myself yet, can't believe it wouldn't work by the way)?

 

The packaging routine only looked at the volume of a product before. I "sophisticated" that somewhat to build in a check on the diagonal of the product: if it is bigger than that of the box it will not fit because of the dimensions. However, it will put a 10x10x10 product in a 8x8x14 box (100 + 100+ 100 < 64 + 64 + 196) which in reality will not. I think that can be fixed by sorting the dimensions of both the box and the product on size and check whether one of the sizes of the product exceeds that of the box.

So, I'm wondering how hard would it be to assign products to boxes. Say, an item that is 36 x 1 x 1 to a long box and an item that is 10x10x10 to a different box. This would also help with having an oversize box available, which I know has been discussed in this thread befoe. Bottom line is the packaging routine uses the biggest box every time so an oversize box cannot be listed.
It is true that the routine is using the biggest box, because in general the less boxes, the less you pay for shipping.

 

Assigning a product to a box might not be the biggest problem, but how do you go from there? If you just assigned a large item to an oversize box, but it is only filled 2/3 you want a small item to go into that oversize box and not use another one... Bottom line: I think it might turn out more difficult than you would suspect on first glance.

Link to comment
Share on other sites

I want to offer my customers free ground shipping. Is this possible using this module?

 

At the moment I am using Flat Rate as well as the UPSXML module. I renamed flat rate to be "Free Shipping" and set the flat rate to 0.00. Then for UPS I disallowed Ground shipping. This all works very well, however I want to take advantage of the EDD that UPS returns for Ground. Currently, through the flat rate, I use the description "UPS Ground 3-7 business Days", but I'd like to give a more accurate time estimate than just 3-7 business days.

 

Thoughts?

Link to comment
Share on other sites

I want to offer my customers free ground shipping. Is this possible using this module?
You can set the cost to zero (around line 313 in includes/modules/shipping/upsxml.php):

				// BOF limit choices, behaviour changed from versions < 1.2
			if (exclude_choices($type)) continue;
			// EOF limit choices
	// Ground is free: make cost zero
	if (stristr($type, 'Ground')) { $cost = '0.00'; }

At the moment I am using Flat Rate as well as the UPSXML module. I renamed flat rate to be "Free Shipping" and set the flat rate to 0.00. Then for UPS I disallowed Ground shipping. This all works very well, however I want to take advantage of the EDD that UPS returns for Ground. Currently, through the flat rate, I use the description "UPS Ground 3-7 business Days", but I'd like to give a more accurate time estimate than just 3-7 business days.
Instead of showing $0.00 in the checkout_shipping.php you could check for a price of zero and echo something like "Free" instead.

					<td class="main"><?php echo ($quotes[$i]['methods'][$j]['cost'] == 0 ? '<span style="color: red; font-weight: bold">Free</span>':  $currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], (isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0)))); ?></td>
				<td class="main" align="right"><?php echo tep_draw_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], $checked); ?></td>

(and similar changes to the next <td> if there is only one method).

Link to comment
Share on other sites

Hello,

I was curious to see how you make a product link to the ups module that ships in two boxes.

 

For example I am using the dimensions as well, i need to specify that one product ships in two boxes with two different weights adn dimensions so i can get an accurate quote.

 

Is that possible?

Link to comment
Share on other sites

For example I am using the dimensions as well, i need to specify that one product ships in two boxes with two different weights adn dimensions so i can get an accurate quote.

 

Is that possible?

Not really in a general way I think, but I suppose you can hard code it in the upsxml.php module. In the function quote($method = '') (around line 200) you will see (around line 211) that it receives the items with: $productsArray = $cart->get_products();

You could check the $productArray for the presence of that particular product and quantity and add your "second" boxes to the $productArray in the same quantity. I think that should work.

Link to comment
Share on other sites

Assigning a product to a box might not be the biggest problem, but how do you go from there? If you just assigned a large item to an oversize box, but it is only filled 2/3 you want a small item to go into that oversize box and not use another one... Bottom line: I think it might turn out more difficult than you would suspect on first glance.

 

Hi Jan,

 

Thanks for your reply, and I'm sorry for not responding sooner. I guess I may have a unusual situation from the average store. You see, I ship dried and preserved flowers and decorative items in that category. So, some items cannot ship together and I need to have 2 separate boxes for some orders that only have 2 items. So, I've taken care of the oversize items by making them only available in 5 packs, which seems to sell just as well and yeilds more money. But, for instance I need hydrangeas to go into one box while bamboo needs to go in another box.

 

But, the bigger problem is I'm having what seems like odd issues with box and product compatibilities.

John Wisdom

Link to comment
Share on other sites

I am not an expert coder, sorry any better example? Sorry :(
Reading a book on PHP might be a wise investment of your time :)

 

This would be an elaborate example in which a product with products_id 80 is split in two packages. For the sake of simplicity the size of the second box is the same as that of product 80 and price and weight is divided equally over the two boxes. Since the packing still has to occur we don't need to worry about quantity.

		$productsArray = $cart->get_products();
// BOF additional code for splitting products_id 80 in two boxes, second box ready-to-ship
$count_productsArray = count($productsArray);
for ($x = 0; $x < $count_productsArray; $x++) {
	if ($productsArray[$x]['id'] == '80') {
// add the second box with half the weight and price, but same dimensions to the productsArray
	$productsArray[] = array('id' => '80_2', 
	'price' => $productsArray[$x]['price']*0.5,
	'quantity' => $productsArray[$x]['quantity'],
	'weight' => $productsArray[$x]['weight']* 0.5,
	'length' => $productsArray[$x]['length'],
	'width' => $productsArray[$x]['width'],
	'height' => $productsArray[$x]['height'],
	'ready_to_ship' => '1',
	'final_price' => $productsArray[$x]['final_price']*0.5);
// next divide the weight and price of the first box in two (totals stay the same)
$productsArray[$x]['weight'] = $productsArray[$x]['weight']* 0.5;
$productsArray[$x]['price'] = $productsArray[$x]['price']* 0.5;
$productsArray[$x]['final_price'] = $productsArray[$x]['final_price']* 0.5;
	} // end if ($productsArray[$x]['id'] == '80')
} // end for ($x = 0; $x < $count_productsArray; $x++)
// EOF additional code splitting products_id 80 in two boxes

	if ($this->dimensions_support == '2') {

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