How can I conditionally show different products based on users selections and still collect payments

  • Profile Image
    christhouas
    Asked on April 04, 2017 at 11:43 AM

    Hello,

     

    I am wondering if there is was to have a specific price appear based on the customers selected options. Right now when a customer fills in the form it displays the "Approximate Price" but the customer cannot pay directly on the form, I need to manually send the a PayPal Invoice afterwards. I am looking at eliminating this process by allowing customers to make a payment directly on the form based on their selections. Note: I use PayPal business account, and ideally would like to integrate PayPal as the payment method.

    Ex.

    If Option 1 = A

    If Option 2 = E

    If Option 3 = C

    Then Total = X amount of $

     

    Thank you,

  • Profile Image
    david
    Answered on April 04, 2017 at 01:59 PM

    Yes it is possible to achieve your requirement. Here are the steps you should follow:

     

    Instead of displaying the options in the PayPal question, you can add the products using a check box question and assign those options calculation values:

     

    https://www.jotform.com/help/301-How-to-Assign-Calculation-Value

     

    Add a "Form Calculation" widget in your form to calculate the total amount of all selected options:

     

    https://www.jotform.com/help/259-How-to-Perform-Form-Calculation-Using-a-Widget

     

    Add PayPal payment question in your form and set it to read the amount from the calculation widget. The following guide should help you how to pass calculation to PayPal payment question:  http://www.jotform.com/help/275-How-to-pass-a-calculation-to-a-payment-field

    With this setup, you can then conditionally show/hide the fields you would like:

    https://www.jotform.com/help/57-Smart-Forms-Using-Conditional-Logic

    Since conditions cannot be applied to products within the payment field, this setup gives much more flexibility.

  • Profile Image
    christhouas
    Answered on April 04, 2017 at 04:21 PM

    Thank you for your reply David, you put me on the right track. However I am now experiencing a new issue.

    The issue I am having now is that the calculation does not reset itself if I were to modify one of the options.

    Ex:

    (Drop Down 1) option A = +1$

    (Drop Down 2) option A = +2$

    (drop Down 3) option A = +3$

    Calculation Total = 6$

    Now if I were to simply modify "Drop Down 2" and select say "Option B = +4$". Instead of replacing the +2$ with the +4$ it adds both amounts in my total. Resulting in something like this:

    Ex:

    (Drop Down 1) option A = +1$

    (Drop Down 2) option A = +2$

    (Drop Down 2) option B = +4$

    (drop Down 3) option A = +3$

    Calculation Total = 10$

     

    I'm sure it's an easy fix, and simply an error on my end.

  • Profile Image
    david
    Answered on April 04, 2017 at 05:43 PM

    It seems you have another thread open for the new question already:

    https://www.jotform.com/answers/1111258-Calculation-error

    We will follow up with that question in your other thread shortly.