Public booking
Brought to you by:
jberanek
Hi, great job on this code.
I'm making a few minor changes, but I need your help on this.
I'm using it to booking cars instead of rooms in our organization, and I would like to change the following:
1 - Colaborators should be able to make car reservations without authentication, it would require to add the extra field e-mail for further contact.
2 - the admin receives the booking reservation and when confirms/reject the user receives a e-mail regarding the confirmation or not of the car (room) booking.
Is this possible?
Thank you.
Paulo Resende
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Maybe we could change the Type (internal/external) to e-mail, mandatory field (change to text on the DB) and use it to send e-mail of confirmation/no confirmation.
No, I think it would be better to have a custom field for the email address and make it mandatory. Then you need to modify edit_entry_handler.php so that create_by becomes the email address.
You will also have to set the delete_ahead policies so that ordinary users can't delete bookings. Otherwise, anybody can come along and delete all your bookings.
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
And how do I put the public (non authenticated users) making reservations (booking)?
Go to mrbs_auth.inc and set the page levels for edit_entry.php and edit_entry_handler.php to 0.
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Thank you for the support. I took the liberty to correct some minor bugs/errors on the translation to Portuguese. I'm sending you the updated lang file.
Regards
PS: Probably I will require some support again. Thank you.
Last edit: Anonymous 2017-03-10
Many thanks. I've committed the new translations to the default branch in b3d5d0.
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Hi, I need some help to modify edit_entry_handler.php so that create_by becomes the email address wich I named mail_reserva. Coul you be more explicit?
and also where to make it mandatory?
Thanks
Paulo
To make the field mandatory, set the following in your config file:
$is_mandatory_field['entry.mail_reserva'] = true;
Then to make create_by become the email address, edit edit_entry_handler.php and add at line 156 (in 1.6.1)
$create_by = $custom_fields['mail_reserva'];
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Gives me a error: access denied ,you don't have permission to change/view this item :(
When you try and do what?
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
copy paste that code to line 156
}
$create_by = $custom_fields['mail_reserva'];
// (3) Clean up the form variables
and when I try to book, i just gives me a error because public can do that, as admin it works.
it seems that code line needs admin permissions on MRBS :(
Did you edit mrbs_auth.inc and set the page levels for edit_entry.php and edit_entry_handler.php to 0?
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
yes, I just don't know if I did it correctly
$page_level['edit_entry.php'] = 0; //($auth['only_admin_can_book']) ? 2 : 1;
$page_level['edit_entry_handler.php'] = 0; //($auth['only_admin_can_book']) ? 2 : 1;
is it ok like this?
Yes, that's OK.
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Still got the error when public tries to booking...
all the other options are fine, just tested... public user can't edit, delete or confirm bookings, only admin.
But with that code line, the public can't book also :(
also found a missing word on lang.pt. add this:
$vocab["back"] = "Voltar";
Last edit: Anonymous 2017-03-10
Thanks. I have now added the missing word.
OK, you need to add the line
so now at line 156 you add
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Hi,
It solved, there is just one thing that's not working, the booker isn't getting the e-mail regarding is reservation (no mail at all)..
You;ll need to modify functions_mail.inc and change line 834 (in 1.6.1) from this:
$booker_email = authGetUserEmail($booker);
to this:
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Fully functional. Tested and OK.
Awsome coding.
Thank you!