diff --git a/admin/themes/default/template/controllers/normal_products/informations.tpl b/admin/themes/default/template/controllers/normal_products/informations.tpl
index 2000a8f8c..ad77a39b0 100644
--- a/admin/themes/default/template/controllers/normal_products/informations.tpl
+++ b/admin/themes/default/template/controllers/normal_products/informations.tpl
@@ -230,7 +230,7 @@
{* Code For Standard product working *}
- {*
selling_preference_type != Product::SELLING_PREFERENCE_HOTEL_STANDALONE && $product->selling_preference_type != Product::SELLING_PREFERENCE_HOTEL_STANDALONE_AND_WITH_ROOM_TYPE)}style="display:none;"{/if}>
+
+ selling_preference_type != Product::SELLING_PREFERENCE_WITH_ROOM_TYPE && $product->selling_preference_type != 0}style="display:none;"{/if}>
+
{/block}
{block name='blockcart_shopping_cart_hotel_name'}
- {if $product.selling_preference_type == Product::SELLING_PREFERENCE_HOTEL_STANDALONE || $product.selling_preference_type == Product::SELLING_PREFERENCE_HOTEL_STANDALONE_AND_WITH_ROOM_TYPE}
+ {if isset($hotel_wise_data.id_hotel) && $hotel_wise_data.id_hotel}
{$hotel_wise_data.hotel_name|escape:'html':'UTF-8'}
@@ -29,7 +29,7 @@
{if !isset($product.is_gift) || !$product.is_gift}
{if $product.booking_product}
{displayWtPrice p="`$product.bookingData.total_room_type_amount`"}
- {else if $product.selling_preference_type == Product::SELLING_PREFERENCE_HOTEL_STANDALONE || $product.selling_preference_type == Product::SELLING_PREFERENCE_HOTEL_STANDALONE_AND_WITH_ROOM_TYPE}
+ {else if isset($hotel_wise_data.id_hotel) && $hotel_wise_data.id_hotel}
{if $priceDisplay == $smarty.const.PS_TAX_EXC}{displayWtPrice p="`$hotel_wise_data.total_price_tax_excl`"}{else}{displayWtPrice p="`$hotel_wise_data.total_price_tax_incl`"}{/if}
{else}
{if $priceDisplay == $smarty.const.PS_TAX_EXC}{displayWtPrice p="`$product.total_price_tax_excl`"}{else}{displayWtPrice p="`$product.total_price_tax_incl`"}{/if}
@@ -53,10 +53,10 @@
{if $product.booking_product}
{$product.bookingData['total_num_rooms']}
{elseif $product.allow_multiple_quantity}
- {if $product.selling_preference_type == Product::SELLING_PREFERENCE_HOTEL_STANDALONE || $product.selling_preference_type == Product::SELLING_PREFERENCE_HOTEL_STANDALONE_AND_WITH_ROOM_TYPE}
+ {if isset($hotel_wise_data.id_hotel) && $hotel_wise_data.id_hotel}
{$hotel_wise_data.total_qty}
- {elseif $product.selling_preference_type == Product::SELLING_PREFERENCE_STANDALONE}
-
{$product.cart_quantity}
+ {elseif Product::isSellableAsStandalone($product.selling_preference_type)}
+
{$product.standalone_total_qty|intval}
{/if}
{/if}
@@ -99,9 +99,9 @@
{/block}
{else if $product.hasOptions}
{block name='blockcart_shopping_cart_options'}
- {if $product.selling_preference_type == Product::SELLING_PREFERENCE_HOTEL_STANDALONE || $product.selling_preference_type == Product::SELLING_PREFERENCE_HOTEL_STANDALONE_AND_WITH_ROOM_TYPE}
+ {if isset($hotel_wise_data.id_hotel) && $hotel_wise_data.id_hotel}
{assign var='options' value=$hotel_wise_data.options}
- {else if $product.selling_preference_type == Product::SELLING_PREFERENCE_STANDALONE}
+ {else}
{assign var='options' value=$product.options}
{/if}
@@ -155,4 +155,4 @@
{if !isset($product.attributes_small)}{/if}
{/if}
-{if isset($product.attributes_small)}{/if}
\ No newline at end of file
+{if isset($product.attributes_small)}{/if}
diff --git a/themes/hotel-reservation-theme/order-detail.tpl b/themes/hotel-reservation-theme/order-detail.tpl
index 9402a240d..81fa7f340 100644
--- a/themes/hotel-reservation-theme/order-detail.tpl
+++ b/themes/hotel-reservation-theme/order-detail.tpl
@@ -317,14 +317,27 @@
{assign var=room_price_tax_excl value=$order->getTotalProductsWithoutTaxes(false, true)}
{assign var=room_price_tax_incl value=$order->getTotalProductsWithTaxes(false, true)}
-
- {assign var=room_services_price_tax_excl value=($order->getTotalProductsWithoutTaxes(false, false, Product::SELLING_PREFERENCE_WITH_ROOM_TYPE) + $total_demands_price_te)}
- {assign var=room_services_price_tax_incl value=($order->getTotalProductsWithTaxes(false, false, Product::SELLING_PREFERENCE_WITH_ROOM_TYPE) + $total_demands_price_ti)}
+ {assign var=room_services_price_tax_excl value=(
+ $order->getTotalProductsWithoutTaxes(false, false, null, null, null, null, Order::SERVICE_PRODUCT_CONTEXT_ROOM_LINKED)
+ + $total_demands_price_te
+ )}
+ {assign var=room_services_price_tax_incl value=(
+ $order->getTotalProductsWithTaxes(false, false, null, null, null, null, Order::SERVICE_PRODUCT_CONTEXT_ROOM_LINKED)
+ + $total_demands_price_ti
+ )}
+ {assign var=all_services_price_tax_incl value=$order->getTotalProductsWithTaxes(false, false)}
+ {assign var=all_services_price_tax_excl value=$order->getTotalProductsWithoutTaxes(false, false)}
+ {assign var=room_linked_services_price_tax_incl value=$order->getTotalProductsWithTaxes(false, false, null, null, null, null, Order::SERVICE_PRODUCT_CONTEXT_ROOM_LINKED)}
+ {assign var=room_linked_services_price_tax_excl value=$order->getTotalProductsWithoutTaxes(false, false, null, null, null, null, Order::SERVICE_PRODUCT_CONTEXT_ROOM_LINKED)}
{assign var=total_tax_without_discount value=(($room_price_tax_incl - $room_price_tax_excl) + ($room_services_price_tax_incl - $room_services_price_tax_excl ))}
- {assign var=total_standard_products_tax_incl value=($order->getTotalProductsWithTaxes(false, false, Product::SELLING_PREFERENCE_STANDALONE) + $order->getTotalProductsWithTaxes(false, false, Product::SELLING_PREFERENCE_HOTEL_STANDALONE))}
- {assign var=total_standard_products_tax_excl value=($order->getTotalProductsWithoutTaxes(false, false, Product::SELLING_PREFERENCE_STANDALONE) + $order->getTotalProductsWithoutTaxes(false, false, Product::SELLING_PREFERENCE_HOTEL_STANDALONE))}
+ {assign var=total_standard_products_tax_incl value=(
+ $all_services_price_tax_incl - $room_linked_services_price_tax_incl
+ )}
+ {assign var=total_standard_products_tax_excl value=(
+ $all_services_price_tax_excl - $room_linked_services_price_tax_excl
+ )}
{if isset($cart_htl_data) && $cart_htl_data}
| {l s='Total rooms cost'} {if $use_taxes && $display_tax_label == 1}{if $priceDisplay == 1}{l s='(tax excl.)'}{elseif $priceDisplay == 0}{l s='(tax incl.)'}{/if} {/if} |
@@ -350,7 +363,7 @@
{/if}
- {if $total_convenience_fee_te || $total_convenience_fee_te}
+ {if $total_convenience_fee_te || $total_convenience_fee_ti}
| {l s='Total Convenience Fees'} {if $use_taxes && $display_tax_label == 1}{if $priceDisplay == 1}{l s='(tax excl.)'}{elseif $priceDisplay == 0}{l s='(tax incl.)'}{/if}{/if} |
@@ -726,11 +739,25 @@
{assign var=room_price_tax_excl value=$order->getTotalProductsWithoutTaxes(false, true)}
{assign var=room_price_tax_incl value=$order->getTotalProductsWithTaxes(false, true)}
- {assign var=room_services_price_tax_excl value=($order->getTotalProductsWithoutTaxes(false, false, Product::SELLING_PREFERENCE_WITH_ROOM_TYPE) + $total_demands_price_te)}
- {assign var=room_services_price_tax_incl value=($order->getTotalProductsWithTaxes(false, false, Product::SELLING_PREFERENCE_WITH_ROOM_TYPE) + $total_demands_price_ti)}
+ {assign var=room_services_price_tax_excl value=(
+ $order->getTotalProductsWithoutTaxes(false, false, null, null, null, null, Order::SERVICE_PRODUCT_CONTEXT_ROOM_LINKED)
+ + $total_demands_price_te
+ )}
+ {assign var=room_services_price_tax_incl value=(
+ $order->getTotalProductsWithTaxes(false, false, null, null, null, null, Order::SERVICE_PRODUCT_CONTEXT_ROOM_LINKED)
+ + $total_demands_price_ti
+ )}
+ {assign var=all_services_price_tax_incl value=$order->getTotalProductsWithTaxes(false, false)}
+ {assign var=all_services_price_tax_excl value=$order->getTotalProductsWithoutTaxes(false, false)}
+ {assign var=room_linked_services_price_tax_incl value=$order->getTotalProductsWithTaxes(false, false, null, null, null, null, Order::SERVICE_PRODUCT_CONTEXT_ROOM_LINKED)}
+ {assign var=room_linked_services_price_tax_excl value=$order->getTotalProductsWithoutTaxes(false, false, null, null, null, null, Order::SERVICE_PRODUCT_CONTEXT_ROOM_LINKED)}
- {assign var=total_standard_products_tax_incl value=($order->getTotalProductsWithTaxes(false, false, Product::SELLING_PREFERENCE_STANDALONE) + $order->getTotalProductsWithTaxes(false, false, Product::SELLING_PREFERENCE_HOTEL_STANDALONE))}
- {assign var=total_standard_products_tax_excl value=($order->getTotalProductsWithoutTaxes(false, false, Product::SELLING_PREFERENCE_STANDALONE) + $order->getTotalProductsWithoutTaxes(false, false, Product::SELLING_PREFERENCE_HOTEL_STANDALONE))}
+ {assign var=total_standard_products_tax_incl value=(
+ $all_services_price_tax_incl - $room_linked_services_price_tax_incl
+ )}
+ {assign var=total_standard_products_tax_excl value=(
+ $all_services_price_tax_excl - $room_linked_services_price_tax_excl
+ )}
{assign var=total_tax_without_discount value=(($room_price_tax_incl - $room_price_tax_excl) + ($room_services_price_tax_incl - $room_services_price_tax_excl) + ($total_standard_products_tax_incl - $total_standard_products_tax_excl))}
@@ -759,7 +786,7 @@
|
{/if}
- {if $total_convenience_fee_te || $total_convenience_fee_te}
+ {if $total_convenience_fee_te || $total_convenience_fee_ti}
| {l s='Total Convenience Fees'} {if $use_taxes && $display_tax_label == 1}{if $priceDisplay == 1}{l s='(tax excl.)'}{elseif $priceDisplay == 0}{l s='(tax incl.)'}{/if}{/if} |
|