Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New UPS XML Shipping Module available


Recommended Posts

Look at "How do I get a developers key?" on this page http://www.ups.com/content/us/en/resources...oper%27s+Key%3F.

Or just google ups developer key and there will be instructions. First you have to register at UPS then they pretty much hand it to you. If you have problems past that I would recommend calling UPS.

Thanks. I had already read that FAQ, but still had trouble finding the right page. I called UPS and they wouldn't talk to me on the phone about it. They said to use their contact form. I did and I eventually got an answer. The following 19-step procedure from UPS tech support will net a developer key and an access key. Step #2 is the key. If you don't start on that page you won't find the key. (Sounds like an old computer game I used to play.) I also learned if you use the "contact us" page and choose "tech support" your ticket does not go directly to tech support. You're supposed to request online tool tech support at www.ups.com/e_comm_access/toolsupport

 

Procedure to get developer and access keys:

 

1. Open your desired Internet browser.

 

2. Access the UPS web site at http://www.ups.com/onlinetools.

 

3. Click on the [Register] button, located to the right of the screen.

 

4. In the “Complete Information for My UPS Registration” box, enter your name, e-mail, User ID and Password. Click on [Next].

 

5. Once you have read through and understood the "UPS Terms and Conditions" page, click on the [Accept ->] button.

 

6. Fill in the fields on the "UPS: Registration" screen under "Complete Form for My UPS Registration". All fields labeled in bold print are required. All other fields are optional. To receive notices of future releases of OnLine Tools, select [Yes] to receive notices. UPS respects your privacy and will not send unsolicited emails to you.

 

7. Click on the [submit] button at the bottom of the window.

 

8. Once registered for My UPS, click on the [business Solutions] tab.

 

9. Under the “Business Technology Solutions” section, click on [uPS OnLine Tools].

 

10. On the “UPS OnLine Tools” page, click on [Get OnLine Tools].

 

11. In the gray box for “Standard Tools,” select the specific tool you would like.

 

12. The next screen looks like a registration screen; however, it is actually looking for additional information including your UPS account number. Once the information is entered and verified, click on the [submit] button at the bottom of the window.

 

13. In the gray box on the next webpage, you will be given your confirmation of the standard tools you have successfully registered for. Your Developer’s Key will be e-mailed to you in just a few moments, so please leave this screen open and monitor your e-mail until you receive the Developer’s Key.

 

14. Once you receive the Developer’s Key in the e-mail, copy it and click on the standard tool that most applies to you.

 

15. On the next webpage, you can request your Access Key. Click on [Get Access Key] on the right side of the screen.

 

16. Select the type of Access Key you desire, “XML” or “HTML.” If you are going to use a shopping cart, you will probably want to select XML Access Key unless otherwise directed by the shopping cart vendor.

 

17. Enter your Developer’s Key and click on [submit].

 

18. Once again, verify that all the information in the bold type fields is accurate and complete on the “Provide Additional Information” page and click on [submit].

 

19. Your Access Key will appear on the screen. It will also be sent to the default e-mail address in your UPS.com profile.

Link to comment
Share on other sites

Thanks. I had already read that FAQ, but still had trouble finding the right page. I called UPS and they wouldn't talk to me on the phone about it. They said to use their contact form. I did and I eventually got an answer. The following 19-step procedure from UPS tech support will net a developer key and an access key. Step #2 is the key. If you don't start on that page you won't find the key. (Sounds like an old computer game I used to play.) I also learned if you use the "contact us" page and choose "tech support" your ticket does not go directly to tech support. You're supposed to request online tool tech support at www.ups.com/e_comm_access/toolsupport

 

I'm glad you found what you were looking for. Some of these things that seem simple can end up becoming frustrating fast. :)

 

 

I'm still working on getting free or cheap shipping for just one category. So, far I have tried this contribution: http://www.oscommerce.com/community/contri...h,free+shipping

 

with no success. Any help would be greatly appreciated!

Link to comment
Share on other sites

Bill,

 

How much is the real UPS charge for shipping that envelope?

 

Check your tare weight under Admin/configuration/shipping and that might be your problem. Dimensional support is well worth the time to set it up and makes this module perfect for UPS shipping.

 

You can also look for a contribution called "Shipping Per Product", which simply lets you set a flat price per item on the items you choose.

John Wisdom

Link to comment
Share on other sites

Bill,

 

How much is the real UPS charge for shipping that envelope?

 

Check your tare weight under Admin/configuration/shipping and that might be your problem. Dimensional support is well worth the time to set it up and makes this module perfect for UPS shipping.

 

You can also look for a contribution called "Shipping Per Product", which simply lets you set a flat price per item on the items you choose.

 

 

