Bill Percentage of Total - Post ID...

User 2377814 Photo


Registered User
45 posts

I've read around a little on the forums, from other people wanting to achieve a similar thing.

I need to bill an additional 4% of the total invoice cost, to cover transaction fees.

I think its perhaps not possible to bill a calculate amount based on the figure generated on the cart_total, but what is the best solution to achieve this?

Unfortunately I can't just make all the products bill their pricing at 4% because the customer has to see the actual full total of their bill.
User 2377814 Photo


Registered User
45 posts

Is there maybe a way to state a total with conditional fields which the customer can't edit?

Say:
if Item 1 costing £100 is ordered then I can set a field for Transaction Fee to bill £4
if Item 2 costing £200 is ordered then I can set a field for Transaction Fee to bill £8

but the field Transaction Fee would have to not be editable by the customer, it would just need to show the figure, either within the form, or just on the invoice
User 2377814 Photo


Registered User
45 posts

Anyone know if this is possible?

There's actually 2 stages that Im trying to achieve:

1. To add 4% to the cart total
2. To display 50% of the resulting new cart total to show how much deposit to pay.

The form Im making is creating an invoice, which can later be paid online -
So an example of what Im trying to achieve in the finished responder email (invoice) is this...

Order Item 1 at £100
Order Item 2 at £150
Transaction Fee at 4% £10 (4% of the total cost of all the purchased items)

Cart Total £260 (total cost of all the purchased items + the 4% transaction fee)

Deposit Due £130 (50% of the Cart Total)

Hope someone can help! Thank You :)
User 187934 Photo


Senior Advisor
20,271 posts
Online Now

Along this line?
http://ericrohloff.com/coffeecup/ccforu … uspercent/
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 2377814 Photo


Registered User
45 posts

Yes Eric, Thanks for your example.

A little like that, but which part of the coding would I need to change to correct it for my own calculation, first adding 4% to then generate a grand total?
And then displaying 50% of that grand total?

(because believe it or not people do currently email the client back when he sends a bill saying total is £400, please pay 50% deposit - asking how much deposit they need to pay... it really happens...) So Im looking to have a figure i can (hopefully) call upon saying please pay £ [_deposit_] as your deposit payment.

But will I be able to call upon this function later with a [_name_] ?

And do I have to list each priced item individually? Because there's quite a lot! But that's ok if so, I'll get to work.
Or is it possible to call upon the cart_total and manipulate this figure?

Some of the elements are hidden, eg one order is placed, item_1 item_2 etc then is says "would you like to place another order? Yes / No with conditional formatting a second set of item_1_1 and item_1_2 is shown for the customer to order more of the same, because each order needs customising. So I hope the conditional fields wouldn't bill providing they remain hidden
User 187934 Photo


Senior Advisor
20,271 posts
Online Now

It will be easier for me to guide you if I can see the actual form.:)
This way I can see the actual inputs your working with.
Any input that you want to be submitted needs to be showing at the time of submit if there's any conditions applied to it.
We can write some custom code to hide inputs from users but they still get submitted.
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 2377814 Photo


Registered User
45 posts

It's only up for testing within the site at the moment (im still working on the website) and the location is password protected for the client. Do you have a way I can send you the password?

The fields which are hidden by conditional formatting and contain prices are drop down menus - so they are please select one by default (no price) until the user chooses the item they want and each one is priced. So Im hoping there's a way to do it which will only bill what they purchase and not everything on the form
User 2377814 Photo


Registered User
45 posts

Yes all the inputs I want to be added will be showing at the time of submit.

All the ones I dont want to be added will be hidden by conditional formatting.
User 187934 Photo


Senior Advisor
20,271 posts
Online Now

Take a look at my example and see if you can apply it to yours.
It's just a matter of grabbing the inputs within the code and applying th math to the proper ones.
You could make a test form just for getting the math setup that only has some of the inputs on it.

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 2377814 Photo


Registered User
45 posts

Im a little confused about the way to tackle this, Ive taken a look over the code you kindly supplied.

But am I able to work with the one figure for the cart_total ?
or do I need to add together all the chargeable product options then add 4% to this and present it in another box?
Or am I able to calculate 4% of the listed order and have FB add that to the cart_total ?

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.