add show occupancy in product page

This commit is contained in:
lakshya chauhan
2022-01-31 19:23:18 +05:30
parent 8a5c66f1b6
commit 5cc211469d
2 changed files with 14 additions and 0 deletions

View File

@@ -269,6 +269,10 @@ class ProductControllerCore extends FrontController
$htl_features = array();
$obj_hotel_room_type = new HotelRoomType();
$room_info_by_product_id = $obj_hotel_room_type->getRoomTypeInfoByIdProduct($this->product->id);
$productCapacity = array();
$productCapacity['adult'] = $room_info_by_product_id['adult'];
$productCapacity['children'] = $room_info_by_product_id['children'];
$this->product->capacity = $productCapacity;
$hotel_id = $room_info_by_product_id['id_hotel'];
$useTax = HotelBookingDetail::useTax();
if (isset($hotel_id) && $hotel_id) {

View File

@@ -193,6 +193,16 @@
{$product->description}
</div>
</div>
{if isset($product->capacity['adult']) && isset($product->capacity['children']) }
<div class="info_margin_div">
<div class="room_info_heading">
<span>{l s='Max Capacity'}</span>
</div>
<div class="room_info_content">
<p> {$product->capacity['adult']} {l s='Adults'}, {$product->capacity['children']} {l s='child'}</p>
</div>
</div>
{/if}
{if isset($features) && $features}
<div class="info_margin_div">
<div class="room_info_heading">