Viewing 15 replies - 16 through 30 (of 95 total)
  • Thread Starter kmg454

    (@kmg454)

    Is it also possible to store the total_amount in the database?

    It is not so important because the totals are in the mail, but if possible it would be great.

    Plugin Contributor Jan Maat

    (@jan-maat)

    Hi,

    The values of the fields with the id total_amount and tax are stored in the database at the submit of the contact form.

    Regards,

    Jan

    Thread Starter kmg454

    (@kmg454)

    Hi.

    Is the value of days also available so we can calculate extra bed or tent by day price.

    Plugin Contributor Jan Maat

    (@jan-maat)

    Hi,
    This is more work and not so straightforward. One of the points to consider is the situation that the days cost values change between checkin and checkout. Only the value of the last day can be made available.
    If this is acceptable I will put the action on my ToDo list.

    Regards,

    Jan

    Thread Starter kmg454

    (@kmg454)

    Hi
    No this is a misunderstanding, what i want is the variable of the counter of days, example 5 days or 10 days so i can math the price for electricity per day.

    Plugin Contributor Jan Maat

    (@jan-maat)

    Hi,

    In this case you can calculate the counter of days in javascript or jquery. For an example see https://stackoverflow.com/questions/2609513/jquery-calculate-day-difference-in-2-date-textboxes

    Regards,

    Jan

    Thread Starter kmg454

    (@kmg454)

    Hi Jan.

    I have some problems counting the day’s, have this script in the header file of my theme

    <script type=”text/javascript”>
    function daycount(start_date,end_date){
    var start = $(‘start_date’).val();
    var end = $(‘end_date’).val();

    // end – start returns difference in milliseconds
    var diff = new Date(end – start);

    // get days
    var days = diff/1000/60/60/24;

    return days;
    }
    </script>


    And have this in contact form 7

    <input type=”button” value=”Klik hier” onclick=”this.form.dagen.value = daycount(this.form.start_date.value, this.form.end_date.value);”>

    But got no output. My knowledge of javascript is basic but I think i’m looking over something.

    Plugin Contributor Jan Maat

    (@jan-maat)

    Hi,

    Are you using jQuery or plain javascript?
    In jQuery the statement var start = $(‘start_date).val() should be var start = $(‘#start_date).val() (The same for var end.

    If you use plain javascript look at https://stackoverflow.com/questions/26216565/calculate-number-of-days-between-two-input-type-date-in-html

    Regards,

    Jan

    Thread Starter kmg454

    (@kmg454)

    Hi Jan.

    Thanks for the hints have everything working now just in plain javascript.

    Thread Starter kmg454

    (@kmg454)

    Hi.

    Everything seems to work fine now, except 1 thing, on the website we have bookings for tent/camper and a cottage.
    The cottage can be booked from April to September but the tent/camper from Juli to September. There is a possibility to block the winter months, so i blocked bookings before April.

    But now the tent/camper can also make bookings in April. Mei and Juni

    Is there any possibility to block these months individual for different bookings?

    Plugin Contributor Jan Maat

    (@jan-maat)

    Hi,

    Not at this moment. I put this request on my ToDo list.

    Regards,

    Jan

    Thread Starter kmg454

    (@kmg454)

    Hi.

    To solve this problem I booked the no booking dates by myself, but
    when these dates are booked and the calender shows them in Red, I still can choose these dates in the datepicker

    Plugin Contributor Jan Maat

    (@jan-maat)

    Hi,

    The datepicker runs on the client side while the booked dates are in the database on the server side and as such the datepicker has no knowledge about bookings. On the other hand the blocked months from the Settings pages are transferred to the client and available to the datepicker logic. This is possible because the blocked months are a small amount of data (an array of max 12 values). The bookings in the database have to much volume to be available at the client.
    As I already mentioned this subject is on my ToDo list to investigate how to have separate blocked months for each property.

    Regards,

    Jan

    Thread Starter kmg454

    (@kmg454)

    Hi.

    I do understand that blocked months on your todo list, but what my client want is check the availability of the object direct after use of the datepicker. Now you have to fill in the whole form and click submit to find out if the object is available. Maybe it’s possible to do this availability check when we click the number_of_persons.

    Plugin Contributor Jan Maat

    (@jan-maat)

    Hi,

    The way it may be done is to do the check in the price calculation. If the dates are not available the price information is replaced by a message that the room is not available.
    Will that be OK?

    Regards,

    Jan

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