I have a client that uses dealers. They'd like to offer retail sales on their website but credit the closest dealer with the sale if the ship to address is within a 15 mile radius of a dealer. Essentially I think I need a zip code database, some PHP code to do the checking and then some logic to either let the sale proceed normally or to interject a page/include that gives the customer an option to either have the product shipped to them (with shipping charge) or indicate that they want to pick it up at the dealer's store (no shipping charge).
Has anyone done this before? With raw PHP it's not that hard to write but I haven't tried working with ShopSite's databases and checkout flow and I'm wondering if I can make this work.
Any insight would be helpful. THanks.