diff --git a/controllers/front/ProductController.php b/controllers/front/ProductController.php index cafe51955..84d78871d 100644 --- a/controllers/front/ProductController.php +++ b/controllers/front/ProductController.php @@ -409,6 +409,7 @@ class ProductControllerCore extends FrontController $this->context->smarty->assign( array( 'room_type_demands' => $roomTypeDemands, + 'WK_PRICE_CALC_METHOD_EACH_DAY' => HotelRoomTypeGlobalDemand::WK_PRICE_CALC_METHOD_EACH_DAY, 'product_id_hotel' => $hotel_id, 'stock_management' => Configuration::get('PS_STOCK_MANAGEMENT'), 'customizationFields' => $customization_fields, diff --git a/modules/hotelreservationsystem/classes/HotelRoomTypeDemand.php b/modules/hotelreservationsystem/classes/HotelRoomTypeDemand.php index f14af1ade..4d7cbef3e 100644 --- a/modules/hotelreservationsystem/classes/HotelRoomTypeDemand.php +++ b/modules/hotelreservationsystem/classes/HotelRoomTypeDemand.php @@ -80,6 +80,7 @@ class HotelRoomTypeDemand extends ObjectModel foreach ($roomTypeDemands as &$demand) { $idGlobalDemand = $demand['id_global_demand']; $roomTypeDemandInfo[$idGlobalDemand]['name'] = $demand['name']; + $roomTypeDemandInfo[$idGlobalDemand]['price_calc_method'] = $demand['price_calc_method']; $roomTypeDemandInfo[$idGlobalDemand]['price'] = HotelRoomTypeDemand::getPriceStatic( $idProduct, diff --git a/themes/hotel-reservation-theme/product.tpl b/themes/hotel-reservation-theme/product.tpl index 60feb80de..89be6f30d 100644 --- a/themes/hotel-reservation-theme/product.tpl +++ b/themes/hotel-reservation-theme/product.tpl @@ -381,7 +381,7 @@ {/if}
{$demand['name']|escape:'html':'UTF-8'} {if $product->show_price && !isset($restricted_country_mode) && !$PS_CATALOG_MODE}{convertPrice price = {$demand['price']}}{/if}
+{$demand['name']|escape:'html':'UTF-8'} {if $product->show_price && !isset($restricted_country_mode) && !$PS_CATALOG_MODE}{convertPrice price = $demand['price']}{if $demand['price_calc_method'] == $WK_PRICE_CALC_METHOD_EACH_DAY}{l s='/night'}{/if}{/if}
{if isset($demand['adv_option']) && $demand['adv_option']}