Sales Question?
Welcome, Guest

PayPal calculate amount based on selection
(1 viewing) (1) Guest

TOPIC: PayPal calculate amount based on selection

Re:PayPal calculate amount based on selection 3 years, 5 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)
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
===============================================

Re:PayPal calculate amount based on selection 3 years, 5 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:
error-20091214.png
Attachments:
  • spencelk
  • OFFLINE
  • Senior Boarder
  • Posts: 78
  • Karma: 0
Last Edit: 3 years, 5 months ago by spencelk.

Re:PayPal calculate amount based on selection 3 years, 5 months ago #10586

remove that first line that says

$this->execPieceByName('ff_InitLib');

It is for pieces, not scripts.
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
===============================================

Re:PayPal calculate amount based on selection 3 years, 5 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
  • OFFLINE
  • Senior Boarder
  • Posts: 78
  • Karma: 0

Re:PayPal calculate amount based on selection 3 years, 5 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.
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
===============================================

Re:PayPal calculate amount based on selection 3 years, 5 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
  • OFFLINE
  • Senior Boarder
  • Posts: 78
  • Karma: 0
Moderators: TheMuffinMan, ForumSupport
Time to create page: 0.42 seconds

Flatrate Membership: Professional Subscription

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

Get it from here

Recurring Customer Discount - 50% Off!

Get a 50% discount on our Professional Subscription if you have been purchasing a subscription from us in the past -- no matter when. The Professional Subscription includes all of our current and future Joomla!® extensions, WordPress® plugins and Joomla!® templates.

How to receive the discount:

  • Purchase a basic 1-Year Subscription from here.
  • Send us a quick email to This email address is being protected from spambots. You need JavaScript enabled to view it. with your username and proof of your old purchase.
  • We will then upgrade your account to the Professional Subscription.

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 Basic or Professional 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