Add links to 'View Rooms' on Booking page

creativemedia's picture
creativemedia
Thu, 10/06/2016 - 08:21
#1
Add links to 'View Rooms' on Booking page

After performing a search for available rooms, I want to add a link to each room instead of just having the name, price and a 'Book' button. It would also be good to add a thumbnail so customers can see what the rooms look like. Where / how would I add this in?

Also I would like to be able to remove the 'Units' text from the search result without affecting any functionality. If you could point me to where I can do this that would be fantastic.

Please see screenshot

Image title

Thanks in advance!

cindy's picture
cindy
Thu, 10/06/2016 - 23:25

1. After performing a search for available rooms, I want to add a link to each room instead of just having the name, price and a 'Book' button. It would also be good to add a thumbnail so customers can see what the rooms look like. Where / how would I add this in?

=> Please edit in file rooms_booking_results.tpl.php (sites\all\themes\md_hillter\templates)

2. Also I would like to be able to remove the 'Units' text from the search result without affecting any functionality. If you could point me to where I can do this that would be fantastic.

=> Do you want to remove only text Unit or both Unit + 1 ?

creativemedia's picture
creativemedia
Wed, 10/12/2016 - 09:24

Hi, I would like to remove both the Text and the number as customers will only be booking one room at a time

creativemedia's picture
creativemedia
Wed, 10/12/2016 - 09:26

Also, I still need to know how to add links to each room, you told me where the template file is but you have not said how I can add it. Please can you show me the code I would need to use? Thanks

creativemedia's picture
creativemedia
Tue, 10/18/2016 - 09:50

Any help on this issue?

cindy's picture
cindy
Wed, 10/19/2016 - 03:45

You choose option "Show availability of individual units" (admin/rooms/config/bookings), so the link of Unit Description can not be got. This option only shows fields that belong to Unit Types: admin/rooms/units/unit-types.

You can go to admin/rooms/units/unit-types, add a Link field. This field stores the link of a Unit Description node
Then you enable module DEVEL, open file rooms_booking_results.tpl.php (sites\all\themes\md_hillter\templates) and add the code:

 <?php dsm($unit); ?>

For ex:

<?php dsm($unit); ?>
<?php
print render($unit['unit']);
print render($unit['price']);
print render($unit['book_unit_form']);
print render($unit['book_unit_form']);
print render($unit['field_unit_thumbnail']);
?>

Then, the links will be shown when searching, which are highlighted in orange. You just need to print those values

Image title

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.