Support » Fixing WordPress » Booking – Hotel for Pets

  • Lara C

    (@larissacas)


    Hi, everyone.

    OBS: I didn’t start developing this project yet.

    A client is asking me to do some automation for her business processes. She owns a hotel for cats, and need to have a calculator for the reservation form.

    Because the price decrease as the number of cats increases. And the number of days to.
    So she has 12 price tables, and for sure it’s a mess with her clients, to explain all the values.

    The difference is:

    1 cat
    2 cats
    3 cats
    4 or more cats.

    up to 15 days
    16 until 29 days
    30 days or more.

    The reservation isn’t made like in booking.com, because she needs to valuate the information about the pets.

    So, it’s just for people who is interested to know about the final price before getting in touch with her. And then when they submit the form, she will already know how many cats, how many days, dates, if it’s need to have cat food or not (the owner of the cat can leave the food or not), and other informations.

    I’m trying to search if there’s something but didn’t find.

    Can someone help?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    For the cost, have a form where the user enters the cat and day count. Add a JavaScript event listener to each field that recalculates the cost anytime either field changes. The event callback calculates by whatever formula, algorithm, and logic as required to get what the total cost is. Even if there is no discernible logic to the pricing structure, you could create a multi-dimensional array of cost data that enumerates costs for all the possible variables — essentially a lookup table.

    If the idea is the visitor is merely requesting a range of dates, that would just be another field whose value is sent with the other data in an email to the owner. If the visitor is intended to make reservations based on availability like most booking sites do, you will want to locate some sort of booking plugin. There’s a lot involved in such a feature, beyond the abilities of many. Of those that are capable, the vast majority would rather utilize an off the shelf solution than try to custom code their own solution.

    @bcworkz Which form? I’m trying to use Calculated Field Forms, but it returns error when I apply the function code, for conditions “if”.

    Any idea?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Booking – Hotel for Pets’ is closed to new replies.