Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New UPS XML Shipping Module available


Recommended Posts

Hard code the ZIP of our CA store?

 

We have two stores running on the same database. One store supplies from our NY location, the other through an affiliate in CA.

 

The CA store needs to get shipping quotes using the CA ZIP, of course, so I figured the fastest way would be to hard code the ZIP in the CA store. Is that wise? And where would I put it?

 

Peter

Link to comment
Share on other sites

Hard code the ZIP of our CA store?

 

We have two stores running on the same database. One store supplies from our NY location, the other through an affiliate in CA.

 

The CA store needs to get shipping quotes using the CA ZIP, of course, so I figured the fastest way would be to hard code the ZIP in the CA store. Is that wise? And where would I put it?

Actually, it is stored in the database when you edit the UPSXML module in admin (Origin Zip/Postal Code). In the shipping module upsxml you will find it back as $this->origin_postalcode (around line 56 and later in the $request). A little above that are other origin variables used in the requests. I guess you could hard code that without problem as long as you don't forget it :)

Link to comment
Share on other sites

  • 2 weeks later...

I have installed this contribution. It works great an d hats off to all those who have helped. My only problem is that I get 2 different rates. Everything is set as default like the instructions say. The one off my test website is lower in price when compared to the UPS website. Please advise.

Do or Do Not, there is no try.

Link to comment
Share on other sites

Best thing is to enable logging, as described in the comments of upsxml.php, and compare what is sent to and received from UPS to what you are seeing on the web site. If you have negotiated rates available and enabled, you'll see a lower price.

Link to comment
Share on other sites

Best thing is to enable logging, as described in the comments of upsxml.php, and compare what is sent to and received from UPS to what you are seeing on the web site. If you have negotiated rates available and enabled, you'll see a lower price.

 

 

Thank you, but I figured this problem out. It was my error. When checking on the UPS Site, I was checking Quick Time and Cost (Package) and not Detailed Time and Cost. Everything was and is currently working great. Thank you again.

Do or Do Not, there is no try.

Link to comment
Share on other sites

Hi,

 

I have an odd problem. Up to 59lbs the weight in the UPS price quotes looks right.

 

Above 59lbs the number of boxes increases in proportion but the listed weight continues to be always quoted as 59lbs in total, which is obvious nonsense.

 

Is it possible that this is the individual box weight rather than the total weight? If so, where should I look for an error?

 

Peter

Link to comment
Share on other sites

Hello,

 

This seem like an excellent contrib. I just have a question. I have a product in my cart that is 1lb., when I make it to the checkout_shipping page the UPS shipping module states:

(1 pkg x 4 lbs total)

is that normal? Why would I be getting a quote for 3lbs. over the weight of the product?

 

Any help that anyone could give would be greatly appreciated.

Link to comment
Share on other sites

Hello,

 

This seem like an excellent contrib. I just have a question. I have a product in my cart that is 1lb., when I make it to the checkout_shipping page the UPS shipping module states:

(1 pkg x 4 lbs total)

is that normal? Why would I be getting a quote for 3lbs. over the weight of the product?

 

Any help that anyone could give would be greatly appreciated.

 

The default tare (the empty weight of a package) is 3lbs. You can change that weight in Administration > Configuration > Shipping/Packaging.

Link to comment
Share on other sites

Is it possible that this is the individual box weight rather than the total weight? If so, where should I look for an error?

Looks like you're on to something.

The code (around line 314) uses: $shipping_weight.

However, if you look in the class shipping around line 60 it will say:

		if ($shipping_weight > SHIPPING_MAX_WEIGHT) { // Split into many boxes
	  $shipping_num_boxes = ceil($shipping_weight/SHIPPING_MAX_WEIGHT);
	  $shipping_weight = $shipping_weight/$shipping_num_boxes;
	}

So the code should most likely be (if you don't use dimensional support) instead of:

				$this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $shipping_num_boxes . ($this->boxCount > 1 ? ' pkg(s) x ' : ' pkg x ') . round($shipping_weight,0) . ' ' . strtolower($this->unit_weight) . ' total)');
		}

				$this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $shipping_num_boxes . ($this->boxCount > 1 ? ' pkg(s) x ' : ' pkg x ') . round($shipping_num_boxes * $shipping_weight,0) . ' ' . strtolower($this->unit_weight) . ' total)');
		}

(as used for the weight for time in transit around line 279).

Link to comment
Share on other sites

I do use dimensional support. Does that mean the code would be different?

Actually, the code is fine for both case but the "total" might be confusing. The weight is given per package (which using the dimensional support is an average of course). So a 54 pounds shipment divided over 3 packages would in both cases show:

(3 pkg(s) x 18 lbs total)

Link to comment
Share on other sites

Actually, the code is fine for both case but the "total" might be confusing. The weight is given per package (which using the dimensional support is an average of course). So a 54 pounds shipment divided over 3 packages would in both cases show:

(3 pkg(s) x 18 lbs total)

 

OK, that's going to confuse the heck out of our customers.

 

So I could either change the text to read "3 packages at approx 59lbs each" or somehow change the code.

 

The actual total weight would be better as our cardboard product is relatively heavy and a larger order would be cheaper by truck than by UPS.

Link to comment
Share on other sites

it would be neat if this module would take the shipping dimensions of a individual product and try to find the closest box sized match, ie from the Preformatted Packaging data dump

for UPS XML Rates contrib. then do the simple packing algorithm with adding as many products that can fit in that sized box then move on to whatever left over items that need to be packaged, then pass that info to the ups server. maybe with an option to disable.

