Calculating total and subtotal without the product list of the payment integration

  • CupcakinBakeShop
    Asked on June 15, 2020 at 10:16 AM

    Hi!  I want to integrate my form with square 

    Can you please give me a little help with figuring out how to use the quantity/item fields I've created to create a subtotal at the bottom and integrate payment? I don't want to use the "My products" lists that it populates because it doesn't allow us to include fields for all the information we need to place the order (flavor, extra field for decor up charge, etc.)

    For example, I want the quantity to multiply by the price of the item in the list, plus a possible decor up charge, to equal the subtotal.  Then a possible second, third, and fourth item section that does the same thing.  And then at the bottom of the form, a grand total plus the square integration.  Is this possible?

    Thanks in advance for your help!

  • Anita_K
    Replied on June 15, 2020 at 11:22 AM

    Hi,

    thank you for reaching out to us. If I understand correctly you would like to calculate the total and subtotal prices without the help of the payment integration, so that you have more control over it. Is that correct?

    If so, this can be done using Calculation Widgets and then passing the value to the Payment Integration.

    For example, in your case, you will need to change all the Subtotal Fields from Simple Text Fields to Form Calculation Widgets.

    Here you can enter the right formula depending on your pricing. For example Product price * quantity.

    You can assign the prices as Calculation Values.

    Your Total Field should be a Calculation Widget too, with a formula that adds all previous Subtotal Fields together plus any extra, like the decor.

    I have made a demo form for you which you can try out and you can also clone it to see the calculations inside and understand this better.

    I hope this helps, please let us know if you have any further questions.

  • CupcakinBakeShop
    Replied on June 23, 2020 at 1:03 AM

    Thank you, this was super helpful.  Can you tell me how to create a payment integration with the layout that I have, without having to create an additional item list?  Whenever I select the Square integration, it wants me to create a product/item list too, which I don't need.  Also, how can I change the number format in the subtotal and total fields so that they are currency?

  • CupcakinBakeShop
    Replied on June 23, 2020 at 1:13 AM

    Also, how can I change the number format in the subtotal and total fields so that they are currency?

  • Sonnyfer JotForm Support
    Replied on June 23, 2020 at 3:04 AM

    Can you tell me how to create a payment integration with the layout that I have, without having to create an additional item list?  Whenever I select the Square integration, it wants me to create a product/item list too, which I don't need. 

    You can pass the calculation value to Square by selecting User Defined Amount from the Payment Type.

    1592895289passd Screenshot 10

    Guide: How-to-Pass-a-Calculation-to-a-Payment-Field 

    Also, how can I change the number format in the subtotal and total fields so that they are currency?

    You can set a prefix in the Form Calculation Widget. Example:

    1592895812prefs Screenshot 21

    Result:

    1592895869dollarsds Screenshot 32

    If you need further assistance, please let us know.

  • CupcakinBakeShop
    Replied on June 23, 2020 at 10:18 AM

    Thank you so much!  What about changing a regular number field to currency format, one that doesn't have a calculation?

    Also, in the integration section, is it possible to make the field followed by USD wider so that the whole grand total is visible? 

  • Richie JotForm Support
    Replied on June 23, 2020 at 10:56 AM

    What about changing a regular number field to currency format, one that doesn't have a calculation?

    To clarify, are you referring to the field to be used in the user defined amount?

    Unfortunately, you may only use the form calculation widget to pass the data to the payment field.

    Calculating total and subtotal without the product list of the payment integration Image 10


    Also, in the integration section, is it possible to make the field followed by USD wider so that the whole grand total is visible?

    To clarify, are you referring to the total payment field?


    Calculating total and subtotal without the product list of the payment integration Image 21

    You may use custom CSS to change the width of the field.

    #input_98_donation{

    width:70px;

    }

    Guide:https://www.jotform.com/help/117-How-to-Inject-Custom-CSS-Codes

    Please check it out and let us know if you have further questions.