Price calculation using conditional logic

  • Profile Image
    assistenzaclienti
    Asked on February 14, 2021 at 07:07 AM

    I refer to our draft form https://eu.jotform.com/build/210443213270036

    What I need is to calculate the total price ("prezzo)" when some products are selected in the widget (es: "emocromo, antibiogramma, VES".

    I used the conditional logic, but I see is not possible to increase the price for more than one product. What is the right formula, is not SUMMA?

    Also, whe i calculatethe field "prezzo", it is possible to transfer this value to PayPal, in order to ask the customer for the payment?

    Thanks.


  • Profile Image
    Jong_P
    Answered on February 14, 2021 at 09:00 AM

    Hi,

    I hope you do not take offence but I am having some difficulty in understanding what you wish to do. I can understand some parts but others I can't, for example, "I used the conditional logic, but I see is not possible to increase the price for more than one product. What is the right formula, is not SUMMA?".

    Since I see that your locale is in Italy, please know that you can also write to us in Italian, as we offer Italian language support. I am sure that you will feel more at ease communicating in Italian since your form is in Italian and also you might want to ask us more about problems in depth in the future.

    However, if you think that is too much to do at this time, please just explain a little bit more on the part I indicated above, which I said that I am having some difficulty in understanding.

    Please do not take offence from my request. It is just to assist you better in more efficient and time saving manner.

    Thank you for your kind understanding in advance and looking forward to hearing from you.

    Sincerely,

  • Profile Image
    assistenzaclienti
    Answered on February 14, 2021 at 02:58 PM

    Jong, what I mean is:

    in my draft form https://eu.jotform.com/build/210443213270036 I have a Widget Multi Selection. I added 3 options ("emocromo", "antibiogramma" "VES"). I want to use it to allow our customer to add the medical test they want to order.

    To define the price they have to pay, depending on the test they add, I created the field "prezzo" and I defined in the conditional logic some rules. For example, if the widget is "emocromo", "prezzo" is "20". But I need to add the prices in case the customer choose 2 or more tests, for example "prezzo" = 20 + 10. It's that possible? Or I may use the calculation widget? And what is the formula, in this case.

    Also, can I transferthe total, after calculation, to a PayPal integration, so that the customer can pay the relative amount, without having to choose again the products in the PayPal form?

    Thanks.

  • Profile Image
    Sigit_W
    Answered on February 14, 2021 at 09:30 PM

    Greetings,

    Kindly allow me some time to do some test.

    Regards.



  • Profile Image
    Sigit_W
    Answered on February 14, 2021 at 10:15 PM

    Hi,

    Thank you for your patience.

    Here's my cloned version of the form https://form.jotform.com/210448415883964

    Related guide: https://www.jotform.com/help/42-how-to-clone-an-existing-form-from-a-url

    Regarding "But I need to add the prices in case the customer choose 2 or more tests, for example "prezzo" = 20 + 10. It's that possible?"

    Yes, it is possible. Using Multiple Choice Form Element; Conditional Logic; and Calculation Widget.

    1613358875_6029e71bb7d12_

    1613358704_6029e670eb862_ Please make necessary changes to the Conditional Logic according to your needs.


    Regarding "Also, can I transfer the total, after calculation, to a PayPal integration, so that the customer can pay the relative amount, without having to choose again the products in the PayPal form?"

    Yes, it is possible, as shown in my cloned version above, where Test Prezzo value is passed to PayPal.

    1613358311_6029e4e73a062_

    Related guide: https://www.jotform.com/help/275-how-to-pass-a-calculation-to-a-payment-field

    Please give it a try, and let us know if you need further assistance.

    Regards.

  • Profile Image
    assistenzaclienti
    Answered on February 15, 2021 at 04:42 AM

    Thank you.

    In conditional logic, there is not a way to "add" a value to the item "price", when a condition is true? So, simply to increase the value, instead that define conditions for each combination of products...

  • Profile Image
    Rehan_F
    Answered on February 15, 2021 at 05:45 AM

    Greetings,

    Kindly accept my apologies but I don't quite understand your questions. Could you please ask it again in detail so we can further assist you.

    Thanks

  • Profile Image
    assistenzaclienti
    Answered on February 15, 2021 at 06:56 AM

    I see your collegue defined a lot of conditional rules to calculate the value of the item "prezzo".

    My question is if is possible to increase the value of "prezzo" by adding some products, instead of define a rule for each differemte combination of products.

  • Profile Image
    Jovanne_A
    Answered on February 15, 2021 at 07:43 AM

    Hi,

    Please note that the "prezzo" holds the sum of the products selected. If you want to add more products without using conditions, you may enable the use of Calculation Values and set the form calculation widget source to the "Test Opzioni" field.

    1613392792_602a6b989e73d_2.png

    1613392871_602a6be78335a_3.png

    You can check my demo form here: https://form.jotform.com/210453233542950.

    I hope this helps. Let us know if you have further questions?

  • Profile Image
    assistenzaclienti
    Answered on February 15, 2021 at 12:49 PM

    Thank you. Can I access the form https://form.jotform.com/210453233542950 in the "create" mode, so that I can check the changes you did in the fields?

  • Profile Image
    Jong_P
    Answered on February 15, 2021 at 04:23 PM

    Hi,

    In your accout, please go to: Create Form -> Import Form -> Form a Web Page

    After that, you will see the following box;

    1613424134_602ae606a2d6e_2021-02-16_6-19

    Then, you will be able to see the Cloned version of form my colleague has created for you.

    Please see the changes he made there in the Build.

    I hope my answer was helpful. Please let us know if you have further questions.

    Best,