Fixed: The Occupancy column was not appearing in the cart details after the admin added a customer to the cart on the "Book Now" page in the back office.
This commit is contained in:
@@ -17,7 +17,9 @@
|
||||
* @license https://store.webkul.com/license.html
|
||||
*}
|
||||
|
||||
{if !isset($ajax) || !$ajax}
|
||||
<div class="panel form-horizontal" id="customer_cart_details">
|
||||
{/if}
|
||||
<div class="panel-heading">
|
||||
<i class="icon-shopping-cart"></i>
|
||||
{l s='Cart Details'}
|
||||
@@ -51,7 +53,7 @@
|
||||
<td>
|
||||
<p>{$data.room_type|escape:'html':'UTF-8'}</p>
|
||||
</td>
|
||||
{assign var="is_full_date" value=($show_full_date && ($data['date_from']|date_format:'%D' == $data['date_to']|date_format:'%D'))}
|
||||
{assign var="is_full_date" value=($show_full_date && ($data['date_from']|date_format:'%D' == $data['date_to']|date_format:'%D'))}
|
||||
<td>{dateFormat date=$data.date_from full=$is_full_date} - {dateFormat date=$data.date_to full=$is_full_date}</td>
|
||||
{if $occupancy_required_for_booking}
|
||||
<td>
|
||||
@@ -187,6 +189,7 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{if !isset($ajax) || !$ajax}
|
||||
</div>
|
||||
|
||||
{* Modal for extra demands *}
|
||||
@@ -229,3 +232,4 @@
|
||||
#rooms_extra_demands .room_demand_detail {
|
||||
padding: 15px 15px 0px 15px;}
|
||||
</style>
|
||||
{/if}
|
||||
|
||||
@@ -612,10 +612,24 @@ class AdminCartsControllerCore extends AdminController
|
||||
$cart_detail_data = array();
|
||||
$cart_detail_data_obj = new HotelCartBookingData();
|
||||
$cart_detail_data_obj->updateIdCurrencyByIdCart($id_cart, $currency->id);
|
||||
$cart_detail_data = $cart_detail_data_obj->getCartFormatedBookinInfoByIdCart((int) $id_cart);
|
||||
|
||||
if ($cart_detail_data = $cart_detail_data_obj->getCartFormatedBookinInfoByIdCart((int) $id_cart)) {
|
||||
$objRoomType = new HotelRoomType();
|
||||
foreach ($cart_detail_data as $key => $cart_data) {
|
||||
|
||||
$cart_detail_data[$key]['room_type_info'] = $objRoomType->getRoomTypeInfoByIdProduct($cart_data['id_product']);
|
||||
}
|
||||
}
|
||||
$occupancyRequiredForBooking = false;
|
||||
if (Configuration::get('PS_BACKOFFICE_ROOM_BOOKING_TYPE') == HotelBookingDetail::PS_ROOM_UNIT_SELECTION_TYPE_OCCUPANCY) {
|
||||
$occupancyRequiredForBooking = true;
|
||||
}
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'cart_detail_data' => $cart_detail_data,
|
||||
'currency' => new Currency((int)$this->context->cart->id_currency),
|
||||
'occupancy_required_for_booking' => $occupancyRequiredForBooking,
|
||||
'ajax' => true
|
||||
));
|
||||
|
||||
$tpl_path = 'default/template/controllers/orders/_current_cart_details_data.tpl';
|
||||
|
||||
Reference in New Issue
Block a user