Skip to content

Commit 2edf370

Browse files
authored
Merge pull request #1020 from vishal-singh-webkul/gli-1613
Fixed: A room type shows multiple times in customer message section in front office order detail if admin adds a room from back office.
2 parents 01439b5 + 9fc25e0 commit 2edf370

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

controllers/front/OrderDetailController.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ public function initContent()
100100
$total_demands_price_ti = 0;
101101
$total_convenience_fee_te = 0;
102102
$total_convenience_fee_ti = 0;
103+
$roomTypes = array();
103104
if (!empty($products)) {
104105
foreach ($products as $type_key => $type_value) {
105106
if (in_array($type_value['product_id'], $processedProducts)) {
@@ -374,7 +375,7 @@ public function initContent()
374375
}
375376
}
376377

377-
378+
$roomTypes[$type_value['id_product']] = $type_value;
378379
}
379380

380381
$redirectTermsLink = $this->context->link->getCMSLink(new CMS(3, $this->context->language->id), null, $this->context->language->id);
@@ -437,6 +438,7 @@ public function initContent()
437438
'order_history' => $order->getHistory($this->context->language->id, false, true),
438439
'overbooking_order_states' => OrderState::getOverBookingStates(),
439440
'products' => $products,
441+
'roomTypes' => $roomTypes,
440442
'discounts' => $order->getCartRules(),
441443
'carrier' => $carrier,
442444
'address_invoice' => $addressInvoice,

themes/hotel-reservation-theme/order-detail.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@
454454

455455
<select name="id_product" class="form-control">
456456
<option value="0">{l s='-- Choose --'}</option>
457-
{foreach from=$products item=product}
457+
{foreach from=$roomTypes item=product}
458458
{if $product.is_booking_product}
459459
<option value="{$product.product_id}">{$product.product_name|escape:'html':'UTF-8'}</option>
460460
{/if}

0 commit comments

Comments
 (0)