Welcome, Guest

Multiple player registration form -Paypal payments
(1 viewing) (1) Guest

TOPIC: Multiple player registration form -Paypal payments

Multiple player registration form -Paypal payments 2 years, 3 months ago #11693

IGNORE THE FIRST TWO PAGES - GOOD INFO STARTS ON PAGE 3

First, thank you for an incredibly flexible package. It enables us novice developers to add important features like forms to the websites we are working on. The byproduct of this is that we are able to educate ourselves with all the great videos and this forum.

After reading and working on a site's registration form for several weeks, I find it's time to ask for some help.

The form is a little league registration form. We have determined that we want to have enough room for 6 players from one family to register online.

I have successfully been able to build the form and have it gather the data - everything is talking as it should. I have a summary page that shows all of their selections as my page 2. (I can even get excel reports out of the database as I had hoped!)

Here's the wrinkle:

I need a way to calculate the total cost of all players being registered and submit that amount to Paypal (or allow them to submit the form without payment to accept a check via mail). I need to have both options available.

The cost of the program is based on what league they will play in. I currently have a select list where they select their league and a code is transmitted to the database.

Here's a typical select list for this purpose (called pl1_league):

0;Select;
0;COED:  T-Ball - (5 & 6 year old boys & girls);Tb
0;BOYS:  Mgr Pitch - (7 & 8 year old boys);Mp
0;BOYS:  Minors - (9 & 10 year old boys);Mi
0;BOYS:  Majors - (11 & 12 year old boys);Ma
0;BOYS:  Pony - (13 & 14 year old boys);Po
0;BOYS:  Colt - (15 - 17 year old boys);Co
0;GIRLS: Jr.Softball only (6 - 10 year old girls);Jr
0;GIRLS: Jr.Softball & 10u FP (ages 10u - girls);Both
0;GIRLS: 10u FP only (10 & under girls);10u
0;GIRLS: 12u FP (12 & under girls);12u 
0;GIRLS: 15u FP (15 & under girls);15u


Here are the corresponding prices (I don't have these integrated into the form anywhere, they are displayed in a jooomla module next to the form):

Tb = $40
Po and Co = $90
All others = $80

To compound matters we offer a $10 discount for multiple registrations (so the first registrant would be at the prices above, but each subsequent registration would be $10 less for each additional registrant). For the select list on players 2-6, I am using different codes to designate that they are the additional registrants (using an underscore on the end of the code, so "Tb" for pl1 becomes "Tb_" for pl2 through pl6, I just don't know how to tie a figure to the codes. I'm guessing the logic would be something like "if pl1_league = Tb, value = 40," etc, but I have no idea how to write this (syntax) or where to put it.

Potentially, I could have 6 amounts that need to be referenced based on selection, added together, displayed on the summary page and submitted to Paypal.

This payment part is the last piece I need to figure out for a Feb 1 launch. Help!

Form is in Quickmode, 1.7.0 build 726
  • cebby
  • OFFLINE
  • Senior Boarder
  • Posts: 63
  • Karma: 1
Last Edit: 2 years, 3 months ago by cebby.

Re:Multiple player registration form - payments 2 years, 3 months ago #11703

Added the patch enabling php hoping this might be the key to making this work?
  • cebby
  • OFFLINE
  • Senior Boarder
  • Posts: 63
  • Karma: 1

Re:Multiple player registration form - payments 2 years, 3 months ago #11745

OK, I'm trying this solution as a work around:

crosstec.de/forums/15-usage/9766-solved-...6&start=12#11744

How do I pass the "amount owing" to Paypal? (I'm assuming that PayPalSelect won't work since I need 6 amounts summed and passed to Paypal)
  • cebby
  • OFFLINE
  • Senior Boarder
  • Posts: 63
  • Karma: 1

Re:Multiple player registration form - payments 2 years, 3 months ago #11770

Hi,

a hidden input with the name PayPalSelect is the best option.

What you need to do is just sum the amounts and pass it to that hidden input in that way:

ff_getElementByName('PayPalSelect').value = 'Itemname|1|'+sum+'|0';


If you want to have the names of the selected options included, you can split the name for each amount and add the name like this

ff_getElementByName('PayPalSelect').value = name1 + '+' + name2 + '|1|'+sum+'|0';



So this would show like "Product1 + Product2" in the PayPal payment screen.

Regards,
Markus
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
===============================================

Re:Multiple player registration form - payments 2 years, 3 months ago #11772

Where do I assign the values to the names? For example, in my select list if someone selects "T-Ball" for the first player, the cost is $40. It seems there is some interim step I need to take (?). Forgive my inexperience.

Do I need to have a bunch of hidden fields that assign values to every option?

In a hidden field (and so on for all of 6 my select lists):
ff_getElementByName('pl1_league').value = 'Tb'|'40'; 'Mp'|'80'; 'Mi'|'80'; 'Ma'|80; 'Po'|90; 'Co'|'90'; 'Jr'|'80'; 'Both'|'80'; '10u'|'80'; '12u'|'80'; '15u'|'80';


I'm sure the syntax must be different...
  • cebby
  • OFFLINE
  • Senior Boarder
  • Posts: 63
  • Karma: 1
Last Edit: 2 years, 3 months ago by cebby.

Re:Multiple player registration form - payments 2 years, 3 months ago #11773

Then following where those values are assigned, is that where I can use the code you described (I like the second one so I can pass the descriptions of their selections)

Using this example ->
ff_getElementByName('PayPalSelect').value = name1 + '+' + name2 + '|1|'+sum+'|0';


Then my corresponding code would be (?) ->
ff_getElementByName('PayPalSelect').value = pl1_league + '+' + pl2_league + '+' + pl3_league + '+' + pl4_league + '+' + pl5_league + '+' + pl6_league + '|1|'+sum+'|0';
  • cebby
  • OFFLINE
  • Senior Boarder
  • Posts: 63
  • Karma: 1
Moderators: TheMuffinMan, ForumSupport
Time to create page: 0.51 seconds

Facebook Discount - 40% Off!

Fans of our Facebook page here are entitled to get a 1-year-subscription for the price of a 6-months!

Steps to take:

  • Become a fan on Facebook (Like) here
  • Purchase a 6-months-subscription from here
  • Write a quick email to This email address is being protected from spambots. You need JavaScript enabled to view it. with your username and prove of your like and we'll upgrade to the 1-year-subscription

Joomla!® Forms Discount - 40% Off!

Already purchased a forms extension from a different vendor but your requirements changed and now you need a forms extension that is capable of more than just the standards? We help you to keep the costs for a change under control: Get a 40% discount on our professional membership plan! -- meaning timely unlimited access to all current and future commercial extensions, breezingforms themes & apps and Joomla!® templates at crosstec.de, including 1 year of support -- without any website limitations -- Just prove that you previously purchased another forms extension for Joomla!® from a different vendor and you are qualified.

Steps to take:

  • Purchase a 1-year-subscription from here
  • Write a quick email to This email address is being protected from spambots. You need JavaScript enabled to view it. with your username and prove of the purchase for the other form vendor and we'll upgrade to the professional-subscription

About

Crosstec GmbH & Co. KG

Bergisch-Gladbacher-Str. 829

51069 Cologne, Germany

Imprint