In this short contract I’ve been tasked with creating a plugin for a chain store to send client enquiries to the nearest store to the client.
This plugin makes use of the well known and easy to use Contact Form 7. The form is set up with two of the fields being the client’s city and state.
Once a client fills in the form, together with their city and state information this wordpress plugin hooks into that submission and determine which store is nearest to the client.
The plugin then forwards the email to that store.
There is also an administration section where the site administrator can tell our plugin which specific contact form 7 to listen in on (because there may be more than one form on the website).
The administration panel also allows the site administrator to add, edit and delete their store information, along with the accompanying latitude and longitude info.
There is also a logging function (which can be enabled or disabled by the site administrator). The logging provided valuable feedback, particularly when no search match is returned. In this case we would like to be able to determine why there was no result, ie, was there really just no result within the radius, or is there some misspelling, etc we should be aware of.
We decided to make this a plugin, rather than built into the theme because the client may want to change their theme at some point in the future. This will allow them to do that without losing any of this functionality.
John McMurray is a freelance PHP developer. Experienced in PHP, Laravel and WordPress he can code anything you need.
Based in Plettenberg Bay, Western Cape I am available for PHP, Laravel or WordPress freelance jobs in Johannesburg, Pretoria, Cape Town, Port Elizabeth. I also often do remote PHP freelance work all over South Africa and the rest of the world.