nBill Community nBill Home Page
22/May/2012, 11:39:20 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Click Here for the nBill home page, or take a tour.  
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Create "location specific" pricing on order form?  (Read 240 times)
majeztic
Jr. Member
**
Offline Offline

Posts: 56


View Profile
« on: 08/December/2011, 05:06:27 PM »

I am wondering what would be the easiest way to create pricing based on the clients location. 

We are a service company that works (usually) within a three county area.  I would like to set up an order form that specifies different pricing for a service call for customers in different areas..  There would really only be four different prices; $45 within 4 miles, $70 within 15 miles, $95 within 25 miles, and $145 for all others. 

I would assume that I would need to create products for each of the four service areas...but how would I associate those products with the client based on their location.

There are approximately 125 ZIP codes and 60 different city names so I am trying to avoid having to create a separate product for each one, especially since there are really only four different prices.

I thought of using a fee or discount with a voucher coder equal to the ZIP code and mapping the voucher code to the customer's billing address ZIP code on the order form.  However, that would still require creating 125 separate fee or discount records in the backend (one for each ZIP code).

Any suggestions on how I could get this to work?  Is there something I am overlooking?

Thanks,

Mike




Logged
netshine
Administrator
Hero Member
*****
Offline Offline

Posts: 4,563


View Profile
« Reply #1 on: 08/December/2011, 05:52:17 PM »

However you do it, it would require some kind of processing to determine how far away the client is. There are 2 options: You could write some custom code to do some calculation and programatically determine which product to order. Or just offer a dropdown list of the 4 options and trust your clients to be honest about how far away they are.
Logged
majeztic
Jr. Member
**
Offline Offline

Posts: 56


View Profile
« Reply #2 on: 12/December/2011, 02:06:38 AM »

I was able to implement this and figured I would post back in case it helps someone else.

My initial thought was to create a product for each ZIP code, however, if someone was outside of our service area, the order form would be submitted without any "product" being ordered.  

The solution I came up with is probably not the most ideal, but it works for my purposes.  I don't anticipate a lot of use out of the order form in general because most of our work is done with quotes and invoices, but it was nice to be able to set up the order form with our service call rates for those customers that want to use it to create a service request.

First, I created one product called "Service call" and priced it at $150.00 (our maximum service call rate).  I added the "Service call" product to the order form by selecting it from the "Related Product" option under the "Processing" tab in the editor.  The product was added to a random dropdown field (not a specific option in the dropdown), so that it would be ordered when the form is submitted, regardless of what option was selected.

Second, I created one discount for each ZIP code in my service area.  I used a tool on zip-codes.com to get a list of ZIP codes within a 30 mile radius.  The link is here http://www.zip-codes.com/zip-code-radius-finder.asp?zipMilesLow=0&zipMilesHigh=5&zip1=&srch.x=34&srch.y=8.  The results were output in a nice table that I was able to copy and paste into excel to work with the data easily.  I created a CSV file to import into the _nbill_discounts table in my database (this would take way too long to create each discount manually through the nBill backend).  Each discount used a voucher code equal to the ZIP code.   The discount amounts are stored in another database table called nbill_discount_currency_amount.  The discount amounts ranged from $105.00 (for locations within a few miles) to $5.00 (for locations up to 30 miles away).  

Thirdly, on the Order tab, I mapped the voucher code field to the ZIP code field of the customer's address on the order form.

Now, when a customer submits an order for service, the total amount is based on their location.  The summary table for all orders will have a $150.00 service call fee.  If they are outside of our service area (ZIP code not listed as a discount) the total due would be $150.00.  If they are in our service area, the total due would be discounted based on their distance from us.

This may not be ideal for most situations, and I am sure if more thought and effort went into this, it would be possible to come up with a more elegant solution.  However, this works well as a quick and dirty solution.  For the amount of use I expect from the order form, I don't see any reason to put any more resources into it.

Netshine, you may move this to the Community Tips section if you want.
  
« Last Edit: 12/December/2011, 02:08:34 AM by majeztic » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!