Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UPS Integration

Status
Not open for further replies.

csiwa28

Programmer
Apr 12, 2001
177
Has anyone successfully been able to integrate real-time UPS rates and services selection into an e-commerce site. I wanna be able to give customers the correct shipping prices for different shipping methods depending how much is in their cart. I have no clue where to begin. UPS has documentation for a HTML version that can only be used as is, and they have an XML version for use with b-to-b sites, but I don't know XML. Any help will be greatly appreciated. Thank You.
 
Getting that type of data from UPS on the fly is going to require some sort of communication, and in this case b-to-b is what you are doing. You could get all the data and store it in a small text file, but then your rates would run into the problem of possibly being incorrect if UPS changes and you don't notice.

XML is not to difficult, it is merely a method of storing the data in a more easy to read/use format. You don't even need to necessarilly use the XML objects provided by MS to send or receive data. The XMLHTTP object allows you to post a GET to a specific URL and receive a reply. This reply is not checked for proper XML and will return the data to you in a string (objXMLHTTP.ResponseText). Since the data will be coming back in XML from UPS using their standardized structure you could simply pull the data back out with a combination of InStr's and mids (use InStr to find specific start and end tag, use mid to get the contents).

If you do a search on yahoo in this forum there was an example using XMLHTTP not to long ago to steal the temperature from yahoo pages. Note: unfortunatly yahoo wised up to this and started putting random comments near the temperatures, making this example less than effective. A search on XMLHTTP should yield a few differant examples for you.

-Tarwn --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
For my next trick I will pull a hat out of a rabbit (if you think thats bad you should see how the pigeon feels...) :p
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top