Welcome, Guest

TOPIC: PayPal calculate amount based on selection

Re:PayPal calculate amount based on selection 4 years 10 months ago #10556

Thats why I asked on what "action" you would like to fill the hidden input? On submit I guess?
If yes, then you could put that into the ff_validate_submit function (see "Scripts" library and that validation's details)
  • TheMuffinMan
  • TheMuffinMan's Avatar
  • OFFLINE
  • Moderator
  • Posts: 6401
  • Thank you received: 424
  • Karma: 92
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
===============================================
The administrator has disabled public write access.
The following user(s) said Thank You: wartime

Re:PayPal calculate amount based on selection 4 years 10 months ago #10566

When I enter this code into begin submit:
$this->execPieceByName('ff_InitLib');

function paypalSetAmountValue(){

if (ff_getElementByName('addVenue1').checked) {
  ff_getElementByName("PayPalSelect").value = 'productName|Two(2) Venues plus p&h|469.95|0';
  }
  
else  {
  ff_getElementByName("PayPalSelect").value = 'productName|One(1) Venue plus p&h|244.95|0';
  }
}

I get this error:
Attachments:
  • spencelk
  • spencelk's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 78
  • Thank you received: 9
  • Karma: 0
Last Edit: 4 years 10 months ago by spencelk.
The administrator has disabled public write access.
The following user(s) said Thank You: wartime

Re:PayPal calculate amount based on selection 4 years 10 months ago #10586

remove that first line that says

$this->execPieceByName('ff_InitLib');

It is for pieces, not scripts.
  • TheMuffinMan
  • TheMuffinMan's Avatar
  • OFFLINE
  • Moderator
  • Posts: 6401
  • Thank you received: 424
  • Karma: 92
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
===============================================
The administrator has disabled public write access.
The following user(s) said Thank You: wartime

Re:PayPal calculate amount based on selection 4 years 10 months ago #10596

I tried that still the same error. That is when I added that line hoping it would help. where should I be placing the code? right now it is under submit pieces>>begin submit.
  • spencelk
  • spencelk's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 78
  • Thank you received: 9
  • Karma: 0
The administrator has disabled public write access.
The following user(s) said Thank You: wartime

Re:PayPal calculate amount based on selection 4 years 10 months ago #10597

thats wrong, it should go into Scripts "initialization script" since it is javascript. Pieces are php only.

Then you can use that in your custom validations etc.
  • TheMuffinMan
  • TheMuffinMan's Avatar
  • OFFLINE
  • Moderator
  • Posts: 6401
  • Thank you received: 424
  • Karma: 92
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
===============================================
The administrator has disabled public write access.
The following user(s) said Thank You: wartime

Re:PayPal calculate amount based on selection 4 years 10 months ago #10598

I'm not sure I fully understand. I put the js code in advanced options>scripts>initialization scripts but then also in custom validations?

I have tried putting it in both places as well as each separately. I am no longer getting an error it just doesn't do anything. I also tried placing it within the PayPalSelect intscript that did not work nor did the values of my summary fields display.

I appreciate all of your help with this. I hope we can get this working.
  • spencelk
  • spencelk's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 78
  • Thank you received: 9
  • Karma: 0
The administrator has disabled public write access.
The following user(s) said Thank You: wartime
Moderators: ForumSupport, lennerd, pedro81, JanZ
Time to create page: 0.125 seconds
Powered by Kunena Forum :: Joomlana_Dark-by- bz_kunena-templates

Our Discounts



Lifetime Subscription

Get lifetime access to all of our products and 2 years of professional support -- for just $199 USD. No limits on domains!. Includes all of our current and future Joomla!® extensions, WordPress® plugin, Joomla!® templates and WordPress® themes -- all of our products!

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 1-Year or Lifetime Subscription plans.

How to receive the discount:

  • Send us a quick email to This email address is being protected from spambots. You need JavaScript enabled to view it. with a proof of purchase (for example a paypal receipt).
  • Await payment instructions and enjoy your membership!

About

Crosstec GmbH & Co. KG

Hohenzollernring 57

50672 Cologne, Germany

Imprint


Live Chat Software