Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

New UPS XML Shipping Module available


2342 replies to this topic

#2321 kymation

  • Community Sponsor
  • 5,663 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 29 June 2011, 18:15

You don't need to use a regex to replace a simple string. Try this:
      $value = str_replace (', --none--', '', $value);
Regards
Jim
My Addons

Banners Box 2.3.1 Support
Categories Accordion Box 2.3.1 Support
Categories Images Box 2.2x 2.3.1 Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.1 Support
Get 1 Free 2.2x Support
Include HTML and Text Boxes 2.2x
jQuery Banner Rotator 2.2x 2.3.1 Support
Modular Front Page 2.3.1 Support
Modular SEO Header Tags 2.3.1 Support
More Pics 2.2x Support
MVS 2.2x Support
osC Catalog 2.2x Support
PDF Datasheet 2.3.1 Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.1 Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.1 Support
Similar Products Box 2.2x
Theme Switcher 2.3.1 Support

#2322 Roaddoctor

  • Community Member
  • 643 posts
  • Real Name:David Jennings
  • Gender:Not Telling
  • Location:Texas

Posted 31 July 2011, 23:17

Recently installed 1.3.9.1 and dimensional support. Flawles install on a heavily modified shop. Great instructions - thank you.

In my situation I sell very heavy items. Two tweaks that I would like make, and would like to know if its possible to:

1. Have the UPS module self-disable itself once a certain weight in the cart is met? (which would then just leave my Freight RFQ module to pick up the freight issues)

2. Somehow by installing UPSXML I am no longer able to enter product weight over 999.99 pounds. I sell certain items that are 2000+ pounds, that need the correct weight to remain in the weight field (for freight mods to work right).

Any help with either is greatly appreciated.

Dave
-Dave

#2323 Roaddoctor

  • Community Member
  • 643 posts
  • Real Name:David Jennings
  • Gender:Not Telling
  • Location:Texas

Posted 01 August 2011, 13:19

and one more question... I have searched the forums extensively for this answer but no luck. It has been asked several times but no solution was ever mentioned...

How can we make the UPS XML look to the "Company Name" field to determmine if Commercial or Residential rates should be offered. This is standard behaivor in Fedex real time quotes. I've studied the FedEx code and understand, but have no idea where/how I would integrate that into UPS XML.

Thanks for the feedbacks.
-Dave

#2324 Roaddoctor

  • Community Member
  • 643 posts
  • Real Name:David Jennings
  • Gender:Not Telling
  • Location:Texas

Posted 01 August 2011, 13:58

Found this interesting post on the commercial/residential subject. Can anyone confirm the behaivor mentioned?
UPS XML Com vs. Res
If true, that would address the com/res issue for logged in customers, but would not help for pre-login quote requests such as popup shipping that only ask for a Zip Code...

On that note, I've just noticed that UPS XML rates are not passing to my version of popup_shipping.php, with this error:
110206: Missing/Illegal ShipTo/Address/StateProvinceCode

Do I need to place a 'dummy' city or state somewhere for the popup_shipping to work? or would the customer need to enter more than a Zip Code?

Thank you
-Dave

#2325 Roaddoctor

  • Community Member
  • 643 posts
  • Real Name:David Jennings
  • Gender:Not Telling
  • Location:Texas

Posted 02 August 2011, 02:09

View PostRoaddoctor, on 01 August 2011, 13:58, said:

Found this interesting post on the commercial/residential subject. Can anyone confirm the behaivor mentioned?
UPS XML Com vs. Res
If true, that would address the com/res issue for logged in customers, but would not help for pre-login quote requests such as popup shipping that only ask for a Zip Code...


So this works!
With the Quote Type setting to "Commercial" in the admin, UPS XML is now showing correct Residential rates to residential addresses...

Using UPS XML 1.3.9.1 on a RC2a shop

Backup! then open /includes/modules/shipping/upsxml.php

Around line 245, replace
        $this->_upsDest($order->delivery['city'], $state, $order->delivery['country']['iso_code_2'], $order->delivery['postcode']);
with
        $this->_upsDest($order->delivery['street_address'], $order->delivery['city'], $state, $order->delivery['country']['iso_code_2'], $order->delivery['postcode']);


