Fixed: undefined index issues in the admin orders controller
This commit is contained in:
@@ -78,13 +78,10 @@
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{$currencySign}</span>
|
||||
<input type="text" class="form-control unit_price" value="{Tools::ps_round($service['unit_price_tax_excl'], 2)}" data-id-product="{$service['id_product']}" name="service_price[{$service['id_service_product_order_detail']}]">
|
||||
{if Product::PRICE_CALCULATION_METHOD_PER_DAY == $service.product_price_calculation_method}
|
||||
{if Product::PRICE_CALCULATION_METHOD_PER_DAY == $service.price_calculation_method}
|
||||
<span class="input-group-addon">{l s='/ night'}</span>
|
||||
{/if}
|
||||
</div>
|
||||
{* {if $service['product_price_calculation_method'] == Product::PRICE_CALCULATION_METHOD_PER_DAY}
|
||||
{l s='/ night'}
|
||||
{/if} *}
|
||||
</td>
|
||||
<td>{displayPrice price=$service['total_price_tax_excl']|escape:'html':'UTF-8' currency=$orderCurrency}</td>
|
||||
<td class="text-right"><a class="btn btn-danger pull-right del_room_additional_service" data-id_service_product_order_detail="{$service['id_service_product_order_detail']}" href="#"><i class="icon-trash"></i></a></td>
|
||||
@@ -150,7 +147,7 @@
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{$currencySign}</span>
|
||||
<input type="text" class="form-control unit_price" name="service_price[{$product['id_product']|escape:'html':'UTF-8'}]" value="{$product['price_tax_exc']}" data-id-product="{$product.id_product}">
|
||||
{if Product::PRICE_CALCULATION_METHOD_PER_DAY == $product['product_price_calculation_method']}
|
||||
{if Product::PRICE_CALCULATION_METHOD_PER_DAY == $product['price_calculation_method']}
|
||||
<span class="input-group-addon">{l s='/ night'}</span>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -274,7 +271,7 @@
|
||||
</td>
|
||||
<td>
|
||||
{displayPrice price=$service['unit_price_tax_excl'] currency=$orderCurrency}
|
||||
{if $service['product_price_calculation_method'] == Product::PRICE_CALCULATION_METHOD_PER_DAY}
|
||||
{if $service['price_calculation_method'] == Product::PRICE_CALCULATION_METHOD_PER_DAY}
|
||||
{l s='/ night'}
|
||||
{/if}
|
||||
</td>
|
||||
|
||||
@@ -1034,7 +1034,7 @@ class CartCore extends ObjectModel
|
||||
$shop = Context::getContext()->shop;
|
||||
}
|
||||
|
||||
if (Context::getContext()->customer->id) {
|
||||
if (!empty(Context::getContext()->customer->id)) {
|
||||
if ($id_address_delivery == 0 && (int)$this->id_address_delivery) { // The $id_address_delivery is null, use the cart delivery address
|
||||
$id_address_delivery = $this->id_address_delivery;
|
||||
} elseif (!Customer::customerHasAddress(Context::getContext()->customer->id, $id_address_delivery)) { // The $id_address_delivery must be linked with customer
|
||||
|
||||
@@ -1320,7 +1320,7 @@ class AdminCartsControllerCore extends AdminController
|
||||
$idHotelCartBooking = Tools::getValue('id_hotel_cart_booking');
|
||||
// valiadate services being added
|
||||
if (Validate::isLoadedObject($objHtlCartBooking = new HotelCartBookingData($idHotelCartBooking))) {
|
||||
$name = Tools::getValue('new_service_name');
|
||||
$name = trim(Tools::getValue('new_service_name'));
|
||||
$price = Tools::getValue('new_service_price');
|
||||
$priceCalcMethod = Tools::getValue('new_service_price_calc_method');
|
||||
$priceAdditionType = Tools::getValue('new_service_price_addition_type');
|
||||
|
||||
@@ -7692,7 +7692,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$objHotelBookingDetail->date_to,
|
||||
$objHotelBookingDetail->id_room
|
||||
)) {
|
||||
$name = Tools::getValue('new_service_name');
|
||||
$name = trim(Tools::getValue('new_service_name'));
|
||||
$price = Tools::getValue('new_service_price');
|
||||
$priceCalcMethod = Tools::getValue('new_service_price_calc_method');
|
||||
$priceAdditionType = Tools::getValue('new_service_price_addition_type');
|
||||
|
||||
@@ -338,7 +338,7 @@ class ServiceProductOrderDetail extends ObjectModel
|
||||
'max_quantity' => $product['max_quantity'],
|
||||
'product_auto_add' => $product['product_auto_add'],
|
||||
'product_price_addition_type' => $product['product_price_addition_type'],
|
||||
'product_price_calculation_method' => $product['product_price_calculation_method'],
|
||||
'price_calculation_method' => $product['product_price_calculation_method'],
|
||||
'unit_price_tax_excl' => $product['unit_price_tax_excl'],
|
||||
'unit_price_tax_incl' => $product['unit_price_tax_incl'],
|
||||
'total_price_tax_excl' => $product['total_price_tax_excl'],
|
||||
@@ -365,7 +365,7 @@ class ServiceProductOrderDetail extends ObjectModel
|
||||
'max_quantity' => $product['max_quantity'],
|
||||
'product_auto_add' => $product['product_auto_add'],
|
||||
'product_price_addition_type' => $product['product_price_addition_type'],
|
||||
'product_price_calculation_method' => $product['product_price_calculation_method'],
|
||||
'price_calculation_method' => $product['product_price_calculation_method'],
|
||||
'unit_price_tax_excl' => $product['unit_price_tax_excl'],
|
||||
'unit_price_tax_incl' => $product['unit_price_tax_incl'],
|
||||
'total_price_tax_excl' => $product['total_price_tax_excl'],
|
||||
|
||||
Reference in New Issue
Block a user