Calculate boarding costs where more than one cat boarding reduces the price

  • mandraek
    Asked on June 10, 2015 at 3:36 PM

    I hope someone can help with this? I have x3 differently priced rooms for cats, and if more than one cat is boarded then the boarding price drops, I also have to take into account the numbers of days they will stay

     

    basic calculation is roomtype x number of days x number of cats (where x1 cat is £10.50/day, x2 cat is
    £19.50 etc)

    rates are here http://www.topcatntails.com/tariff.html

    I cant figure out how to assign the multiple cat price reduction into the equation... :(

     

     

    Many thanks

  • Ben
    Replied on June 10, 2015 at 4:52 PM

    Based on the prices above:

    £10.50/day, x2 cat is
    £19.50 etc)

    and the text on the link you have mentioned (http://www.topcatntails.com/tariff.html):

    1 cat - 20% discount
    2 cats - 1 cat is half price
    3 cats - only pay for 2 cats

    It seems to me that the price for one cat is £13 per day.

    If that is correct, these would be the final prices per day:

    10.50 (with 20% off)
    19.50 (with second cat at 50% off)
    26.00 (with third cat for free and first two at full price)

    Now, I took a look at your form as well, but I do not see any form calculation widget that would be calculating this, so I presume that you have not added it.

    Now as you have several other fields on your jotform, I always suggest setting the form with all the fields that you might need and then letting us know so that we can properly assist you with solution that is not required to change right away.

    If not, then all you need is:

    1. a Form Calculation widget
    2. a simple setup of calculation values: How to Assign Calculation Value

    In the calculation values, all that you would need to add is this:

    10.50
    19.50
    26.00

    Do let us know how it goes..

  • mandraek
    Replied on June 10, 2015 at 5:10 PM

    Thanks for your suggestions Ben, I have now put the widget in but my problem is that the room type doesnt have a value attached, and it can be one of two different set of prices

    Calculate boarding costs where more than one cat boarding reduces the price Image 1 Screenshot 20

    rate 1 is:
    Rate per day
    £10.50 x1 cat
    £19.50 x2 cat
    £27.50 x3 cat
    £36.50 x4 cat
     
    and rate 2 is:
    Rate per day
    £9.85 x1 cat
    £17.85 x2 cat
    £25.50 x3 cat
    £34.50 x4 cat
     
    please disregard the discount prices mentioned
     
    Hope this makes sense
     
    Maybe the only way is to create two calculations, and the choice of radio button could then control which calculation was seen?
     
  • Ben
    Replied on June 10, 2015 at 5:30 PM

    Great :)

    I am however trying to find the common / factor that I could use in the calculation, but I do not see any that can be used to form the prices - maybe I am missing it?

    Basically what I would do is following:

    I) Use conditions to show the Number of cats to board field with the right prices, based on the room type - which means that the same conditions applied to one would need to be applied for the second dropdown with the OR calculation clause ( How to Find The OR operator in conditions? )

    II) Have a factor that I can use to change the price based on the number of cats and the type of the room.

    I think that the first option would be the easiest to set up if you are not too familiar with JotForm, but we can assist you with either of the two if so needed.

    What room(s) gets rate 1 and which one(s) rate 2?

  • mandraek
    Replied on June 10, 2015 at 5:36 PM

    Cottage & Studios are rate 1,Indoor Rooms rate 2

     

    I think you are right about prices :(

  • Ben
    Replied on June 10, 2015 at 6:11 PM

    OK, thank you.

    So what I did was to clone your jotform and made the following changes:

    1. duplicated the dropdown field Number of cats to board and its conditions ( How to Manage Multiple Fields )
    2. Set the next Calculation Values under the first dropdown field (How to Assign Calculation Value):

    1
    10.50
    19.50
    27.50
    36.50

    3. Set the following Calculation Values under the second (new) dropdown field:

    1
    9.85
    17.85
    25.50
    34.50

    4. Added the new field into the Form Calculation widget
    5. Removed the field for room type from Form Calculation (we do not need it any more)
    6. Set the conditions to show the right field at the right time.

    This is how it looks: http://form.jotformpro.com/form/51606795735970

    Now there are few things to consider and those are that if we add 1 as the first number, we would be able to properly multiply the values, but might end up with the number of days as the cost. On the other hand, if we set it to 0 instead, we would get 0 instead of any other value, and we could set up the conditions to hide the submit button until proper value is set (above 0).

    Both would be OK, I would just like to check with you about them at this point since it would make a difference if the field is not set as required (so just to keep it in mind).

    Do check and let us know if that is looking good and if there are any changes needed.

    You can also clone it to your account by following the steps here: How to Clone an Existing Form from a URL

  • mandraek
    Replied on June 12, 2015 at 2:12 PM

    Thanks for this form, it will be a great advantage