I am looking to have an international shipping calculator developed that provides a subset of the functionality from the shipping calculator at [url removed, login to view]
This will probably require some sort of screen scraping from the USPS site. Any server-side code will need to work with my webhost, Lunarpages.
I sell products internationally via www.bricklink.com. Due to the volume of shipping quote requests I receive, I want to provide a way for potential buyers to do their own self-service shipping estimates. The BrickLink site is simply a sales venue like eBay and I have NO control over its back end.
Buyers can add items to their shopping cart and then check the weight in the cart to find the raw product weight. The weight in cart feature is not enabled by default and buyers will need to enable it in their profile. I want a cut tag section that would unfold and provide instructions on how to do this. I will provide the instruction text and two screenshots for this section.
There should be input boxes for the buyer to enter the weight in pounds and ounces from their cart. This weight will need to be multiplied by [url removed, login to view] to account for the weight of the packaging. The buyer should also select their country from a dropdown. This dropdown can be populated by copying the same dropdown code on the [url removed, login to view] site. The "United States (Domestic Mail)" item can be omitted as this shipping estimator is for international orders only.
You will then pass the appropriate values to the USPS website via a custom URL like this which is 1 lb 4 oz to Canada:
[url removed, login to view]
In this example the parameters are:
Country - 10054 (Canada) is from the country dropdown selection
M - Mail class type. This will always be 2 (Package)
P = 1 (# of pounds, 1 in this example)
O = 4 (# of ounces, 4 in this example)
The results should be scraped for the Priority Mail international (3rd row in the table) and First Class International (Last row in the table, ONLY valid when the weight is 4 lbs 0 oz or less). If First Class is not available (i.e., the weight exceeds 4 lbs) the First Class value shown to the user should be "First Class not available at this weight."
My handling fee of $[url removed, login to view] should be added to the resultant values. The scraping script should have this value listed near the top so that I can change it if needed.
The results for both Priority and First Class International (if applicable) should ultimately be displayed on the shipping estimate page.
I reserve the right to add static text to the page before the completion of the project. This would be in the form of instructions, user explanations, disclaimers, etc.