Module that restricts delivery method based on customer's distance from store

Posts: 1
Joined: 07/12/2008

I'd like to sponsor the development of a module that would do the following:

1. Geocode a store's address to latitude and longitude and store them. (The geo-coding itself is pretty simple; see, e.g,. http://code.google.com/apis/maps/documentation/services.html#Geocoding_Direct or any of the numerous location modules that have been developed like gcg or location.)

2. In cooperation with the uc_addresses module, geocode users' delivery addresses upon adding/updating, and store the lat/lon in the DB.

3. Calculate the distance in miles between the store and user's selected delivery address at checkout using the stored coordinates and a reliable forumla (see, e.g., http://www.google.com/search?q=calculate+distance+using+coordinates).

4. Allow the admin/store to set a delivery radius in either km or miles, within which, certain delivery method(s) are available, and outside which, certain delivery method(s) are unavailable.

5. At checkout, gray-out the unavailable delivery method(s) with a message explaining that the user/customer is outside the delivery area.

6. (Optionally, or later) Create a page where a user can enter an address and determine which delivery methods(s) are available before placing the order.

I don't think this is too complicated, and probably wouldn't take more than a couple hours in straight PHP programming (outside drupal). But I think there is a bit more work involved in ensuring that the code plays nice with the uc_addresses module... at least, more work than I have time to put in right now.

I'm thinking this would be worth around $300USD to me. If you're interested, please take a look at the uc_addresses code and the two google links above and let me know how much work (in hours) you think is involved, and provide a little background about your experience working with Drupal. (Also feel free to let me know if the payment seems acceptable or if I'm crazy.)

Please respond by email to mike5 @ inprivity.com. Thanks!

Posts: 5
Joined: 11/29/2007

This sounds like something pretty useful which could come in handy for me also, pending getting a contract I'm currently looking at. I'll keep an eye on this and pitch in with anything useful that I can. Smiling

Posts: 15
Joined: 05/10/2008
Bug Finder

You didn't specified, which module do you use for setting delivery methods at checkout. Anyway, I think, I can do this within one or two days, when will be know all need information from you.