Thanks for posting John. The cheapest quote I can get on UPS's site for shipping an envelope is $8.00, however I might be doing something wrong. Since this product is a greeting card I would probably just run it to USPS and it would probably cost under a dollar to ship (however the rest of my items would still go out ups). I'm guessing that dimensional support will not allow me to go down to this price...

 

I currently have my tare weight set to 0.

 

I don't think shipping per product will work for me as I want to use the UPS XML on all products except these greeting cards, where I need much cheaper, or free shipping, it would be nice if the system gave free shipping for a weight of 0. If anyone has any ideas please let me know. Thanks!

Edited by pulp2
Link to comment
Share on other sites

I meant you should check the UPS website and see what it shows for a cost there and then it gives you an idea of how far off you are. UPS charges get down to about $6 for a box. You can also activate the log in this module and you can see what you are sending UPS. I don't think UPS is a good option for this though.

 

Just use the individual shipping price for the cards and it will defer to UPS XML for everything else. So, the only time this will show is when someone is buying cards. I'm not sure what it will do if there have multiple items though. I'm assuming you have looked through all the contribution available for shipping.

 

Do you think you'll sell a lot of greeting cards on your site?

John Wisdom

Link to comment
Share on other sites

Just use the individual shipping price for the cards and it will defer to UPS XML for everything else. So, the only time this will show is when someone is buying cards. I'm not sure what it will do if there have multiple items though. I'm assuming you have looked through all the contribution available for shipping.

 

I went to admin->modules->shipping->per item and can't see the option on how to set this for only certain items and exclude other items. Would you mind walking me through this? This could work perfect if like you said it works if they add multiple items to the cart.

 

I have looked through all the contributions and have tried installing a couple including this one: http://www.oscommerce.com/community/contri...h,free+shipping

 

 

Do you think you'll sell a lot of greeting cards on your site?

 

I think I will sell a couple of greeting cards a week and recently I have found a new product about the size and weight of the greeting card which I think I am going to have the same problem with. arg

Edited by pulp2
Link to comment
Share on other sites

Actually, I was thinking of Individual shipping price, but this isn't going to work because if they have another item in the cart it doesn't charge correct shipping. Sorry about that.

 

You might want to consider this as an add on item when someone is buying multiple items.

John Wisdom

Link to comment
Share on other sites

I think I will sell a couple of greeting cards a week and recently I have found a new product about the size and weight of the greeting card which I think I am going to have the same problem with. arg

The only (relatively easy IMO) solution would be to load only USPS as a shipping option when those greeting cards or that particular small product are in the shopping cart and load only UPS as a shipping option in any other case.

 

