How to Calculate Total of Order minus...

User 452266 Photo


Registered User
267 posts

I haven't found this anywhere searching, and may not be possible, but here goes.
On a Registration Form with Web Form Builder, how do you receive a Total of Order minus Paypal Fees.
Example:
Drop Down #1 --- 1 Adult @ $10 Each:1 (Price $10)
Drop Down #1 --- 2 Adults @ $10 Each:2 (Price $10)
Drop Down #2 --- 1 Adult Med T-Shirt:1 (Price $15)
Drop Down #3 --- 1 Adult Large T-Shirt:1 (Price $15)

Say they select 2 Adults @ $10 Each from Drop Down #1
Select 1 Adult Med T-Shirt @ $15 Each from Drop Down #2
Select 1 Adult Large T-Shirt @ $15 Each from Drop Down #3

The Total of the order for Paypal payment will be $50

What I want is for a Field to show at the bottom of the form showing the Total AND a Hidden field to be emailed to me showing the Total and the Net (Total MINUS the Paypal Fee of 2.2% plus $.30 Transaction fee.)
In this Example, the Net would be: $50 (=SUM(50*0.022)+0.30) This would Fee of $1.40
I would really like the $50 Total of the order to show at the bottom of the form they are filling out (running calculation) and the Net be submitted in the Email to Me (not the person registering) with the New Amount.

May The Good Lord Take A Likin' To You,
Sandcrab3 (Scooterman)
User 2147626 Photo


Ambassador
2,958 posts

While waiting for a better answer, you might read through this: http://www.coffeecup.com/forums/web-form-builder/adding-a-percentage-to-the-form-total-and-cart-total/
Seems to talk a lot about manipulating the total amount. Let us know if you find an answer.
Graphics for the web, email, blogs and more!
-------------------------------------
https://sadduck.com
User 452266 Photo


Registered User
267 posts

Thanks Gunsmoke. I saw that post earlier, and I believe this may do for the Email send. What I forgot to mention in my post, is the fact that I would like these values (Total and Net) sent to MySQL server also.

May The Good Lord Take A Likin' To You,
Sandcrab3 (Scooterman)
User 38401 Photo


Senior Advisor
10,951 posts

Now don't shoot the messenger here lol, as I've not used reg. expressions at all, but couldn't you do a hidden field within the form builder that includes a reg. expression that picks up that total and does the calculation with it? I've no idea as I'm not sure of what kind of power reg. expressions give you, but seems like there should be something like that you can do?

Eric will probably know, he seems to know quite a bit about regular expressions. :)
User 187934 Photo


Senior Advisor
20,271 posts

If you set your form up for mysql then the data should be posted into it on submit. No hacking needed.;) Maybe a cough or two.:lol:
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 452266 Photo


Registered User
267 posts

Regretfully, it doesn't send Total of Order OR Net to MySQL

May The Good Lord Take A Likin' To You,
Sandcrab3 (Scooterman)
User 187934 Photo


Senior Advisor
20,271 posts

Are you applying a conditional to those elements?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 452266 Photo


Registered User
267 posts

Eric, I guess I'm at a loss as to how to perform this with conditions.
I don't know how CC comes up with a Total of order for submitting to Paypal. I can't even find a way to Total all of the itmes selected.
I see the Name as in Adult1, Adult2, Family, TShirt1, TShirt2, etc, and the Price Multiplier attached to each name. I can use the Price Multiplier and the drop down menus to perform the math for each Name, I can even use the Show Element or Hide Element with Conditions attached. But the Conditions are AND & OR. I don't see anything for performing the math as in: =SUM(Adult1+Adult2+Family+TShirt1+Tshirt2) to get Total, and then =sum(Total-((Total*.022)+.30)) To get the Net amount. How on earth would I get this to submit Total and Net to MySql? I could work the math in a Spreadsheet Table in the Email HTML to me for those items I guess, but not for MySQL submission.

May The Good Lord Take A Likin' To You,
Sandcrab3 (Scooterman)
User 187934 Photo


Senior Advisor
20,271 posts

Anything you want submitted has to be showing at the time of submit as far as the conditionals in the form builder are concerned. That being said you can hide an input from the user that you placed in your form to get what every value you desire from your script math. You can hide this with your own code and it will get submitted because the form builder doesn't know it was hidden at the time of submit.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.