Around line 446, replace
    function _upsDest($city, $stateprov, $country, $postal) {
with
    function _upsDest($street_address, $city, $stateprov, $country, $postal) {
        $this->_upsDestAddressLine1 = $street_address;


Around line 541, replace
        "           <Address>\n".
with
        "           <Address>\n".
        "               <AddressLine1>". $this->_upsDestAddressLine1 ."</AddressLine1>\n".

Thats it. Hopefully this will help others. If someone would kindly confirm the results I would be grateful.


If anyone can assit me with my popoup_shipping or weight capped at 999.99 issue I could use the help.
-Dave

#2326 kymation

  • Community Sponsor
  • 5,663 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 02 August 2011, 03:09

popoup_shipping: With your changes, the customer would have to enter city and state for UPS to work. A dummy would only work if the dummy values were valid for that zip code.

Weight cap: Have you checked the database field size?

Regards
Jim
My Addons

Banners Box 2.3.1 Support
Categories Accordion Box 2.3.1 Support
Categories Images Box 2.2x 2.3.1 Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.1 Support
Get 1 Free 2.2x Support
Include HTML and Text Boxes 2.2x
jQuery Banner Rotator 2.2x 2.3.1 Support
Modular Front Page 2.3.1 Support
Modular SEO Header Tags 2.3.1 Support
More Pics 2.2x Support
MVS 2.2x Support
osC Catalog 2.2x Support
PDF Datasheet 2.3.1 Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.1 Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.1 Support
Similar Products Box 2.2x
Theme Switcher 2.3.1 Support

#2327 Roaddoctor

  • Community Member
  • 643 posts
  • Real Name:David Jennings
  • Gender:Not Telling
  • Location:Texas

Posted 02 August 2011, 04:54

View Postkymation, on 02 August 2011, 03:09, said:

popoup_shipping: With your changes, the customer would have to enter city and state for UPS to work. A dummy would only work if the dummy values were valid for that zip code.

Weight cap: Have you checked the database field size?

Regards
Jim

Thank you for the reply.

In the products table it reads: products_weight decimal(5,2) No None 0.00
Does that mean 99999.99 max?
After installing upsxml, any item in my shop heavier than 1000 lbs. now has 999.99 and can't be set higher.
I scanned the two upsxml .sql files, and the dimensional file has: " package_max_weight DECIMAL(6,2) DEFAULT '50' NOT NULL, " but I don’t know if that’s relevant.


as for popup_shipping I would sure like to ditch that (hate popping up) in favor of a more graceful shopping_cart "on-page" that would work with upsxml and fedex web services. Can you suggest any particular contribution for that? The Estimated Shipping 1.7a is what I am using and would require some rework as you noted.


I'm also trying to have upsxml disable itself once a certain weight (and/or box count) is met. Below is the code from FedEx RTQ that accomplished this with some in-admin settings. Could you help me adapt something similar to upsxml? Or is there and easier way perhaps?

      if ((MODULE_SHIPPING_FEDEX1_MAX_WEIGHT != 'NONE' && MODULE_SHIPPING_FEDEX1_MAX_WEIGHT != '' && $this->cart_weight > MODULE_SHIPPING_FEDEX1_MAX_WEIGHT) || (MODULE_SHIPPING_FEDEX1_MAX_QUANTITY_OF_SHIP_BOXES != 'NONE' && MODULE_SHIPPING_FEDEX1_MAX_QUANTITY_OF_SHIP_BOXES != '' && $this->cart_shipping_num_boxes > MODULE_SHIPPING_FEDEX1_MAX_QUANTITY_OF_SHIP_BOXES))
        return false;

-Dave

#2328 kymation

  • Community Sponsor
  • 5,663 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 02 August 2011, 05:13

decimal(5,2) means five digits total, two after the decimal point, which is 999.99. Increase that as needed to hold your maximum weight.

package_max_weight should be set to the heaviest single package that you want to ship UPS. Any weight over this will be divided into multiple packages of equal weight and the shipping quote will be based on those packages.

I use MVS to separate products into classes for different shipping methods. If you just want to disable the UPS module above a certain weight, the code you posted inserted into the check() method should work. Note that this will disable the module if the customer orders a quantity of products that add up to more than your limit, even if the order could be broken into multiple packages and shipped UPS. The resulting freight quote will usually be more expensive, and that can cost you sales.

Regards
Jim
My Addons

Banners Box 2.3.1 Support
Categories Accordion Box 2.3.1 Support
Categories Images Box 2.2x 2.3.1 Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.1 Support
Get 1 Free 2.2x Support
Include HTML and Text Boxes 2.2x
jQuery Banner Rotator 2.2x 2.3.1 Support
Modular Front Page 2.3.1 Support
Modular SEO Header Tags 2.3.1 Support
More Pics 2.2x Support
MVS 2.2x Support
osC Catalog 2.2x Support
PDF Datasheet 2.3.1 Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.1 Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.1 Support
Similar Products Box 2.2x
Theme Switcher 2.3.1 Support

#2329 PennyP

  • Community Member
  • 14 posts
  • Real Name:Penny
  • Gender:Female
  • Location:Georgia, USA

Posted 25 August 2011, 22:08

I've installed this module as instructed and the only problem I'm having is that ONLY Ground is showing up in the cart. None of the other UPS Methods, i.e. Next Day Air, 2nd Day Air. Does anyone know why this is an issue?
Live simply, love generously, care deeply, and speak kindly...

#2330 graysonhobby

  • Community Member
  • 158 posts
  • Real Name:Grayson

Posted 29 August 2011, 01:32

Is there a way for me to display a shipping estimator box while using this add-on? I get asked 3-5 times a week about shipping cost and I see many other websites have a separate box to estimate my shipping by a simple entry of zip code without having to create / login in to an account

Thanks

#2331 jnillaw

  • Community Member
  • 23 posts
  • Real Name:Janice Wallin

Posted 03 September 2011, 23:42

I can't seem to get the module to work and don't know where to look to fix. this is what it says in checkout
United Parcel Service [img]http://foxfireherbals.com/oscommerce2/catalog/images/icons/shipping_ups.gif[/img] [img]http://foxfireherbals.com/oscommerce2/catalog/images/pixel_trans.gif[/img] [img]http://foxfireherbals.com/oscommerce2/catalog/images/pixel_trans.gif[/img] :
If you prefer to use UPS as your shipping method, please contact Foxfire Herbals Store via Email.

#2332 graysonhobby

  • Community Member
  • 158 posts
  • Real Name:Grayson

Posted 04 September 2011, 21:56

Anyone else site stop working recently? Im getting a

Error from cURL: Error [7]: couldn't connect to host experienced by customer with id 12 on 2011-09-04 15:53:40
United Parcel Service: :
If you prefer to use UPS as your shipping method, please contact Grayson Hobby via Email

Edited by graysonhobby, 04 September 2011, 21:56.


#2333 graysonhobby

  • Community Member
  • 158 posts
  • Real Name:Grayson

Posted 04 September 2011, 21:59

View Postjnillaw, on 03 September 2011, 23:42, said:

I can't seem to get the module to work and don't know where to look to fix. this is what it says in checkout
United Parcel Service [img]http://foxfireherbals.com/oscommerce2/catalog/images/icons/shipping_ups.gif[/img] [img]http://foxfireherbals.com/oscommerce2/catalog/images/pixel_trans.gif[/img] [img]http://foxfireherbals.com/oscommerce2/catalog/images/pixel_trans.gif[/img] :
If you prefer to use UPS as your shipping method, please contact Foxfire Herbals Store via Email.


Also, when I click the "CHECK OUT" my site takes forever...Im thinking its a UPS issue?

#2334 cgchris99

  • Community Member
  • 802 posts
  • Real Name:Chris

Posted 23 September 2011, 22:25

Quote

Error from cURL: Error [7]: couldn't connect to host experienced by customer with id 12 on 2011-09-04 15:53:40

Yep, I'm having the same problem. I'm going to try upgrading to the latest version tonight and see if it solves the problem.

Edited by cgchris99, 23 September 2011, 22:26.


#2335 netstep

  • Community Member
  • 114 posts
  • Real Name:Sam NetStep
  • Location:Washington State, USA

Posted 26 October 2011, 22:15

Problem: No UPS rates shown if customer enters an address the module doesn't like.

If perfect address = show rates.
However, customers are entering whatever address syntax they typically do, and no rates appear....the module doesn't appear at all.

This has resulted in several orders coming in with no shipping charge.
Our sales reps are ripping me a new one, my boss is PISSED and our company controller is throwing fits.
ANY suggestions or help will be welcome.

Problem started when I upgraded
from v1.2.6 2007/02/02
to v 1.3.7 2009/08/27

...no idea how I got 1.3.7....when v1.3.9.2 is available....I'll push that update and see if it solves the problem.
If you've got any additional suggestions I'm all ears.

OSC v2.2

Edited by netstep, 26 October 2011, 22:21.

Sam M. - Seattle

#2336 netstep

  • Community Member
  • 114 posts
  • Real Name:Sam NetStep
  • Location:Washington State, USA

Posted 27 October 2011, 09:14

I truly hope someone can help shed some light on this.
If there is any irregularity in the address, the UPS module fails to display.
I've enabled error reporting...it's logging the successes, but not the errors.
Sam M. - Seattle

#2337 netstep

  • Community Member
  • 114 posts
  • Real Name:Sam NetStep
  • Location:Washington State, USA

Posted 27 October 2011, 10:27

I was obviously incorrect when I thought it was choking on the address....because it only checks down to the zip code/zone level.
When I switch between addresses, both with valid City, state,zip...one works perfectly and the other eliminates the UPSXML module completely. I don't get it.....
Sam M. - Seattle

#2338 netstep

  • Community Member
  • 114 posts
  • Real Name:Sam NetStep
  • Location:Washington State, USA

Posted 27 October 2011, 11:12

I'M SUCH A TOOL....When I upgraded my test site I uninstalled and reinstalled = loaded new config vars.
However, when I put it into production I just updated the files.
...rookie move...I wish I could delete the last three posts.

Appears to be working fine. Shipping zone config var was messed up.
Sam M. - Seattle

#2339 VAthletics

  • Community Member
  • 9 posts
  • Real Name:Jim

Posted 26 March 2012, 14:39

What would be causing this to not show up during checkout?

The UPS add-on is installed and I am able to edit the options in my shipping module in my admin portal, but when I go to check out there are no shipping options and it just skips to payment.

#2340 GoTTi

  • Community Member
  • 438 posts
  • Real Name:GoTTi

Posted 12 April 2012, 18:32

what are the file edits for this? i dont want to overwrite files. thanks.