diff --git a/themes/hotel-reservation-theme/_partials/cart_booking_demands.tpl b/themes/hotel-reservation-theme/_partials/cart_booking_demands.tpl index f74c3b628..dba731425 100644 --- a/themes/hotel-reservation-theme/_partials/cart_booking_demands.tpl +++ b/themes/hotel-reservation-theme/_partials/cart_booking_demands.tpl @@ -134,7 +134,12 @@ {/if}
-

{$product['name']|escape:'html':'UTF-8'}

+
{$product['name']|escape:'html':'UTF-8'}
+ {if $product.price_calculation_method == Product::PRICE_CALCULATION_METHOD_PER_DAY} +
+ {if ($product.show_price && !isset($restricted_country_mode)) || isset($groups)}{if !$priceDisplay}{convertPrice price=$product.price_tax_incl}{else}{convertPrice price=$product.price_tax_exc}{/if}{/if}{l s='/night'} +
+ {/if} {if $product.allow_multiple_quantity}
@@ -150,7 +155,21 @@
{if ($product.show_price && !isset($restricted_country_mode)) || isset($groups)} - {if !$priceDisplay}{convertPrice price=$product.price_tax_incl}{else}{convertPrice price=$product.price_tax_exc}{/if}{if $product.price_calculation_method == Product::PRICE_CALCULATION_METHOD_PER_DAY}{l s='/Night'}{/if} + + {if !$priceDisplay} + {if $serviceSelected} + {convertPrice price=$cartRoom['selected_service'][$product['id_product']]['total_price_tax_incl']} + {else} + {convertPrice price=$product.price_tax_incl} + {/if} + {else} + {if $serviceSelected} + {convertPrice price=$cartRoom['selected_service'][$product['id_product']]['total_price_tax_excl']} + {else} + {convertPrice price=$product.price_tax_exc} + {/if} + {/if} + {/if}
diff --git a/themes/hotel-reservation-theme/css/global.css b/themes/hotel-reservation-theme/css/global.css index 7fb667b55..1f84e79ca 100644 --- a/themes/hotel-reservation-theme/css/global.css +++ b/themes/hotel-reservation-theme/css/global.css @@ -9052,6 +9052,11 @@ a.open_rooms_extra_services_panel { border-radius: 0 0 4px 0; box-shadow: 0 1px 0 0 rgb(0 0 0 / 13%); } +#rooms_extra_services .price-per-night { + font-size: 12px; + color: #777; + margin-bottom: 5px; +} /* fancybox changes */ diff --git a/themes/hotel-reservation-theme/js/order-opc.js b/themes/hotel-reservation-theme/js/order-opc.js index 854f90fbb..4c9ae91f1 100644 --- a/themes/hotel-reservation-theme/js/order-opc.js +++ b/themes/hotel-reservation-theme/js/order-opc.js @@ -638,6 +638,9 @@ $(document).ready(function() $(document).on('click', '#rooms_extra_services .qty_up', function(e) { e.preventDefault(); qtyfield = $(this).closest('.qty_container').find('input.qty'); + roomServiceProductValue = $(this).closest('.room_demand_block').find('.room-service-product-value'); + roomServiceProductUnitPrice = roomServiceProductValue.data('unit_price'); + roomServiceProductCurrencySign = roomServiceProductValue.data('currency_sign'); var newQuantity = parseInt(qtyfield.val()) + 1; if (qtyfield.data('max_quantity') && qtyfield.data('max_quantity') < newQuantity) { newQuantity = qtyfield.data('max_quantity'); @@ -647,6 +650,8 @@ $(document).ready(function() showErrorMessage(txtMaxQuantityAdded); } } else { + roomServiceProductTotalPriceQtyUp = newQuantity*roomServiceProductUnitPrice; + roomServiceProductValue.text(roomServiceProductCurrencySign + roomServiceProductTotalPriceQtyUp.toFixed(priceDisplayPrecision)) qtyfield.val(newQuantity).trigger('focusout'); } }); @@ -654,9 +659,15 @@ $(document).ready(function() $(document).on('click', '#rooms_extra_services .qty_down', function(e) { e.preventDefault(); qtyfield = $(this).closest('.qty_container').find('input.qty'); + roomServiceProductValue = $(this).closest('.room_demand_block').find('.room-service-product-value'); + roomServiceProductUnitPrice = roomServiceProductValue.data('unit_price'); + roomServiceProductCurrencySign = roomServiceProductValue.data('currency_sign'); var currentVal = parseInt(qtyfield.val()); if (!isNaN(currentVal) && currentVal > 1) { qtyfield.val(currentVal - 1).trigger('focusout'); + roomServiceProductTotalPriceQtyDown = qtyfield.val()*roomServiceProductUnitPrice; + roomServiceProductValue.text(roomServiceProductCurrencySign + roomServiceProductTotalPriceQtyDown.toFixed(priceDisplayPrecision)) + } else { qtyfield.val(1); if (currentVal != 1) { @@ -667,12 +678,20 @@ $(document).ready(function() $(document).on('focusout', '#rooms_extra_services .qty', function(e) { var qty_wntd = $(this).val(); - if (qty_wntd == '' || !$.isNumeric(qty_wntd)) { + roomServiceProductValue = $(this).closest('.room_demand_block').find('.room-service-product-value'); + roomServiceProductUnitPrice = roomServiceProductValue.data('unit_price'); + roomServiceProductCurrencySign = roomServiceProductValue.data('currency_sign'); + + if (qty_wntd == '' || !$.isNumeric(qty_wntd) || qty_wntd < 1) { $(this).val(1); } if ($(this).data('max_quantity') && $(this).data('max_quantity') < qty_wntd) { $(this).val(qtyfield.data('max_quantity')); } + + roomServiceProductTotalPriceQty = $(this).val()*roomServiceProductUnitPrice; + roomServiceProductValue.text(roomServiceProductCurrencySign + roomServiceProductTotalPriceQty.toFixed(priceDisplayPrecision)) + if ($(this).closest('.room_demand_block').find('.change_room_type_service_product').is(':checked')) { updateServiceProducts($(this).closest('.room_demand_block').find('.change_room_type_service_product')); }