How to set a default quantity in Purchase Order?

  • kmankuan
    Asked on January 14, 2018 at 11:02 PM

    Hello, can you guide me how I can set quantity 1 for this widget?

    Jotform Thread 1349120 Screenshot
  • Nik_C
    Replied on January 15, 2018 at 6:13 AM

    I checked your form and that product is set with quantity one:

    1516014595Screen Shot 2018 01 15 at 12 Screenshot 10

    Do you still have the problem with this product?



  • kmankuan
    Replied on January 15, 2018 at 9:04 AM

    Hello, I mean when start the form and choose any of the product, by default appear 1, not white space, so if I have 10 options in the products, I do not need click 20 times to add all options, because now I have to click dropdown(1 time), click choosing 1(2 times). 

    1516024863jotformq10 Screenshot 10

  • Nik_C
    Replied on January 15, 2018 at 11:57 AM

    Thank you for additional information.

    That should work like that, but since you enabled "Create Sub Products from Options" 

    1516034944Screen Shot 2018 01 15 at 5 Screenshot 10

    If you disable that option then the quantity will work as intended.

    Also, if I may, what is the purpose of quantity if they are all selected by default and the only option is 1?

  • kmankuan
    Replied on January 15, 2018 at 4:13 PM

    Hi, because one option iqual one book, my client 100% will buy 1 for their kid, each grade of the school will have around 10 books.

    I try with the text box option, but not work, can you take a test and help me to achive it?

  • Kevin Support Team Lead
    Replied on January 15, 2018 at 5:41 PM

    I think it will not be possible to have a default quantity selected by default while the "Create sub products from options" and "Special pricing per option" are enabled on the product, this because having such option with a default quantity will automatically charge the customer when he selects such product and he would not be aware of that (purchasing all the sub products even when he does not want all of them). 

    Now, having the quantities options empty allows the user to select the sub products he/she wants only.

    If you disable the options above mentioned then it will indeed have the default quantity selected by default, this works since the the customer is charged for one product only and he selects the product he wants to purchase: 

    How to set a default quantity in Purchase Order? Image 10

    I hope this helps. 


  • kmankuan
    Replied on January 15, 2018 at 8:11 PM

    this because having such option with a default quantity will automatically charge the customer when he selects such product and he would not be aware of that (purchasing all the sub products even when he does not want all of them). 

     

    default quantity will automatically charge the customer when he selects such product "This is I want to do in this case, "

    Because in there my customer will tell me, or he/she will put to 0 or nothing if not want to take some option, but in my special case mayority customers will take all to buy(so here, each produc have around 11 options are books items, and I have to click 22 times for each customers), in the scene if not want to buy all options, they will tell us do not want to buy some items, here I only take change of some options, 1 to 0, I hope you can understand me. Here will not appear scene like you say "purchasing all the sub products even when he does not want all of them"

    please help me to accomplish this issue.

  • Jed_C
    Replied on January 15, 2018 at 10:33 PM

    Thanks for the response.

    Like what my colleagues mentioned in their previous post, it is currently not possible to set a default value if "Create sub products from options" and "Special pricing per option" is enabled.

    You will have to disable this option and create a separate item for each sub-product if you want to assign a default value. Also, you are currently using the new layout which doesn't allow you to export the form's source code. If you really want to set it to default, you will need to change your form layout to the "All questions in one page" then export your form's source code.

    15160732581513041848ChangeFormLayout Screenshot 10

    Once you have the full source code, you can set a static value by editing the source code. Add the selected value to make the option set as default using the form's source.

    1516074126set selected Screenshot 21

    Sample screencast:

    1516074401default selected Screenshot 32

    Again, that can only be possible if you download your form's source. I hope this helps. Let us know if you have any questions.

  • kmankuan
    Replied on January 18, 2018 at 5:15 PM

    Hello, thanks, that can resolve my problem.....I think Jotform team are still the best guys...

    Cheers

  • kmankuan
    Replied on January 18, 2018 at 5:36 PM

     One thing more, some code I shoud use(I am not coder, is possible guide me to do that) to add total counter field and selected items counter field to Product in my form? 

    1516315033jotformq11 Screenshot 10

  • Kevin Support Team Lead
    Replied on January 18, 2018 at 6:24 PM

    I have been testing this and I think it's possible to do that, but you will need to need some JavaScript code in order to get a total quantity of selected products, the code seems to need a bit of work so I would recommend you to hire someone that may help you with this instead, you may find someone on Upwork

    Alternatively, you may change the current way how you have your products and use basic fields instead to display the products as well as the quantities, then perform the calculations to get the total and pass it to the payment field, this will also help you to set the default quantity selected.

    These guides  will help you performing the calculations to get the total and achieve what you want on your last reply: 

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

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

    https://www.jotform.com/help/275-How-to-Pass-a-Calculation-to-a-Payment-Field

    I hope this helps.