Fix: resolve service-product selling preferences and deduplicate price calculation UI

Co-authored-by: Name <sumit201@webkul.in>
This commit is contained in:
amit sharma
2026-08-18 14:55:17 +05:30
parent 2275c287bd
commit aa484cc7f4
11 changed files with 78 additions and 185 deletions

View File

@@ -213,34 +213,24 @@ $(document).ready(function () {
</span>
</label>
<div class="col-lg-9">
<input type="hidden" name="price_calculation_method" id="price_calculation_method" value="{$product->price_calculation_method|intval}">
<div class="checkbox">
<label>
<input type="checkbox" id="pcm_checkin"
{if $product->price_calculation_method == Product::PRICE_CALCULATION_METHOD_ON_CHECKIN_DAY
|| $product->price_calculation_method == Product::PRICE_CALCULATION_METHOD_CHECKIN_DAY_AND_CHECKOUT_DAY
|| $product->price_calculation_method == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_DURING_STAY
|| $product->price_calculation_method == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_CHECKOUT_AND_DURING_STAY}checked="checked"{/if}>
<input type="checkbox" id="pcm_checkin" name="price_calculation_method[]" value="{Product::PRICE_CALCULATION_METHOD_ON_CHECKIN_DAY|intval}"
{if $product->price_calculation_method & Product::PRICE_CALCULATION_METHOD_ON_CHECKIN_DAY}checked="checked"{/if}>
{l s='Check-in day'}
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="pcm_checkout"
{if $product->price_calculation_method == Product::PRICE_CALCULATION_METHOD_ON_CHECKOUT_DAY
|| $product->price_calculation_method == Product::PRICE_CALCULATION_METHOD_CHECKIN_DAY_AND_CHECKOUT_DAY
|| $product->price_calculation_method == Product::PRICE_CALCULATION_METHOD_CHECKOUT_AND_DURING_STAY
|| $product->price_calculation_method == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_CHECKOUT_AND_DURING_STAY}checked="checked"{/if}>
<input type="checkbox" id="pcm_checkout" name="price_calculation_method[]" value="{Product::PRICE_CALCULATION_METHOD_ON_CHECKOUT_DAY|intval}"
{if $product->price_calculation_method & Product::PRICE_CALCULATION_METHOD_ON_CHECKOUT_DAY}checked="checked"{/if}>
{l s='Check-out day'}
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="pcm_duringstay"
{if $product->price_calculation_method == Product::PRICE_CALCULATION_METHOD_ON_DURING_STAY
|| $product->price_calculation_method == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_DURING_STAY
|| $product->price_calculation_method == Product::PRICE_CALCULATION_METHOD_CHECKOUT_AND_DURING_STAY
|| $product->price_calculation_method == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_CHECKOUT_AND_DURING_STAY}checked="checked"{/if}>
<input type="checkbox" id="pcm_duringstay" name="price_calculation_method[]" value="{Product::PRICE_CALCULATION_METHOD_ON_DURING_STAY|intval}"
{if $product->price_calculation_method & Product::PRICE_CALCULATION_METHOD_ON_DURING_STAY}checked="checked"{/if}>
{l s='During-stay days'}
</label>
</div>

View File

@@ -68,24 +68,9 @@
<div class="tooltip-cont">
<div class="tooltip-row"><label>{l s='Applied on:'}</label></div>
<ul class="tooltip-days">
{if $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_ON_CHECKIN_DAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_DAY_AND_CHECKOUT_DAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_CHECKOUT_AND_DURING_STAY}
<li>{l s='Check-in day'}</li>
{/if}
{if $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_ON_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKOUT_AND_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_CHECKOUT_AND_DURING_STAY}
<li>{l s='During-stay days'}</li>
{/if}
{if $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_ON_CHECKOUT_DAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_DAY_AND_CHECKOUT_DAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKOUT_AND_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_CHECKOUT_AND_DURING_STAY}
<li>{l s='Check-out day'}</li>
{/if}
{foreach from=Product::getPriceCalculationMethodDaysLabel($priceCalcMethod) item='pcmDayLabel'}
<li>{$pcmDayLabel}</li>
{/foreach}
</ul>
</div>
{/capture}
@@ -165,22 +150,21 @@
<div class="row form-group">
<div class="col-sm-6">
<label class="control-label required">{l s='Price calculation method'}</label>
<input type="hidden" name="new_service_price_calc_method" id="price_calculation_method" value="{$product->price_calculation_method|intval}">
<div class="checkbox">
<label>
<input type="checkbox" id="pcm_checkin">
<input type="checkbox" id="pcm_checkin" name="new_service_price_calc_method[]" value="{Product::PRICE_CALCULATION_METHOD_ON_CHECKIN_DAY|intval}">
{l s='Check-in day'}
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="pcm_checkout">
<input type="checkbox" id="pcm_checkout" name="new_service_price_calc_method[]" value="{Product::PRICE_CALCULATION_METHOD_ON_CHECKOUT_DAY|intval}">
{l s='Check-out day'}
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="pcm_duringstay"/>
<input type="checkbox" id="pcm_duringstay" name="new_service_price_calc_method[]" value="{Product::PRICE_CALCULATION_METHOD_ON_DURING_STAY|intval}"/>
{l s='During-stay days'}
</label>
</div>

View File

@@ -60,24 +60,9 @@
<div class="tooltip-cont">
<div class="tooltip-row"><label>{l s='Applied on:'}</label></div>
<ul class="tooltip-days">
{if $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_ON_CHECKIN_DAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_DAY_AND_CHECKOUT_DAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_CHECKOUT_AND_DURING_STAY}
<li>{l s='Check-in day'}</li>
{/if}
{if $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_ON_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKOUT_AND_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_CHECKOUT_AND_DURING_STAY}
<li>{l s='During-stay days'}</li>
{/if}
{if $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_ON_CHECKOUT_DAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_DAY_AND_CHECKOUT_DAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKOUT_AND_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_CHECKOUT_AND_DURING_STAY}
<li>{l s='Check-out day'}</li>
{/if}
{foreach from=Product::getPriceCalculationMethodDaysLabel($priceCalcMethod) item='pcmDayLabel'}
<li>{$pcmDayLabel}</li>
{/foreach}
</ul>
</div>
{/capture}
@@ -170,24 +155,9 @@
<div class="tooltip-cont">
<div class="tooltip-row"><label>{l s='Applied on:'}</label></div>
<ul class="tooltip-days">
{if $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_ON_CHECKIN_DAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_DAY_AND_CHECKOUT_DAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_CHECKOUT_AND_DURING_STAY}
<li>{l s='Check-in day'}</li>
{/if}
{if $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_ON_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKOUT_AND_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_CHECKOUT_AND_DURING_STAY}
<li>{l s='During-stay days'}</li>
{/if}
{if $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_ON_CHECKOUT_DAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_DAY_AND_CHECKOUT_DAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKOUT_AND_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_CHECKOUT_AND_DURING_STAY}
<li>{l s='Check-out day'}</li>
{/if}
{foreach from=Product::getPriceCalculationMethodDaysLabel($priceCalcMethod) item='pcmDayLabel'}
<li>{$pcmDayLabel}</li>
{/foreach}
</ul>
</div>
{/capture}
@@ -256,22 +226,21 @@
<div class="row form-group">
<div class="col-sm-6">
<label class="control-label required">{l s='Price calculation method'}</label>
<input type="hidden" name="new_service_price_calc_method" id="price_calculation_method" value="{$product->price_calculation_method|intval}">
<div class="checkbox">
<label>
<input type="checkbox" id="pcm_checkin">
<input type="checkbox" id="pcm_checkin" name="new_service_price_calc_method[]" value="{Product::PRICE_CALCULATION_METHOD_ON_CHECKIN_DAY|intval}">
{l s='Check-in day'}
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="pcm_checkout">
<input type="checkbox" id="pcm_checkout" name="new_service_price_calc_method[]" value="{Product::PRICE_CALCULATION_METHOD_ON_CHECKOUT_DAY|intval}">
{l s='Check-out day'}
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="pcm_duringstay"/>
<input type="checkbox" id="pcm_duringstay" name="new_service_price_calc_method[]" value="{Product::PRICE_CALCULATION_METHOD_ON_DURING_STAY|intval}"/>
{l s='During-stay days'}
</label>
</div>
@@ -356,24 +325,9 @@
<div class="tooltip-cont">
<div class="tooltip-row"><label>{l s='Applied on:'}</label></div>
<ul class="tooltip-days">
{if $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_ON_CHECKIN_DAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_DAY_AND_CHECKOUT_DAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_CHECKOUT_AND_DURING_STAY}
<li>{l s='Check-in day'}</li>
{/if}
{if $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_ON_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKOUT_AND_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_CHECKOUT_AND_DURING_STAY}
<li>{l s='During-stay days'}</li>
{/if}
{if $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_ON_CHECKOUT_DAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_DAY_AND_CHECKOUT_DAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKOUT_AND_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_CHECKOUT_AND_DURING_STAY}
<li>{l s='Check-out day'}</li>
{/if}
{foreach from=Product::getPriceCalculationMethodDaysLabel($priceCalcMethod) item='pcmDayLabel'}
<li>{$pcmDayLabel}</li>
{/foreach}
</ul>
</div>
{/capture}

View File

@@ -6931,7 +6931,28 @@ class ProductCore extends ObjectModel
return $numNights;
}
}
public static function getPriceCalculationMethodDaysLabel($priceCalculationMethod)
{
$priceCalculationMethod = (int) $priceCalculationMethod;
$labels = array();
static $module = null;
if (is_null($module)) {
$module = Module::getInstanceByName('hotelreservationsystem');
}
if ($priceCalculationMethod & self::PRICE_CALCULATION_METHOD_ON_CHECKIN_DAY) {
$labels[] = $module->l('Check-in day');
}
if ($priceCalculationMethod & self::PRICE_CALCULATION_METHOD_ON_DURING_STAY) {
$labels[] = $module->l('During-stay days');
}
if ($priceCalculationMethod & self::PRICE_CALCULATION_METHOD_ON_CHECKOUT_DAY) {
$labels[] = $module->l('Check-out day');
}
return $labels;
}
public static function isSellableWithRoomType($idProduct)
{
return in_array((int) self::getSellingPreferenceType($idProduct), [

View File

@@ -1399,6 +1399,9 @@ class AdminCartsControllerCore extends AdminController
$name = trim(Tools::getValue('new_service_name'));
$price = Tools::getValue('new_service_price');
$priceCalcMethod = Tools::getValue('new_service_price_calc_method');
if (is_array($priceCalcMethod)) {
$priceCalcMethod = array_sum(array_map('intval', $priceCalcMethod));
}
$priceAdditionType = Tools::getValue('new_service_price_addition_type');
$productQty = Tools::getValue('new_service_qty');
$idTaxRuleGroup = Tools::getValue('new_service_price_tax_rule_group');

View File

@@ -433,32 +433,23 @@ class AdminNormalProductsControllerCore extends AdminController
public function getBuyingOption($selling_preference_type, $row)
{
$list = $this->fields_list['selling_preference_type']['list'];
if (empty($list[$selling_preference_type])) {
return '--';
}
$options = array_map('trim', explode('|', $list[$selling_preference_type]));
$this->context->smarty->assign(array(
'tooltip_items' => $options,
));
$tooltip = $this->context->smarty->fetch('helpers/tooltip.tpl');
return count($options) . ' ' . $this->l('Selected') . ' ' . $tooltip;
return $this->renderMultiSelectTooltip('selling_preference_type', $selling_preference_type);
}
public function getPriceCalculationMethod($price_calculation_method, $row)
{
$list = $this->fields_list['price_calculation_method']['list'];
return $this->renderMultiSelectTooltip('price_calculation_method', $price_calculation_method);
}
if (empty($list[$price_calculation_method])) {
private function renderMultiSelectTooltip($fieldKey, $value)
{
$list = $this->fields_list[$fieldKey]['list'];
if (empty($list[$value])) {
return '--';
}
$options = array_map('trim', explode('|', $list[$price_calculation_method]));
$options = array_map('trim', explode('|', $list[$value]));
$this->context->smarty->assign(array(
'tooltip_items' => $options,
@@ -531,6 +522,9 @@ class AdminNormalProductsControllerCore extends AdminController
*/
protected function copyFromPost(&$object, $table)
{
if (is_array(Tools::getValue('price_calculation_method'))) {
$_POST['price_calculation_method'] = array_sum(array_map('intval', Tools::getValue('price_calculation_method')));
}
parent::copyFromPost($object, $table);
if (get_class($object) != 'Product') {
return;
@@ -2229,6 +2223,10 @@ class AdminNormalProductsControllerCore extends AdminController
*/
public function checkProduct()
{
if (is_array(Tools::getValue('price_calculation_method'))) {
$_POST['price_calculation_method'] = array_sum(array_map('intval', Tools::getValue('price_calculation_method')));
}
$className = 'Product';
// @todo : the call_user_func seems to contains only statics values (className = 'Product')
$rules = call_user_func(array($this->className, 'getValidationRules'), $this->className);
@@ -2384,10 +2382,7 @@ class AdminNormalProductsControllerCore extends AdminController
$this->errors[] = $this->l('Please select at least one buying option.');
}
$priceCalculationMethod = Tools::getValue('price_calculation_method');
$id = Tools::getValue('id_'.$this->table);
if (isset($priceCalculationMethod, $id) && empty($priceCalculationMethod) && !empty($id)) {
if (!Tools::getValue('price_calculation_method')) {
$this->errors[] = $this->l('Please select at least one price calculation method.');
}

View File

@@ -8185,6 +8185,9 @@ class AdminOrdersControllerCore extends AdminController
$name = trim(Tools::getValue('new_service_name'));
$price = Tools::getValue('new_service_price');
$priceCalcMethod = Tools::getValue('new_service_price_calc_method');
if (is_array($priceCalcMethod)) {
$priceCalcMethod = array_sum(array_map('intval', $priceCalcMethod));
}
$priceAdditionType = Tools::getValue('new_service_price_addition_type');
$productQty = Tools::getValue('new_service_qty');
$idTaxRuleGroup = Tools::getValue('new_service_price_tax_rule_group');

View File

@@ -1764,15 +1764,3 @@ function closeRecommendation()
}
});
}
function applyPriceCalcMethodValue()
{
var ci = $('#pcm_checkin').is(':checked') ? 1 : 0;
var co = $('#pcm_checkout').is(':checked') ? 2 : 0;
var ds = $('#pcm_duringstay').is(':checked') ? 4 : 0;
$('#price_calculation_method').val(ci + co + ds);
}
$(document).on('change','#pcm_checkin, #pcm_checkout, #pcm_duringstay', function() {
applyPriceCalcMethodValue();
});
applyPriceCalcMethodValue();

View File

@@ -140,24 +140,9 @@
<div class="htl-tooltip-cont">
<p class="htl-tooltip-title">{l s='Applied on:'}</p>
<ul>
{if $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_ON_CHECKIN_DAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_DAY_AND_CHECKOUT_DAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_CHECKOUT_AND_DURING_STAY}
<li>{l s='Check-in day'}</li>
{/if}
{if $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_ON_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKOUT_AND_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_CHECKOUT_AND_DURING_STAY}
<li>{l s='During-stay days'}</li>
{/if}
{if $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_ON_CHECKOUT_DAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_DAY_AND_CHECKOUT_DAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKOUT_AND_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_CHECKOUT_AND_DURING_STAY}
<li>{l s='Check-out day'}</li>
{/if}
{foreach from=Product::getPriceCalculationMethodDaysLabel($priceCalcMethod) item='pcmDayLabel'}
<li>{$pcmDayLabel}</li>
{/foreach}
</ul>
</div>
{/capture}

View File

@@ -63,24 +63,9 @@
<div class="htl-tooltip-cont">
<p class="htl-tooltip-title">{l s='Applied on:'}</p>
<ul>
{if $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_ON_CHECKIN_DAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_DAY_AND_CHECKOUT_DAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_CHECKOUT_AND_DURING_STAY}
<li>{l s='Check-in day'}</li>
{/if}
{if $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_ON_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKOUT_AND_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_CHECKOUT_AND_DURING_STAY}
<li>{l s='During-stay days'}</li>
{/if}
{if $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_ON_CHECKOUT_DAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_DAY_AND_CHECKOUT_DAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKOUT_AND_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_CHECKOUT_AND_DURING_STAY}
<li>{l s='Check-out day'}</li>
{/if}
{foreach from=Product::getPriceCalculationMethodDaysLabel($priceCalcMethod) item='pcmDayLabel'}
<li>{$pcmDayLabel}</li>
{/foreach}
</ul>
</div>
{/capture}

View File

@@ -43,24 +43,9 @@
<div class="htl-tooltip-cont">
<p class="htl-tooltip-title">{l s='Applied on:'}</p>
<ul>
{if $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_ON_CHECKIN_DAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_DAY_AND_CHECKOUT_DAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_CHECKOUT_AND_DURING_STAY}
<li>{l s='Check-in day'}</li>
{/if}
{if $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_ON_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKOUT_AND_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_CHECKOUT_AND_DURING_STAY}
<li>{l s='During-stay days'}</li>
{/if}
{if $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_ON_CHECKOUT_DAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_DAY_AND_CHECKOUT_DAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKOUT_AND_DURING_STAY
|| $priceCalcMethod == Product::PRICE_CALCULATION_METHOD_CHECKIN_AND_CHECKOUT_AND_DURING_STAY}
<li>{l s='Check-out day'}</li>
{/if}
{foreach from=Product::getPriceCalculationMethodDaysLabel($priceCalcMethod) item='pcmDayLabel'}
<li>{$pcmDayLabel}</li>
{/foreach}
</ul>
</div>
{/capture}