Jump to content
torinwalker

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

Share this post


Link to post
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 :)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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).

Share this post


Link to post
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)

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Does anyone know how to disable ups shipping if the weight is over 150lbs for one item ? Right now it just splits it into 2 boxes. I want to be able to disable ups the weight is to high.

Share this post


Link to post
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.

Share this post


Link to post
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?

Share this post


Link to post
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?

Share this post


Link to post
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;

Share this post


Link to post
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>

Share this post


Link to post
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.

Share this post


Link to post
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?

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
I have gone back thru all of the instructions.

Step 3? Perhaps you are troubled by something that should be fixed with NOTE2 in step 3.

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

×