Add accommodation name (not type) to notifier email

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #995429
    Thomas Hallwright
    Participant

    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
    Thanks

    #995927
    Mary Evans
    Participant

    Hello 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. Evans

    #1006642
    Thomas Hallwright
    Participant

    Hi 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?
    Thanks

    #1007273
    Andre Flores
    Moderator

    Hello, 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,
    Andre

    #1007342
    Thomas Hallwright
    Participant

    Hi
    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
    Tom

    #1007886
    Andre Flores
    Moderator

    Hello, 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,
    Andre

    #1029375
    Thomas Hallwright
    Participant

    Hi
    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 freelancer

    #1032180
    Andre Flores
    Moderator

    Hello 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,
    Andre

    #1034123
    Marcus
    Participant

    I’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.

    #1034459
    Andre Flores
    Moderator

    Hello Marcus,

    Thank you for your up-vote, it has been counted. Have you tried a temporary solution Thomas provided previously?

    Regards,
    Andre

    #1034757
    Marcus
    Participant

    Yes, 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.

    #1035281
    Andre Flores
    Moderator

    Hello 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,
    Andre

    #1209847
    Jason Dittmer
    Participant

    I would also like this feature.

    #1223523
    Oleg Sumbaev
    Participant

    Please add this feature

    #1246804
    Oleg Sumbaev
    Participant

    As 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 Type

    acc_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 arrival

    Disadvantages:
    1. All other details from %reserved_room_details% are not shown at all
    2. Needs a child theme

    Shame on motocross – it’s just 15 minutes of coding to do it.
    Just add %accomodation_title% and %accomodation_details% tags.

Viewing 15 posts - 1 through 15 (of 19 total)
  • You must be logged in to reply to this topic.