Viewing 15 replies - 31 through 45 (of 95 total)
  • Thread Starter kmg454

    (@kmg454)

    Hi thats exact what we want

    Thread Starter kmg454

    (@kmg454)

    Hi Jan.

    You must be crazy already about all my questions, but is there a way to manipulate the data picker that is shows only Saturdays for booking an cottage.

    I know in the dashboard we have that option but that’s for all objects if you added a week price in the list.
    I won’t add week prices because we have only day prices, we just want the data picker to show only Saturday to Saturday for booking a cottage not for camper/tent.

    I tried to do this with Jquery

    $(“#start_date”).datepicker({
    beforeShowDay: function(date) {
    return [date.getDay() == 6];
    }
    })?????;?

    But thats not working so i was thinking maybe it’s possible to send something like booking_type=week along with the url.

    Plugin Contributor Jan Maat

    (@jan-maat)

    Hi,

    You keep me busy but no problem.
    Working on the datepicker beforeShowDay will not work because I use this already to control the datepicker.
    But I think there is another way to achieve your goal.

    In the settings page set “show day prices” and unset “show week prices”
    Set the week booking and select the checkin and checkout day.

    Now in javascript you hide the booking_type field (id=booking_type) and set the value to “day”.
    Make an on change function on the booking field (is the name of the accommodation with the id booking)
    Check in this function the value of this field and if it is your cottage change the booking_type value to week.
    This will do the job.

    Regards,

    Jan

    Thread Starter kmg454

    (@kmg454)

    I have a separate form for every object to book, so I have a form with starts with [booking Gite] n.b. Gite is a Cottage

    Have set only day prices and activate the Saturday for booking days

    But I am in Hotel mode so there is no field to make a onchange function

    Plugin Contributor Jan Maat

    (@jan-maat)

    Hi,

    In this case you do not need the on change function. At the document ready check on which form you are (may be you need to add a hidden field for this)
    and change the booking_type.

    By the way in the next release I will added the checkin/checkout check validation in the amount function.

    Regards,

    Jan

    Thread Starter kmg454

    (@kmg454)

    Hi.

    I do understand that but how do i let the form know the booking_type=week and not day while loading.

    Add a hidden field does nothing before sending the form.

    Plugin Contributor Jan Maat

    (@jan-maat)

    Hi,

    Is each form on its own page? If so you can add in your page
    <input type="hidden" name="type" value="cottage">
    Within your script (ad document ready so when the page is loaded the javascript is executed) you read the value cottage and change the booking type.

    If there are more forms on the same page then there is a plugin https://www.ads-software.com/plugins/contact-form-7-modules/ to add a hidden field to CTF7

    Regards,

    Jan

    Thread Starter kmg454

    (@kmg454)

    Hi Jan.

    I got it working now but you have to set show week prices also because otherwise the script does not know the value of the week prices when you forced the booking_type to week.

    Plugin Contributor Jan Maat

    (@jan-maat)

    Hi,

    I remove this restriction in the next release. For that I added an extra option “Day Booking”.
    At update this option takes the value of the option “Show Day Prices”

    In this way there is a more flexible way of setting options.

    Regards,

    Jan

    Thread Starter kmg454

    (@kmg454)

    Hi Jan.

    If you add the checkin/checkout check validation in the amount function maybe you can build in a price check also. If there is no price in the price list for that period then gave a message booking in this period not possible. So you create an option to disable some periods for booking on a simple way.

    Plugin Contributor Jan Maat

    (@jan-maat)

    Hi,

    Once price info is added this price info will always be valid till it is overwriten by new price info.

    So the proposed check is not valid.

    Regards,

    Jan

    Thread Starter kmg454

    (@kmg454)

    When i booked a period where i didn’t fill a price and make the choice of persons, it come back with a price of € 0.00. If this price is € 0.00 it was not a valid booking.

    Example. booking for the campground will start at Juli but on the date picker i can also book April but I didn’t fill in a price for April so the checkin/checkout validation comes back with € 0.00.

    If this is zero you can sent the message not valid, or am i wrong.

    Plugin Contributor Jan Maat

    (@jan-maat)

    Hi,

    This is because your price for Juli is the first price in the database. If there is a history of prices in the database the price with the last date will be valid.
    I look if a check on zero may be possible

    Regards,

    Jan

    Plugin Contributor Jan Maat

    (@jan-maat)

    Hi,

    On my ToDo list is also to block blocked months in the datepicker. I prefer to go that way.

    regards,

    Jan

    Plugin Contributor Jan Maat

    (@jan-maat)

    Hi,

    I just released version 1.6.1

    Regards,

    Jan

Viewing 15 replies - 31 through 45 (of 95 total)
  • The topic ‘How to handle more properties’ is closed to new replies.