Ive made a booking form using Drupal 6, where bookings are a content type and you create a node of that type to make a booking.
I now need to add a price calculator. When creating a booking node, one of the CCK fields you fill in is distance. I then need the price to be calculated from the rates below, and that value to be given to another CCK field.
Rates:
0-5 km $20/ mile
5-10 km $15/ mile
10-20 km $10/ mile
20-30 km $5/ mile
So if the distance was 11km, the price would be 11 x 15 = 165. Also, the rates table needs to be editable by the site admin.
Can any Drupal modules do or at least help with this? I could probably manage to do the calculations and change the price field value with jQuery. If the table was shown on the page then jQuery could grab the values from it, and the table could be editable by the admin so the rates could be changed. Im far from a jQuery expert though….
Thanks
UPDATE – Ive asked the question in the Drupal Answers site, but im not able to move or delete this post.
https://drupal.stackexchange.com/questions/11758/any-modules-to-help-with-price-caculator
You may want to check out the Computer Field module.