Show the same price in calendar and form reservations

Hello:

Thanks in advance for your help.
In my case I want to bring my client the option to show price provided for 2 people / per day.
That’s no problem in the form and in the search avaliability pages. You have made ‚Äč‚Äčthis option to configure. with very good reason.
But my problem is when I want to show the price in calendars. The price shown on the calendar for 1 person / 1 nigt.

I would like to know how I can change this option to show the price for 2 persons-
Please take a look here http://awesomescreenshot.com/06c1law0a7
Thanks for your help.
Best regards
Pedro

Open lib/functions/both.php (or admin.php if you use the beta) and search for “easyreservations_send_calendar_callback” and in it “new Reservation”. In that array you can find the key adults and set it’s value to 2.
Regards

Open lib/functions/both.php (or admin.php if you use the beta) and search for “easyreservations_send_calendar_callback” and in it “new Reservation”. In that array you can find the key adults and set it’s value to 2.
Regards

Thanks. It works fine.

Hello I can’t find
“easyreservations_send_calendar_callback” to change this again.
Could you help me again?
Thanks

lib/functions/ajax.php
Regards

Hello.
I do not find how to change the calendar again to show the price for 2 people (adults) by default.
In this new version have changed the location of that line.
could you tells exactly the file, line and value that I must to change to show the prices for 2 adults in calendars?
thanks
regards

/lib/functions/ajax.php line 126 in the latest beta.
Regards

Hello, this line 126:

$res = new Reservation(false, array('email' => 'mail@test.com', 'arrival' => $dateofeachday+43200, 'departure' => $dateofeachday, 'resource' => (int) $_POST['room'], 'adults' => $pers, 'childs' => $child,'reservated' => time()-($resev*86400)), false);

But I found this lines in the same file:

233 if(isset($_POST['persons'])) $persons=$_POST['persons'];
234 else $persons = 1;


509 if(!empty($_POST['persons'])) $persons = $_POST['persons'];
510 else $persons = 1;

I’d appreciate it if you wrote me the correct line of code. I don’t want the change could affect affect the proper calculation of the price.

Regards
Pedro

It’s 126 as I said. Change the value of adults.
Regards

Like this?

$res = new Reservation(false, array('email' => 'mail@test.com', 'arrival' => $dateofeachday+43200, 'departure' => $dateofeachday, 'resource' => (int) $_POST['room'], 'adults' => 2, 'childs' => $child,'reservated' => time()-($resev*86400)), false);

Yes.
Regards

Thanks.
The problem with that solution you suggest is that It changes all the calendars, including Resource price settings area where you test if the rates are correct becaouse neve can see the price for 1 adult.
Not a good idea to add a parameter en calendar easy code like the form, to establish the number of adults?
Right now when you add a calendar and a form on the same page, the picker calendar days also affects the day selector form and vice versa.
is it not possible that when you change the number of adults in web form also change the price of the rooms shown in the calendar view?

Regards
Pedro

It’s not impossible. You would have to request a new calendar every time the adults changes and send the information with it. So there’s some knowledge required.
Regards

Sorry, I have not much knowledge of web programming.
I am a graphic designer.
I think the functionality of prices change in the calendar as the number people would be good for the user does not take a surprise about the price. Maybe in the next beta?

Regards

You must be logged in to reply in this thread.

Not Resolved
16 posts