|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi all,
A client of mine is complaining that the rates that are returned by UPS are wrong and I can find nothing wrong with the code. Due to my client's refusal to purchase a security certificate, I had to set this up using the HTML version of the tool rather than the XML version which, according to the documentation, requires an SSL. The data is sent via an HTTP post with ASP. He claims that he is losing sales due to the shipping rates which are supposedly too high . I personally believe it is due to the lack of an SSL even though the credit card from is hosted by Authorize.net. Anyways, it is currently set to retrieve residential rates. When it is set to commercial, my client complains that the rates are too low. The rates are off only by a few dollars in each instance. I've checked a few of his orders against the UPS Web site and the rates he says they should be. Although the UPS Web site returns rates that are higher then what the client says they should be, those rates are still lower then what is returned by the UPS Rates & Services tool. Could somebody take a look at the code below and let me know if you notice anything that could be causing the rates to be "wrong"? <% const Request_POST = 1 const Request_GET = 2 response.buffer = true dim objXMLHTTP, xml ' Create an xmlhttp object: set xml = Server.CreateObject("Microsoft.XMLHTTP") reDim shipmentArray(10,2) shipmentIndex = 0 ' Get the data from UPS for z=0 to 2 ' Set service type select case z case 0 ServiceType="GND" shipmentArray(shipmentIndex,1) = "Ground" case 1 ServiceType="1DA" shipmentArray(shipmentIndex,1) = "Next Day Air" case 2 ServiceType="2DA" shipmentArray(shipmentIndex,1) = "2nd Day Air" end select shippingdata = "?accept_UPS_license_agreement=yes" shippingdata = shippingdata & "&10_action=3" shippingdata = shippingdata & "&13_product=" & ServiceType shippingdata = shippingdata & "&origCity=Highland" shippingdata = shippingdata & "&14_origCountry=US" shippingdata = shippingdata & "&15_origPostal=12528" shippingdata = shippingdata & "&19_destPostal=" & ord_shipping_postal shippingdata = shippingdata & "&20_destCity=" & ord_shipping_city shippingdata = shippingdata & "&22_destCountry=US" shippingdata = shippingdata & "&23_weight=" & WeightTotal shippingdata = shippingdata & "&weightstd=lbs" shippingdata = shippingdata & "&24_value=" & ord_subtotal shippingdata = shippingdata & "&34_handling=1" shippingdata = shippingdata & "&47_rate_chart=Regular Daily Pickup" shippingdata = shippingdata & "&48_container=00" shippingdata = shippingdata & "&49_residential=1" on error resume next 'Open the connection to the UPS server. xml.Open "GET", "http://www.ups.com/using/services/rave/qcostcgi.cgi?"&shippingdata, False xml.Send strRetval=xml.responseText if err.number <> 0 then if err.number >= 400 Then response.write "Error Retrieving Shipping Costs from UPS: "&Err.Number else response.redirect "Error Retrieving Shipping Costs from UPS, component/WinInet error: "&Err.Description end if response.end end If response.write "<!-- " & strRetval & " -->" & vbcrlf UPSarray = split(strRetval,"%") 'If no fee is returned, insert a default fee if UPSarray(10) = "" or UPSarray(10) = "0" or UPSarray(10) = "0.0" then UPSarray(10) = 20 end if shipmentArray(shipmentIndex,0) = Cdbl(UPSarray(10)) shipmentIndex = shipmentIndex + 1 next 'Insert a generic fee if no service is available if shipmentIndex = 0 then shipmentArray(shipmentIndex,0) = 20 shipmentArray(shipmentIndex,1) = "UPS Ground" shipmentIndex = shipmentIndex + 1 end if %> <select name="shipmentString"> <% for f=0 to shipmentIndex - 1 %> <option value="<%= shipmentArray(f,0) & "|" & shipmentArray(f,1) %>"><%= shipmentArray(f,1) & " - " & FormatCurrency(shipmentArray(f,0)) %></option> <% next %> </select> Thanks, |
|
|||
|
Dubbya,
Thanks for the reply. The originating shipping address is correct. I believe my client uses UPS packaging which, according to the documentation, means that the dimensions are not required fields. As far as I know, the weights themselves are accurate but my client entered all of that data so I can't be certain. My client is using an Excel spreadsheet to calculate the rates manually and to compare them to the rates generated on his Web site. His rates are off as compared to the UPS Web site itself. For example, he claims one order should have cost less then $9 in shipping costs. But, when I plug in the information on the UPS Web site, it returns $11+ for shipping. So, I do believe he is either calculating wrong or is using old information in his Excel document. However, the rates calculated on the UPS Web site are still lower then what is generated on my clients Web site. I was able to fine tune it a bit so that the prices are now more in line. I made sure handling was turned on and it is set to receive commercial rates. The rates now appear to be off by $1, give or take a few cents. What is weird is that ground shipping rates seem to be the rates that are most off. 2nd Day Air and Next Day Air are only off by a matter of $.50 or less. Another oddity is that the unmodified sample code that UPS provides in their PDF for the HTML version, which is basically HTML code for a form, returns different rates as well. If I remember correctly, these rates are different from the UPS Web site, my clients Web site and my clients manual calculations. I would much rather switch over to the XML version as it offers more flexibility and I would assume that this is the same functionality used on the UPS site. But, my client refuses to purchase a security certificate. So, I don't know how much more assistance I can give him until he decides to stop being cheap - which I believe is what is causing him to lose sales and not the shipping rates. |
|
|||
|
UPS also sometimes applies discounts for certain shippers, and you would need to sign in to get those discounts......perhaps he's expecting those
__________________
There is a time for every purpose under heaven. ![]() http://www.expresspools.com http://www.sjvwd.com |
|
|||
|
We had this problem.
You really need to code the parameters exactly what they should be. Don't assume any defaults - it's just as easy to hard code the parameters. Code all of them. If this keeps up, just apply a percentage or monetary amount to the total to get it closer to what your client thinks it should be. Also, contact UPS for help. They'll review your code.
__________________
Advertising without research is like shooting an arrow into the air and then looking up for a target to catch it with. |
|
|||
|
Quote:
Why would your client want you to cobble something together that is 1) not UPS approved code, 2) not secure, and 3) requires ongoing (and expensive, I hope) maintenance from you? Explain to the cheapskate that setting up UPS approved code via SSL will cost less than your hourly fee to maintain any created code - and you absolutely refuse to guarantee the security of the site if he refuses. |
|
|||
|
Thank you all for your replies.
To answer the questions regarding whether my client has an account with UPS, as far as I know, he doesn't. He is expecting the retail rates and not negotiated rates. As I mentioned previously, I did apply some adjustments that did bring the rates more inline with what the UPS Web site returns. Previously, I had added functionality that allows the client to specify a certain percentage to be applied to the rates but, for some reason, he isn't using it. Remccain: The XML version of the tool does require an SSL but the HTML version does not. I worded that quote wrong. I've seen similar methods applied on third-party shopping carts where the request is sent via an HTTP post for the HTML version. This method was the only avenue I had left to me due to the client's refusal to purchase the SSL...aside from using the exact HTML version that basically takes the customer to the UPS site and essentially gives them control for specifying what their shipping rate should be. Thanks, |
|
||||
|
You might want to test the XML version on another site (maybe your own if you have a cert), and make sure that really does fix the problem. If this guy is squeaking over the cost of a cert (which is STUPID, a cert adds credibility to your company and site), imagine how he will howl if he continues to get the same results WITH the cert.
|
|
|||
|
Quote:
It should be noted that the form for requesting credit card information is hosted by Authorize.net. If he had wanted to capture credit card information without any type of security, I would have told him to take a hike. I would have preferred to set up the form on my client's server but Authorize.net wouldn't allow it due to his lack of an SSL. However, order information and user information (e.g. shipping info, billing info, name, e-mail, etc.) is captured on his server and I feel that that should be in a secure environment as well. At the least, it would make the customers feel safe. |
|
||||
|
How much of a difference is there from UPS rates and your clients? Is it a dollar? After looking through your settings (shippingdata = shippingdata & "&34_handling=1") I've come to the conclusion you're clients settings are applying an additional handling fee to the published rates. Set the handling to 0 and see if that works. If that still doesn't work call 1-800 Call UPS and ask for Tech. They'll be able to walk you through the set up.
|
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Noframe & Noembed tags | Ann | Google Discussion Forum | 4 | 07-21-2007 02:50 AM |
| IT.Com Enhances Services With White Paper Search Tool | WPW_Feedbot | Search Engine Optimization Forum | 0 | 10-11-2005 02:30 PM |
| SQL Server 2005's ETL Tool: Integration Services | WPW_Feedbot | IT Discussion Forum | 0 | 03-31-2005 07:30 PM |
| Court rules in pop-ups' favor | WPW_Feedbot | IT Discussion Forum | 0 | 01-05-2005 11:31 AM |
| Unsubscribe rates for first one free services..help! | mowgster | Marketing Strategies Discussion Forum | 0 | 10-13-2004 01:30 PM |
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2010 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |