discounts using form builder (only...

User 506998 Photo


Registered User
164 posts

Doesn't all that get me is the ability to enter a negative number?
And really... that's probably too much to ask the form filler. It's complex enuf as it is. (been in use for awhile)
http://balletchildren.com/schedule_registration.php A new version in in the works that will add checkboxes or drop downs for around 30 different class choices. Right now the user has to manually enter a class code. But then this data has to be sorted manually into the db in post. I'd like to have class selections add prices - yup, can do - but then there are 3 types of discounts: $10 off, $50 off and pay half now. I can actually do the pay half now by using a price multiplier and editing the code in post -since you can't put 0.5 in the Properties interface of FormBuilder (but I can in the final script and it works!)
If I can't figure out a way to force a checkbox value to be subtracted by editing the code, then I'll just have to let the user select the items (ballet classes) with the form but do the math -along with any discounts- long hand and just enter the number they come up with. Just makes the accountant have to double check all the addition and then get folks to correct when necessary. I'm still hunting for that code possibility.... or a 3rd party simple script.
User 506998 Photo


Registered User
164 posts

One last thing.... (hah)... If I could have a negative starting value for the total at the initial state of the form that was the value of both discounts added, ei, -60. Then a discounts radio button could work in reverse, by not doing anything when "apply discount" is selected and adding the 50 or 10 when "no discount" is selected (the default choice). See what I'm sayin'...?
User 506998 Photo


Registered User
164 posts

I did it ! :D
I can have selectable discount options which will deduct a preset amount....
And I can have an option to deduct half (or any other percentage) off the total:
Both are shown in my simple test form:
http://friendlyspider.com/discount/discount3.php

Anybody curious how I did it....?
It did involve just a smidge of editing of the form.cfg.php ...but not much.
Anybody see any potential problems...? I can't find any yet.

(yes... it's possible to get a negative cart total right now because the class prices are actually way too low -not the actual prices. In reality, the discount will not drop the price below zero.)
User 187934 Photo


Senior Advisor
20,193 posts

I would go ahead a post what you did so others hunting for a solution can have options to choose from.;)
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 506998 Photo


Registered User
164 posts

OK.. I've built a tutorial that I'm going to host on my website. I've got lots of screen grabs with full explanation to make it as easy as possible. But I have a question for those who are publishing their form to their CoffeeCup account (I have clients with that option as well)...
One must perform a couple of simple edits to the form.cfg.php file to implement discounts using my technique. But how can one get the edited form.cfg.php uploaded to their account at CoffeeCup if they use automatic publishing? Is there another way to access or upload or ftp an edited version of that file into the Coffeecup account? I see that you can use Direct FTP to access your content.. so how does one obtain their FTP configuration data? What am I missing here?
When using your own hosting plan, it's no problem of course... that's how my example is setup.
User 506998 Photo


Registered User
164 posts

Here's my in-depth tutorial on how to create selectable discounts and percentage off buttons:
http://www.friendlyspider.com/tutorials … _discount/
User 187934 Photo


Senior Advisor
20,193 posts

You wont be able to use your hack on S-Drive.
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 506998 Photo


Registered User
164 posts

Well sh-t. Too bad you can't delete your own posts !
Everything looked like it was going great...
Web Form Builder's "Almost Done" page with the subtotals and totals doesn't indicate any problems and all looks fine, but when you hit PayPal, you get the error from "them". I didn't see a need to actually continue to PayPal... but there's the glitch. PayPal does not want to see any negative values in the Total Column even if the final Order Total is a positive value. Not sure why the subtotals matter, but they do.
I'll leave my tutorial up in case anyone wants to see if they can further what I've done and solve the problem... and I haven't completely given up yet....
Dang I thought I had it !
User 506998 Photo


Registered User
164 posts

Eric Rohloff wrote:
You wont be able to use your hack on S-Drive.

Hmmmm... when I go to the Storage tab under S-Drive, there's a link for using Direct FTP and on the Direct FTP page it shows an S-Drive account in the right side of the app screen grab.... :D
Kind of misleading....? :lol:

But it looks like it's all moot because of the PayPal negative subtotal glitch.
Think it's worth leaving my links up to see if someone comes up with an adaptation....?
I'll put a note at the top of the tutorial that it's not solved... yet.
User 506998 Photo


Registered User
164 posts

I wish I wasn't the only one hacking away at this... I think a couple of minds could figure it out. I got real close. If you know a bit a code and can take the time to look at my earlier example and tutorial, I think you'll see there's got to be an edit in one of the config scripts to avoid passing the negative quantities to PayPal.
I did figure out a much less elegant solution that doesn't involve any hacking, but does involve the total price multiplier.
Say you have items at $225 each and you will offer a total discount of 10% off if they qualify and select a button.
(how you determine that they qualify is another matter - you'll have to trust or double check or sumpin')
By setting a "full price" selection with a multiplier of a hundred.. and then a discount multiplier with a multiplier of 90... and then divide your items prices by 100 and use that as the input price (which isn't seen on the form).... then it does work.
The funky part is that your item pricing is $2.25 in my case and they are buying a 100 of them or 90 of them.
But the correct Total is shown and the correct Total is sent to PayPal.... and it works. Now if there's just a way to hide the subtotals from the Check Out page (with the PayPal link) Here's the demo of that:
http://friendlyspider.com/percentage1/percentage1.php

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.