Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

HTML & CSS HELP - Shipping Rate Calculator

techrookie

New Coder
I am trying to add a shipping rate calculator to my website - like the attached images and below site.

https://www.betweenbox.com/shipping-cost/

I would like to show a range of different carriers like... Royal Mail, FedEx, UPS, DHL

I have been searching the internet for hours and have not got very far :(

If anyone has any tips, it would be much appreciated.

Thank you in advance!

Screen Shot 2021-04-23 at 20.48.02.png
 

Attachments

  • Screen Shot 2021-04-23 at 20.47.09.png
    Screen Shot 2021-04-23 at 20.47.09.png
    222.4 KB · Views: 1
If you want to calculate actual shipping prices, you'll need to use an API provided by the shipping carrier. I know UPS has an API and I suspect that USPS and FedEx also have APIs you can use as well.

Typically the process would go something like this:

1) User fills out a form on your website with their address information
2) Your website takes in the user's input
3) Your website makes a request to the shipper's API with the user's info, as well as some info you provide, such as starting address, package weight, etc
4) The API responds back with some data, such as shipping prices
5) You output this data to the user

Maybe something like ShipEngine (https://www.shipengine.com/) will be a better way to go. It looks like it's an API that combines the data from multiple shipping companies into a single API, so that would save you from having to query UPS, FedEx, etc all individually.

What languages are you coding your site in? If this were me I would do this in PHP, but you can likely also do this in Javascript, Python, or other languages as well.
 
Back
Top Bottom