admin管理员组

文章数量:1122846

Is it possible to create code for a WordPress page (or create a plugin) that will allow a visitor to enter their post code (zip code) and see a price as a result.

Something like a form field box where if X=A,B,C,D,E, then display £100. If X=F,G,H,J,K, then display £125.

I'm a photographer by trade and I have a minimum pricing requirements. The further outside the city, the higher the price.

I have an image showing these price minimums but visitors don't click on it often.

I have basic knowledge of JavaScript and PHP.

Thanks in advance for anyone's thoughts and replies.

Frank

Is it possible to create code for a WordPress page (or create a plugin) that will allow a visitor to enter their post code (zip code) and see a price as a result.

Something like a form field box where if X=A,B,C,D,E, then display £100. If X=F,G,H,J,K, then display £125.

I'm a photographer by trade and I have a minimum pricing requirements. The further outside the city, the higher the price.

I have an image showing these price minimums but visitors don't click on it often.

I have basic knowledge of JavaScript and PHP.

Thanks in advance for anyone's thoughts and replies.

Frank

Share Improve this question edited Sep 20, 2024 at 12:15 fuxia 107k38 gold badges255 silver badges459 bronze badges asked Sep 20, 2024 at 5:13 Frank B.Frank B. 32 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

WordPress (or any other CMS) doesn't have this feature by default. You need to find a plugin (I doubt if the exact plugin like this exist), or build your own code.

I suppose your code should have a form for user to enter their post code. Based on the post code value, you can determine the price in one of the following ways:

  1. Give the prices if the post code contains or starts with certain letter.
  2. Use Google Maps API to measure the distance between your location and the entered post code location. If the distance is in a given range, give it a certain price.

本文标签: plugin developmentCreate a zip code form