Integrating additional calculations into product data
I've been reviewing the Drupal Commerce platform as a possible solution for presenting financial products such as loans to consumers visiting a financial website. I think I can correctly model a loan product, such as a mortgage as product data, but I'm wondering how I might be able to incorporate a calculated monthly payment, based on the loan amount, into the product that gets displayed to the financial consumer.
I've built financial calculators on top of Drupal and used a combination of the Form API, jQuery and Javascript to take user input data and return things like monthly payment information to the user using Dom elements such as a label with a unique id. However, when I look at the HTML created for a product display, there is no unique ID associated with each product item that would allow me to do this; at least I don't think there is.
Are there approaches where I might be able to integrate IDs into the displayed data, such as what I can do with the Drupal Form API suffix and prefix fields? Or are there better approaches I can take to accomplish the same thing.
Thanks.
Comments
Dont know if this fits you
Dont know if this fits you but i managed some custom stuff following what is outlined here. http://commerceguys.com/blog/using-custom-line-items-provide-donation-fe...
I Thought to have a separate calculator with javascript popup, then maybe the final values could be passed into the custom line items and the users clicks add to cart it updates the sell price.