How to perform addition calculations for PayPal Plug-in

Please ask questions, report bugs and share your ideas about SmartFormer Gold for Joomla in this forum

How to perform addition calculations for PayPal Plug-in

Postby Lobotaman » Mon Jan 16, 2012 7:24 pm

Hello,

I have a functional 3-page form. On the third page, the visitor has to make some selections - one radio button and their choice from nine checkboxes.

Depending upon which of 4 radio buttons in one group named registration they activate, one of 4 values are written to the database. The values are 279, 510, 779 or 0 (no decimal places)

Depending upon which of nine checkboxes they have checked, certain values are written to the database, those values are 12, 20 or 30 when the boxes are checked. Uncheck boxes have no default value, at this point. If I need to, I can put zero, not sure where it would go though.

I want to add the registration field and the checkbox fields plus 10 and paste their value to a field called amountdue. It would be even better if I could display the value on the screen after the visitor clicks a calculate button.

My goal is to use the PayPal Plug-in to send this info to PayPal for one total value checkout.

Is there anyone out there who can help me figure this out?

If it matters, the field names I want to sum the actual values of are:

registration
p1_cotton_shirt
p1_custom_shirt
p1_crazy_shorts
p2_cotton_shirt
p2_custom_shirt
p2_crazy_shorts
p3_cotton_shirt
p3_custom_shirt
p3_crazy_shorts

Then, I want to add 10 more to the whole thing and put the result in amountdue

I just have no idea how to do this. I saw a couple posts from 2009, but don't understand where to put the onClick action at or how to write the code for my scenario.

Thanks to anyone who can give this some thought.

With regards,

Lobotaman
Lobotaman
 
Posts: 7
Joined: Wed Oct 05, 2011 12:21 pm

Return to SmartFormer Gold for Joomla

Who is online

Users browsing this forum: No registered users and 1 guest

cron