added per night text for facilities calculated for each night

This commit is contained in:
shreesh arora
2022-01-13 17:12:31 +05:30
parent 2428e1943e
commit 3a1a6724aa
3 changed files with 3 additions and 1 deletions

View File

@@ -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,

View File

@@ -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,

View File

@@ -381,7 +381,7 @@
</div>
{/if}
<div class="col-xs-11 demand_adv_option_block">
<p>{$demand['name']|escape:'html':'UTF-8'} {if $product->show_price && !isset($restricted_country_mode) && !$PS_CATALOG_MODE}<span class="pull-right extra_demand_option_price">{convertPrice price = {$demand['price']}}</span>{/if}</p>
<p>{$demand['name']|escape:'html':'UTF-8'} {if $product->show_price && !isset($restricted_country_mode) && !$PS_CATALOG_MODE}<span class="pull-right"><span class="extra_demand_option_price">{convertPrice price = $demand['price']}</span>{if $demand['price_calc_method'] == $WK_PRICE_CALC_METHOD_EACH_DAY}{l s='/night'}{/if}</span>{/if}</p>
{if isset($demand['adv_option']) && $demand['adv_option']}
<select class="id_option">
{foreach $demand['adv_option'] as $idOption => $option}