diff --git a/admin/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl b/admin/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl
index 7911fecbc..d241a40ad 100644
--- a/admin/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl
+++ b/admin/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl
@@ -78,13 +78,10 @@
{$currencySign}
- {if Product::PRICE_CALCULATION_METHOD_PER_DAY == $service.product_price_calculation_method}
+ {if Product::PRICE_CALCULATION_METHOD_PER_DAY == $service.price_calculation_method}
{l s='/ night'}
{/if}
- {* {if $service['product_price_calculation_method'] == Product::PRICE_CALCULATION_METHOD_PER_DAY}
- {l s='/ night'}
- {/if} *}
{displayPrice price=$service['total_price_tax_excl']|escape:'html':'UTF-8' currency=$orderCurrency} |
|
@@ -150,7 +147,7 @@
{$currencySign}
- {if Product::PRICE_CALCULATION_METHOD_PER_DAY == $product['product_price_calculation_method']}
+ {if Product::PRICE_CALCULATION_METHOD_PER_DAY == $product['price_calculation_method']}
{l s='/ night'}
{/if}
@@ -274,7 +271,7 @@
{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}
|
diff --git a/classes/Cart.php b/classes/Cart.php
index 91c5c0043..a1852f2e0 100644
--- a/classes/Cart.php
+++ b/classes/Cart.php
@@ -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
diff --git a/controllers/admin/AdminCartsController.php b/controllers/admin/AdminCartsController.php
index d6a736572..4ebecdafc 100644
--- a/controllers/admin/AdminCartsController.php
+++ b/controllers/admin/AdminCartsController.php
@@ -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');
diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php
index d2870569f..b5ac20aa9 100644
--- a/controllers/admin/AdminOrdersController.php
+++ b/controllers/admin/AdminOrdersController.php
@@ -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');
diff --git a/modules/hotelreservationsystem/classes/ServiceProductOrderDetail.php b/modules/hotelreservationsystem/classes/ServiceProductOrderDetail.php
index 252e655a4..82f97f93a 100644
--- a/modules/hotelreservationsystem/classes/ServiceProductOrderDetail.php
+++ b/modules/hotelreservationsystem/classes/ServiceProductOrderDetail.php
@@ -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'],