Merge pull request #1867 from amitsharma322/gli-3190

Fixed: Fatal Error When Admin Views Guest Cart in the Back Office
This commit is contained in:
Rohit Jain
2026-10-06 18:16:04 +05:30
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -102,7 +102,7 @@
<td>{dateFormat date=$room['date_from'] full=$is_full_date} - {dateFormat date=$room['date_to'] full=$is_full_date}</td>
<td>
<span>
{if $stay['adults']}{$stay['adults']}{/if} {if $stay['adults'] > 1}{l s='Adults'}{else}{l s='Adult'}{/if}{if {$stay['children']}}, {$stay['children']} {if $stay['children'] > 1}{l s='Children'}{else}{l s='Child'}{/if}{/if}
{if $room['adults']}{$room['adults']}{/if} {if $room['adults'] > 1}{l s='Adults'}{else}{l s='Adult'}{/if}{if {$room['children']}}, {$room['children']} {if $room['children'] > 1}{l s='Children'}{else}{l s='Child'}{/if}{/if}
</span>
</td>
<td>{displayWtPriceWithCurrency price=$room['feature_price_tax_excl'] currency=$currency}</td>
@@ -131,7 +131,7 @@
<span aria-hidden="true">&times;</span>
</button>
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active" ><a href="#room_type_service_product_desc_{$stay['id']}" aria-controls="services" role="tab" data-toggle="tab">{l s='Services'}</a></li>
<li role="presentation" class="active" ><a href="#room_type_service_product_desc_{$room['id']}" aria-controls="services" role="tab" data-toggle="tab">{l s='Services'}</a></li>
</ul>
<div class="tab-content panel">
{if isset($room['selected_services']) && $room['selected_services']}

View File

@@ -270,12 +270,12 @@ class AdminCartsControllerCore extends AdminController
if (!($cart = $this->loadObject(true))) {
return;
}
$this->context->cart = $cart;
if ($this->tabAccess['kpi'] === 1) {
$this->content .= $this->renderKpis();
}
$customer = new Customer($cart->id_customer);
$currency = new Currency($cart->id_currency);
$this->context->cart = $cart;
$this->context->currency = $currency;
$this->context->customer = $customer;
$this->toolbar_title = sprintf($this->l('Cart #%06d'), $this->context->cart->id);