PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

calculating a price

  1. I need to know if I can use the forms to calculate a different price for each zip code.

    Posted 13 years ago on Monday August 29, 2011 | Permalink
  2. Please post more details of your situation. How many zip codes are in question, and will the calculations be simple?

    Posted 13 years ago on Tuesday August 30, 2011 | Permalink
  3. I also have a similar question. I am looking to add a service fee based on their zip code. I will have close to 100 zip codes.

    Basically I have a form that already calculates a total price but now when they add their address I want to add on a service fee that is based on their zip code.

    How can I go about doing this?

    Posted 12 years ago on Thursday December 20, 2012 | Permalink
  4. I think there are a couple of approaches you could try. One would be to add all your zip codes, as options on your product, and associate the fee with each zip code. Then, when they enter their zip code, use jQuery or JavaScript to make the selection in your options drop down.

    Another way to do it would be to break apart the address and use a pre-defined list of zip codes. This would work if you only service specific zip codes, and any zip code outside your list would not be serviced. You could make the zip code drop down an option or a product, although it does not need to look like that to the visitor. That way, choosing their zip code from their list would set the price of the service fee.

    One more way to do it would be to query a database or list of zip codes after they enter theirs, and get the service fee and add it to the total. This way is the most complicated.

    Posted 12 years ago on Friday December 21, 2012 | Permalink
  5. The last option sound the best as far as the user experience goes. How would I add this code, what would the code be, and where do I put this code?

    Thank you for the quick response btw

    Posted 12 years ago on Friday December 21, 2012 | Permalink
  6. This would require a substantial amount of code and we would not be able to provide the solution for you. You can always find help on on job board or any of the WordPress-related job sites on the Internet.

    http://www.gravityhelp.com/forums/forum/job-board

    Posted 12 years ago on Friday December 21, 2012 | Permalink

This topic has been resolved and has been closed to new replies.