Below is a piece of code someone used to trigger loading only UPS if the cart contained products over a certain length. You can build the array of products that should trigger USPS only in different ways (like reading it from a text file you upload to the server) but this is the general idea (the code is in the file: /includes/classes/shipping.php).

 

  class shipping {
var $modules;

// class constructor
function shipping($module = '') {
		// BOF changes for not loading certain shipping options
  global $language, $PHP_SELF, $cart;
		// put product id's to trigger UPS only shipping in an array (all products of 1.5 m and longer)
		$lange_producten_query = tep_db_query("select products_id, products_length from " . TABLE_PRODUCTS . " where products_length >= 1.5");
		while ($lange_producten = tep_db_fetch_array($lange_producten_query)) {
			$products_ids_ups_only[] = $lange_producten['products_id'];
		}

		$trigger_ups_only = 0;
		$product_ids_in_cart_array = explode(',', $cart->get_product_id_list());

		if (is_array($products_ids_ups_only)) {
			foreach ($product_ids_in_cart_array as $key => $prods_id) {
				if (in_array((int)$prods_id, $products_ids_ups_only)) {
					$trigger_ups_only = 1;
				}
			}
		} // end if (is_array($products_ids_ups_only))

  if (defined('MODULE_SHIPPING_INSTALLED') && tep_not_null(MODULE_SHIPPING_INSTALLED)) {
			if ($trigger_ups_only == 1) {
				// only add upsxml.php and store pickup to the array
				$this->modules = array('upsxml.php');
			} else {
	$this->modules = explode(';', MODULE_SHIPPING_INSTALLED);
			}
			// EOF changes for not loading certain shipping options

	$include_modules = array();

Link to comment
Share on other sites

I'm looking for a good contribution which allows users to track ups packages through my site, and is compatible with the UPS XML shipping module. I found this in the contributions: http://www.oscommerce.com/community/contri...ch,ups+tracking

but noticed it hasn't been updated since 2004. Has anyone used this or any other contribution that have worked for them?

Link to comment
Share on other sites

I am having a hard time getting a developers key to get an access key. I registered for an account but it keeps wanting me to give them credit card information is this correct? Did anyone else have to offer credit card to get this. I don't remember doing this in the past?

 

-Thanks

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

I entered a new post for this question - however I thought I might get more information here. Please forgive if it has been discussed before, I am not searching on the correct terms if it has. ;)

 

After thinking about it, I thought the best option might be to assign products to certain packages. I am not sure how difficult that would be to merge into the current module... any ideas??

 

Thanks in advance!!

 

I am needing to change the algorithm that assigns products to boxes. I have mostly large items, that ship in large boxes - if not they are ready to ship.

 

I am thinking my best option is to tell the algorithm to use the smallest box available - this way it does not use my oversize shipment boxes. But I am not really sure how to change it. I found the code I should change (i think) - but not sure what to change it to... so if anyone can help it will be greatly appreciated!

 

function fitProductsInBox($productsRemaining, $emptyBox, $packedBoxesArray, $box_no, $index_of_largest_box) { 
       $currentBox = $emptyBox;
       $productsRemainingSkipped = array();
       $productsRemainingNotSkipped = array();
       $largest_box_in_skipped_products = -1;
       // keep apart products that will not fit this box anyway
       for ($p = 0; $p < count($productsRemaining); $p++) {
         if ($productsRemaining[$p]['largest_box_it_will_fit'] < $box_no) {
           $productsRemainingSkipped[] = $productsRemaining[$p];
           // check on skipped products: if they will not fit in the largest box
           // the $index_of_largest_box should be the one they *will* fit
           // otherwise the packing algorithm gets stuck in a loop
           if ($productsRemaining[$p]['largest_box_it_will_fit'] > $largest_box_in_skipped_products) {
             $largest_box_in_skipped_products = $productsRemaining[$p]['largest_box_it_will_fit'];
           }
         } else {
           $productsRemainingNotSkipped[] = $productsRemaining[$p];
         }
       }

Kristine

Link to comment
Share on other sites

After thinking about it, I thought the best option might be to assign products to certain packages. I am not sure how difficult that would be to merge into the current module... any ideas??

Actually, that is not that easy to do. It would mean you should make the module use only (a) certain package(s) for a product and also add code to tell the module it would be OK to add other products to that box (or not if it is a highly specific packaging for certain products).

 

So, although I'm sure it can be coded in the end, it is not a walk in the park.

Link to comment
Share on other sites

Actually, that is not that easy to do. It would mean you should make the module use only (a) certain package(s) for a product and also add code to tell the module it would be OK to add other products to that box (or not if it is a highly specific packaging for certain products).

 

So, although I'm sure it can be coded in the end, it is not a walk in the park.

 

What about switching the fit into largest package, to fit in smallest package? That would at least get me going for now, while I work on the coding for the other.

 

Is there a simple change to change that part?

Kristine

Link to comment
Share on other sites

Actually, that is not that easy to do. It would mean you should make the module use only (a) certain package(s) for a product and also add code to tell the module it would be OK to add other products to that box (or not if it is a highly specific packaging for certain products).

 

So, although I'm sure it can be coded in the end, it is not a walk in the park.

 

Another thing I was thinking about - At first I thought if I assigned the larger packaging a large cost it would use the lower cost package first. Maybe there is a simple code to say if a less expensive box is available us it? Just an idea - l really need the shipping nailed down asap.

 

Thanks

Kristine

Link to comment
Share on other sites

Another thing I was thinking about - At first I thought if I assigned the larger packaging a large cost it would use the lower cost package first. Maybe there is a simple code to say if a less expensive box is available us it?

The code doesn't use the cost, just not possible. The boxes are sorted according to volume, from smallest to largest to make sure that the smallest possible box is used and also the smallest number of boxes.

 

I don't think there is a quick solution to your problem. Although the code in upsxml.php does something that looks a bit like it in function packProducts($productsArray) (about halfway down the file upsxml.php):

			// sanity checks on the product, no need for ready-to-ship items
		if ((int)$product['ready_to_ship'] == 0) {
	   //  if ($product['ready_to_ship'] == '0') {
					  $product['ready_to_ship'] = '1';
					  for ($x = 0; $x <= $index_of_largest_box; $x++) {
						  if ($this->fitsInBox($product, $emptyBoxesArray[$x])) {
			  $product['ready_to_ship'] = '0';
			  $product['largest_box_it_will_fit'] = $x;
			} 
					  } // end for ($x = 0; $x <= $index_of_largest_box; $x++) 
		} // end if ($product['ready_to_ship'] == '0')

Link to comment
Share on other sites

How can I get an Developers Key so I can get an access key? I have registered and then it asks me to add an account and asks for a credit card. Is this normal, shouldn't this be free?

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

How can I get an Developers Key so I can get an access key? I have registered and then it asks me to add an account and asks for a credit card. Is this normal, shouldn't this be free?

It is free yes, if you have an account with UPS. If not, then you have a problem. But why would you offer UPS shipping if you don't have a shipping account with them?

The access key is from your account with UPS. The key to ask for next is the developers key.

Link to comment
Share on other sites

I drop ship everything I don't have stock so don't need a shipping account so I am not actually doing any of the shipping.

 

I registered with them but I don't have an account number. I don't remember it being this hard to get an account.

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

The code doesn't use the cost, just not possible. The boxes are sorted according to volume, from smallest to largest to make sure that the smallest possible box is used and also the smallest number of boxes.

 

If the cost is not used, why is it added to the package table (package.package_cost)?

 

I can't find it now, but I was certain I read somewhere that the package_cost did have some effect on the box used.... anyone have any information about this?

 

Also, if you could help me pinpoint which part of the code specifies the smalles number of boxes - If I can remove it, that would at least get me going for now.

 

Thanks,

Kristine

Kristine

Link to comment
Share on other sites

Hola! I got the contrib installed, and working in a basic form. However, one major hurdle remains. I want to use the dimensional shipping. However, not only do our products change weight by attribute (which I think can be solved by adding a contrib about weight with attributes, although it'll be interesting to see how that combines with all the other attribute mods I have), but also size. (We sell pictures, which might be as-is, or matted, or framed, and come in different sizes). Has anyone tried to do this? Basically, we have three different boxes we've been told by UPS to use, depending on the size of the print, the framing, etc...

 

Thank you!

Link to comment
Share on other sites

I want to use the dimensional shipping. However, not only do our products change weight by attribute (which I think can be solved by adding a contrib about weight with attributes, although it'll be interesting to see how that combines with all the other attribute mods I have), but also size. (We sell pictures, which might be as-is, or matted, or framed, and come in different sizes). Has anyone tried to do this? Basically, we have three different boxes we've been told by UPS to use, depending on the size of the print, the framing, etc...

The attribute weight change is not a problem (adding code to the function get_products in the class shopping_cart I recollect) however size is.

You would need to store that in a table somewhere. I suggest using the above mentioned get_products call (which is used in upsxml), copy and rename and add your own logic to it to get the size info from the new table.

Link to comment
Share on other sites

  • 2 weeks later...

I have somewhat of an odd question, i think.

 

90% of the products I offer have FREE ground shipping via UPS, 10% obviously dont.

 

I use UPS XML to get the rates from UPS for ground, next day, 2nd day, 3day, etc.. but I want to subtract the weight of the products I have earmarked in the database from just ground.

 

 

Where in the code would I do this? I am proficient in PHP and mySQL, I am just not sure where to look.

 

Thanks.

Link to comment
Share on other sites

I use UPS XML to get the rates from UPS for ground, next day, 2nd day, 3day, etc.. but I want to subtract the weight of the products I have earmarked in the database from just ground.

Where in the code would I do this? I am proficient in PHP and mySQL, I am just not sure where to look.

That's a fair amount of work. You would have to do two requests for rates (around line 340):

$upsQuote = $this->_upsGetQuote();

Apart from the one that is in the upsxml.php shipping module you would have to make your own that does a rate request for ground shipping only and with the lower weight. The ground rate you would get there would have to be added to the shipping quotes (and not use the ground quote from the standard upsxml one).

Link to comment
Share on other sites

The attribute weight change is not a problem (adding code to the function get_products in the class shopping_cart I recollect) however size is.

You would need to store that in a table somewhere. I suggest using the above mentioned get_products call (which is used in upsxml), copy and rename and add your own logic to it to get the size info from the new table.

 

Hi Jan;

 

Thanks! I'll give it a try. Just thought I'd check and make sure no one had done this, to keep from reinventing the wheel.

Link to comment
Share on other sites

That's a fair amount of work. You would have to do two requests for rates (around line 340):

$upsQuote = $this->_upsGetQuote();

Apart from the one that is in the upsxml.php shipping module you would have to make your own that does a rate request for ground shipping only and with the lower weight. The ground rate you would get there would have to be added to the shipping quotes (and not use the ground quote from the standard upsxml one).

 

 

 

Hello,

 

Yes I saw that var earlier, my question is as follows:

 

Where can I get the list of products_id's in upsxml.php? I've tried outputting the values for $order and $cart and neither seem to carry id's in them. If I had a list of ID's i could easily do what I want.. I already have a 2nd isntance of just ups installed just for ground shipping getting ready for this.

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