How do I create tiered delivery charging?

  • Profile Image
    saltersevents
    Asked on February 07, 2021 at 11:36 AM

    I'm currently charging a flat fee for delivery. I'd like to have a tiered delivery charge, based on the distance of the delivery. i.e. the further away the delivery address is from my location, the higher the delivery charge. I'd also like to offer free collection if customers would like that option. I don't know how to do either.

    Would it be possible to add a picture of my delivery zones showing the different prices for delivery?

  • Profile Image
    JohnRex
    Answered on February 07, 2021 at 01:24 PM

    You can try adding the Driving Distance calculator widget to your form. This smart widget will return the approximate driving distance between two locations anywhere in the world. You can configure the originating distance, and let users enter their address or postal code, which the widget will assist by auto-completing the user address.

    Let me create a demo form to better illustrate how it works. I will get back to you here shortly.

  • Profile Image
    JohnRex
    Answered on February 07, 2021 at 04:26 PM

    As checked, you have incorporated the DELIVERY FEE in the Stripe field:

    1612728964_60204a84885be_

    Unfortunately, the workaround that I'm planning to present will not work on this setup.

    You would need to create the products outside the Stripe field. Here it is:

    1.) Here I used SPINNER fields:

    1612730240_60204f80d1ef3_

    2.) I then added a FORM CALCULATION widget for the SubTotal:

    1612730452_60205054ad9fd_

    As you can see, I have multiplied each spinner to the product price it represents then add the results.

    3.) Next, add the DRIVING DISTANCE CALCULATOR widget. You would need to have a Google Billing account for you to use it. https://developers.google.com/maps/documentation/javascript/get-api-key

    This requires the user to input the ORIGIN and DESTINATION LOCATION. And based on the distance, we will calculate the cost - please set a base price.

    4.) Add another FORM CALCULATION widget. This will be the TOTAL (SubTotal plus the Delivery Cost). Here's the formula you can use:

    1612732997_60205a45059f2_

    5.) Lastly, pass the calculated value to the Stripe field for the user to complete the payment. Here's a guide on how-to-pass-a-calculation-to-a-payment-field.

    And that's it! I have implemented this on a cloned form. Here's a link that you can try: https://form.jotform.com/210376298311959