Posted by robin.prieschl on May 12, 2009 at 2:16pm
Hi
We have resently moved our client over to Drupal. He now has a new requirement that he wants us to do on the site.
He wants users to be able to calculate online quote indications. The user would navigate to the site, select quote and then enter 2 fields. The calculation would need to compare 2 fields in band to get the base rate and then apply various calculations to one of the fields. Once complete it must show a rand amount on the screen as well as email this amount to their email.
Has anyone done this on drupal? Is it possible doing this and what modules would one use or is it custom dev?
Not sure if CCK and views alone can do this.
Thanks
Robin

Comments
Re: Quote Estimates using Drupal
To be honest I haven't looked to see if any modules do exactly what you're looking for (I assume you've checked http://www.drupalmodules.com), but it sounds to be like the easiest solution would be a custom module.
If you haven't done so previously, have a look at a Module tutorial for Drupal 6.
Your module would make use of the Forms API to create the form that the user would enter. The results could be sent by e-mail with the drupal_mail function.
You could either create a custom table in the database for your module to store the bands information or alternately create a custom Content Type with relevant CCK fields. Either way the submit function of your form would do the lookup in the relevant table, process the results and act accordingly.
Ideas
You can use computed field to do the calculations, and actions/rules/triggers to send the email out. Of course, it depends what sort of calculations must be done on the fields (and how they are input in - is it a select list?) and what values must be accessed where.
Thanks
Thanks, I think that will help quite a bit, especially for the one field, the problem i may still have is with the second field. There are 2 fields:
Do u perhaps have any suggestions?
Thanks, you have brought me a lot closer.
Computed field again
I'd suggest computed field again for the second field (or for a 3rd field which stores the result after performing a calculation on the second field). You can either hard-code the values for the band into the computed field calculation, or put them in the database and access them through the computed field.
Worked Well
Hi Roger,
Thanks for the tip, computed field worked perfectly.