Free and Premium WordPress Plugins & Themes Forums WordPress Plugins Hotel Booking Hotel Booking Notifier Add accommodation name (not type) to notifier email
- This topic has 20 replies, 10 voices, and was last updated 1 week, 6 days ago by J. Davis.
- AuthorPosts
- August 25, 2020 at 11:20 pm #995429Thomas HallwrightParticipant
Hi
What is the tag for adding the accommodation name, (not the accommodation type) to the notifier email?I tried %accommodation% with no luck
I need customers to know their room number before they check in
ThanksAugust 27, 2020 at 6:30 am #995927Mary EvansParticipantHello Thomas,
Unfortunately, there is no possibility to display the name of accommodation within a tag. However, we can offer the following:
You can view all the possible tags for the Notifier addon, under your dashboard > Bookings > Notifications.
There you can see the%reserved_rooms_details%
tag that may contain Accommodation Type Title –%room_type_title%
and Sequential Number of Accommodation –%room_key%
if you configure this in the Accommodation tab > Settings > Email Settings > Reserved Accommodation Details Template by adding the needed available tags there.
In this way, the%reserved_rooms_details%
tag will contain all the added to the Reserved Accommodation Details Template, tags.Best Regards,
M. EvansSeptember 18, 2020 at 12:05 pm #1006642Thomas HallwrightParticipantHi Mary
Thanks for your reply
Unfortunately when I test this, the %room_key% element only ever populates as 1, no matter which actual accommodation is booked.Is it possible to set the room key somewhere in the accommodation? Can this be added as a tag?
ThanksSeptember 21, 2020 at 7:36 am #1007273Andre FloresModeratorHello, Thomas!
Unfortunately, there is no option to display accommodation name/title, however, you may try including this information in one of the accommodation notices, duplicating the room number there: https://prnt.sc/ukxf6t – this will help to identify your Guests room numbers.
Regards,
AndreSeptember 21, 2020 at 9:04 am #1007342Thomas HallwrightParticipantHi
This is under the accommodation type rather than the accommodation itself however, does this mean the only solution is to delete all accommodation types and accommodations, then add each room as an accommodation type?Could this be addressed in a future update? How difficult would it be to add a tag for the accommodation name as this would solve the problem very well?
Thanks
TomSeptember 22, 2020 at 6:45 am #1007886Andre FloresModeratorHello, Thomas!
If you create each room as an accommodation type, then yes, you will be able to see the room name in the e-mail – this can be used as a workaround.
Currently our developers are busy with other priority tasks, however, I will take your request into consideration and in case there are more similar requests from other users, we will consider adding this option to one of the plugin future updates.Regards,
AndreNovember 13, 2020 at 11:29 am #1029375Thomas HallwrightParticipantHi
I have since found a solution to this issue
Modifying the lines of code found in motopress-hotel-booking/includes/emails/templaters/reserved-rooms-templater.php file (line 97)case ‘room_type_title’:
if ( isset( $this->reservedRoom ) ) {
$roomType = MPHB()->getRoomTypeRepository()->findById( $this->reservedRoom->getRoomTypeId() );
$roomType = apply_filters( ‘_mphb_translate_room_type’, $roomType, $this->booking->getLanguage() );
$replaceText = ( $roomType ) ? $roomType->getTitle() : ”;
// THE FOLLOWING 3 LINES ADDED BY HUAN
$replaceText .= ‘ / ‘;
$room = MPHB()->getRoomRepository()->findById( $this->reservedRoom->getRoomId() );
$replaceText .= ( $room ) ? $room->getTitle() : ”;
}
break;This allows you to keep using the %room_type_title% tag and modifies that tag output to display the room type and room name, (or only the room name if you want)
I am very dissappointed that Motopress were unwilling to let me know how to change two lines of code to meet this very basic requirement, especially considering how much I have paid for this subscription.
For any with similar requirements, I recommend Huan Hoang, available at the below email
[email protected]tags
custom plugin development edit modify php javascript freelancerNovember 19, 2020 at 7:42 am #1032180Andre FloresModeratorHello Thomas,
Thank you for sharing your solution, it is much appreciated. Unfortunately, our developers were and are currently all busy with other priority tasks, therefore no solution was provided to your request.
As for the solution you have got, it is not recommended to perform changes directly to the plugin file, since they may be lost after the next plugin update. All the changes must be overwritten in your child theme files.Regards,
AndreNovember 23, 2020 at 8:56 pm #1034123MarcusParticipantI’d like to request this feature as well. The first thing our client asked for on review of their new booking process is to list the accommodation title in confirmation messaging.
November 24, 2020 at 12:08 pm #1034459Andre FloresModeratorHello Marcus,
Thank you for your up-vote, it has been counted. Have you tried a temporary solution Thomas provided previously?
Regards,
AndreNovember 24, 2020 at 4:30 pm #1034757MarcusParticipantYes, Thomas’ solution was massively helpful. I removed this (line 101) from the original script before adding Huan’s excerpt.
$replaceText = ( $roomType ) ? $roomType->getTitle() : '';
It worked out well enough, but I hope this option will become part of the core functionality in the near future.
November 25, 2020 at 9:01 am #1035281Andre FloresModeratorHello Marcus,
I am glad that the solution worked for you. We have this in our feature requests list, so we will definitely consider adding the option in case there are more similar requests from other users.
Regards,
AndreNovember 5, 2021 at 7:24 am #1209847Jason DittmerParticipantI would also like this feature.
November 29, 2021 at 1:36 pm #1223523Oleg SumbaevParticipantPlease add this feature
January 19, 2022 at 9:41 am #1246804Oleg SumbaevParticipantAs motocross is not keen on implementing this feature I have updated the temporary solution proposeв by Juan (many thanks).
I propose to do the following:
acc_notice-1: Your Villa Type
(if site is not multilingual Your Villa Typeacc_notice-2: Additional info to be sent prior to arrival in my case driving instructions.
case ‘room_type_title’:
$room = MPHB()->getRoomRepository()->findById( $this->reservedRoom->getRoomId() );
$replaceText = ( $room ) ? $room->getTitle() : ”;
break;Then I give access codes based on villa names:
case ‘room_key’:
$room_name = ( $room ) ? $room->getTitle() : ”;
switch ($room_name) {
case ‘Beach Villas 1’ :
$replaceText = ‘1234’;
break;
case ‘Beach Villas 2’ :
$replaceText = ‘5678’;
break;
}My %reserved_room_details% are now like this:
Your villa – %room_type_title%
Your access code – %room_key%This gives my ability to provide:
1. General details when booking is made
2. Driving instructions and the minor details
3. Villa number and a code right before the arrivalDisadvantages:
1. All other details from %reserved_room_details% are not shown at all
2. Needs a child themeShame on motocross – it’s just 15 minutes of coding to do it.
Just add %accomodation_title% and %accomodation_details% tags. - AuthorPosts
- You must be logged in to reply to this topic.