TOPIC:

Re:PayPal calculate amount based on selection 13 years 1 month ago #12339

  • aimlesslady
  • Offline
  • New Member
  • New Member
  • Registered
  • Posts: 5
  • Thanks: 2
I needed to do something similar and the folks at Crosstec were kind enough to help me so I will pass it on.I wanted to add 2 fields together and add the total to be passed on as the amount for the Paypal button submission.
Create a Hidden field called PayPalSelect.
Create a Summarize field to total the fields you want totaled. (I think there are videos that illustrate how to do both these tasks)
On the Summarize field, in the Advanced section in the Calculate box, put something like this:
value = (value + bfField("children");
ff_getElementByName("PayPalSelect").value = "registration|300|"+value+"|0";

'children' is the name of the field to add to whatever you connect with in the Properties section of the summarize field
'registration' is the item name of the paypal button
'300' is the item number of the paypal button
I hope this helps.
The following user(s) said Thank You: wartime

Please Log in or Create an account to join the conversation.

Re:PayPal calculate amount based on selection 13 years 1 month ago #12340

  • aimlesslady
  • Offline
  • New Member
  • New Member
  • Registered
  • Posts: 5
  • Thanks: 2
I needed to do something similar and the folks at Crosstec were kind enough to help me so I will pass it on.I wanted to add 2 fields together and add the total to be passed on as the amount for the Paypal button submission.
Create a Hidden field called PayPalSelect.
Create a Summarize field to total the fields you want totaled. (I think there are videos that illustrate how to do both these tasks)
On the Summarize field, in the Advanced section in the Calculate box, put something like this:
value = (value + bfField("children");
ff_getElementByName("PayPalSelect").value = "registration|300|"+value+"|0";

'children' is the name of the field to add to whatever you connect with in the Properties section of the summarize field
'registration' is the item name of the paypal button
'300' is the item number of the paypal button
I hope this helps.
The following user(s) said Thank You: wartime

Please Log in or Create an account to join the conversation.

Re: PayPal calculate amount based on selection 12 years 3 months ago #21981

  • multissimo
  • Offline
  • New Member
  • New Member
  • Registered
  • Posts: 16
  • Thanks: 2
Hey, I was looking for this hint for hours - but you just had a "(" too much after the "=", thats why your code did not work, until I found out why. it should just be like this:

value = value + bfField("children");
ff_getElementByName("PayPalSelect").value = "anytextyouwanttoappearinpaypal|1|"+value+"|0";
The following user(s) said Thank You: wartime

Please Log in or Create an account to join the conversation.

Re: PayPal calculate amount based on selection 10 years 11 months ago #72518

  • cnckevin
  • Offline
  • New Member
  • New Member
  • Registered
  • Posts: 6
  • Thanks: 1
I'm trying to have a simple drop down with prices, (ex: $25, $50, $100) and then pass that on to paypal but I"m striking out no matter what I try. I have looked at the forum and sample code but still managed to screw it up. I get a howmany error. What is the simnplest code to have a select list with pricing sent to paypal? What I would like to do is have the user select a price from a select list and then click the paypal button to pay.
The following user(s) said Thank You: wartime

Please Log in or Create an account to join the conversation.

Moderators: ForumSupport
Time to create page: 0.051 seconds

Support Chat

Join our Discord chat and enter the Crosstec channels for live-support, chat forums and interact directly with the community!

After joining, please enter the Crosstec Area and use the #crosstec-support or #crosstec-general channels.

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Subscribe to news and updates!

Special Offer

Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Live Support Chat Opened!

Join our Discord chat here and enter the Crosstec channels to receive live support and talk directly to the team!