any ideas.

Link to comment
Share on other sites

it would be neat if this module would take the shipping dimensions of a individual product and try to find the closest box sized match, ie from the Preformatted Packaging data dump

for UPS XML Rates contrib. then do the simple packing algorithm with adding as many products that can fit in that sized box then move on to whatever left over items that need to be packaged, then pass that info to the ups server. maybe with an option to disable.

any ideas.

No clue what you mean there. Is this different than what the current full dimensional support does?

Link to comment
Share on other sites

A funny request (for anyone in the right state of mind to find this funny).

 

I've been setting up two stores running from the same database but with different products for different markets. I have UPSXML working in both stores.

 

Now the boss has decided he wants to offer UPS in only one of the stores for now, but may change his mind again (he does that).

 

Is there a quick and easy fix for disabling UPS temporarily?

Link to comment
Share on other sites

A funny request (for anyone in the right state of mind to find this funny).

 

I've been setting up two stores running from the same database but with different products for different markets. I have UPSXML working in both stores.

 

Now the boss has decided he wants to offer UPS in only one of the stores for now, but may change his mind again (he does that).

 

Is there a quick and easy fix for disabling UPS temporarily?

Haven't tested this particular piece of code but SPPC is using something similar so in principle it should work.

One way of doing it would be to hard code it in includes/classes/shipping.php where the shipping modules are loaded:

	  if (defined('MODULE_SHIPPING_INSTALLED') && tep_not_null(MODULE_SHIPPING_INSTALLED)) {
	$this->modules = explode(';', MODULE_SHIPPING_INSTALLED);

Instead make sure upsxml.php is not added:

	  if (defined('MODULE_SHIPPING_INSTALLED') && tep_not_null(MODULE_SHIPPING_INSTALLED)) {
$installed_modules = explode(';', MODULE_SHIPPING_INSTALLED);
  for ($n = 0; $n < sizeof($installed_modules); $n++) {
	  // as long as one of the modules is not upsxml.php add it:
	  if ($installed_modules[$n] != 'upsxml.php') {
		  $shipment_array[] = $installed_modules[$n];
	  }
  } // end for loop
  $this->modules = $shipment_array;

Link to comment
Share on other sites

Haven't tested this particular piece of code but SPPC is using something similar so in principle it should work.

One way of doing it would be to hard code it in includes/classes/shipping.php where the shipping modules are loaded:

	  if (defined('MODULE_SHIPPING_INSTALLED') && tep_not_null(MODULE_SHIPPING_INSTALLED)) {
	$this->modules = explode(';', MODULE_SHIPPING_INSTALLED);

Instead make sure upsxml.php is not added:

	  if (defined('MODULE_SHIPPING_INSTALLED') && tep_not_null(MODULE_SHIPPING_INSTALLED)) {
$installed_modules = explode(';', MODULE_SHIPPING_INSTALLED);
  for ($n = 0; $n < sizeof($installed_modules); $n++) {
	  // as long as one of the modules is not upsxml.php add it:
	  if ($installed_modules[$n] != 'upsxml.php') {
		  $shipment_array[] = $installed_modules[$n];
	  }
  } // end for loop
  $this->modules = $shipment_array;

 

Great, thanks, I'll save that. For now UPS is back on... <sigh>

Link to comment
Share on other sites

I have this installed and it seems to be working fine, however even though I disabled everything in the admin shipping UPS but ground when a custom tries to check out they still get all the following.

 

Am I missing something?

 

UPS Ground

UPS 3 Day Select

UPS 2nd Day Air

UPS Next Day Air Saver

UPS Next Day Air

UPS Next Day Air Early A.M.

Link to comment
Share on other sites

I have this installed and it seems to be working fine, however even though I disabled everything in the admin shipping UPS but ground when a custom tries to check out they still get all the following.

 

Am I missing something?

My first assumption would be that you didn't install it right but don't see any errors echo'ed. Probaby when you go back to the admin you don't see a list of shipping options that are disabled?

 

Disallowed Shipping Methods

Standard, 3 Day Select

 

In the table configuration do you see an entry with configuration_key MODULE_SHIPPING_UPSXML_TYPES and a comma separated list like US_11, US_12?

Link to comment
Share on other sites

My first assumption would be that you didn't install it right but don't see any errors echo'ed. Probaby when you go back to the admin you don't see a list of shipping options that are disabled?

 

Disallowed Shipping Methods

Standard, 3 Day Select

 

In the table configuration do you see an entry with configuration_key MODULE_SHIPPING_UPSXML_TYPES and a comma separated list like US_11, US_12?

 

I see under Table: configuration

 

364 Disallowed Shipping Methods MODULE_SHIPPING_UPSXML_TYPES

 

And no when I go back into the admin there is nothing listed under:

Disallowed Shipping Methods

Link to comment
Share on other sites

I see under Table: configuration

 

364 Disallowed Shipping Methods MODULE_SHIPPING_UPSXML_TYPES

 

And no when I go back into the admin there is nothing listed under:

Disallowed Shipping Methods

So there are no disallowed shipping methods saved to the database. Check the install instructions again and see if you made the proper changes to a specific function.

Link to comment
Share on other sites

So there are no disallowed shipping methods saved to the database. Check the install instructions again and see if you made the proper changes to a specific function.

 

I have gone back thru all of the instructions. The was a brand new install of the version 1.3.5 and from the start everything saves but that. I can not find anywhere in the instructions that would change that part or allow the dis-allow to function.

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.
Note: Your post will require moderator approval before it will be visible.

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