diff --git a/modules/blockcart/blockcart.php b/modules/blockcart/blockcart.php
index f81a4c785..edb46552d 100644
--- a/modules/blockcart/blockcart.php
+++ b/modules/blockcart/blockcart.php
@@ -218,11 +218,14 @@ class Blockcart extends Module
$tax_cost = 0;
$tourismTaxCost = Tools::displayPrice(0, $currency);
+ $totalTaxesCost = Tools::displayPrice(0, $currency);
if ($useTax && $useTax) {
$totalToPayWithoutTaxes = $params['cart']->getOrderTotal(false);
$tax_cost = Tools::displayPrice(($totalToPay - $totalToPayWithoutTaxes) - $tourismTax, $currency);
$tourismTaxCost = Tools::displayPrice($tourismTax, $currency);
+ $totalTaxesCost = Tools::displayPrice($totalToPay - $totalToPayWithoutTaxes, $currency);
}
+ $showTourismTaxSeparately = (bool) Configuration::get('QLO_TOURISM_TAX_SHOW_SEPARATE');
// The cart content is altered for display
$orderProcess = Configuration::get('PS_ORDER_PROCESS_TYPE') ? 'order-opc' : 'order';
foreach ($cart_rules as &$cart_rule) {
@@ -439,6 +442,8 @@ class Blockcart extends Module
'tax_cost' => $tax_cost,
'tourism_tax_cost' => $tourismTaxCost,
'tourism_tax' => $tourismTax,
+ 'total_taxes_cost' => $totalTaxesCost,
+ 'show_tourism_tax_separately' => $showTourismTaxSeparately,
'wrapping_cost' => Tools::displayPrice($wrappingCost, $currency),
'product_total' => Tools::displayPrice($params['cart']->getOrderTotal($useTax, Cart::ONLY_PRODUCTS), $currency),
'room_total' => ($totalRoomsPrice + $totalAdditionalServicesWithAutoAddPrice + $totalAdditionalServicesWithoutAutoAddPrice),
diff --git a/modules/blockcart/blockcart.tpl b/modules/blockcart/blockcart.tpl
index 80249a25a..a4227cd3e 100644
--- a/modules/blockcart/blockcart.tpl
+++ b/modules/blockcart/blockcart.tpl
@@ -137,7 +137,7 @@
{/if} -->
{block name='blockcart_shopping_cart_total_tax'}
{if $show_tax && $use_tax}
-
+
{$tax_cost}
{l s='Room and Service Tax' mod='blockcart'}
@@ -145,12 +145,20 @@
{/block}
{block name='blockcart_shopping_cart_total_tourism_tax'}
{if $show_tax && $use_tax}
-
+
{$tourism_tax_cost}
{l s='Total Tourism Tax' mod='blockcart'}
{/if}
{/block}
+ {block name='blockcart_shopping_cart_total_taxes_combined'}
+ {if $show_tax && $use_tax}
+
0} style="display:none"{/if}>
+ {$total_taxes_cost}
+ {l s='Total Taxes' mod='blockcart'}
+
+ {/if}
+ {/block}
{block name='blockcart_shopping_cart_total_convenience_fee'}
{if isset($total_convenience_fee)}
@@ -352,7 +360,7 @@
{/block}
{block name='blockcart_layer_cart_total_tax'}
{if $show_tax && $use_tax}
-
+
{l s='Room and Service Tax' mod='blockcart'}
{$tax_cost}
@@ -360,12 +368,20 @@
{/block}
{block name='blockcart_layer_cart_total_tourism_tax'}
{if $show_tax && $use_tax}
-
+
{l s='Total Tourism Tax' mod='blockcart'}
{$tourism_tax_cost}
{/if}
{/block}
+ {block name='blockcart_layer_cart_total_taxes_combined'}
+ {if $show_tax && $use_tax}
+
0} style="display:none"{/if}>
+ {l s='Total Taxes' mod='blockcart'}
+ {$total_taxes_cost}
+
+ {/if}
+ {/block}
{block name='blockcart_layer_cart_total_price'}
diff --git a/themes/hotel-reservation-theme/css/modules/blockcart/blockcart.css b/themes/hotel-reservation-theme/css/modules/blockcart/blockcart.css
index fbc3166f9..4ed382348 100644
--- a/themes/hotel-reservation-theme/css/modules/blockcart/blockcart.css
+++ b/themes/hotel-reservation-theme/css/modules/blockcart/blockcart.css
@@ -229,6 +229,7 @@
.cart_block .cart_block_shipping_cost,
.cart_block .cart_block_tax_cost,
.cart_block .cart_block_tourism_tax_cost,
+.cart_block .cart_block_total_taxes_cost,
.cart_block .cart_block_total,
.cart_block .cart_block_wrapping_cost,
.cart_block .cart_block_convenience_fee {
diff --git a/themes/hotel-reservation-theme/js/modules/blockcart/ajax-cart.js b/themes/hotel-reservation-theme/js/modules/blockcart/ajax-cart.js
index 7a49b4e57..482f315a3 100644
--- a/themes/hotel-reservation-theme/js/modules/blockcart/ajax-cart.js
+++ b/themes/hotel-reservation-theme/js/modules/blockcart/ajax-cart.js
@@ -1327,10 +1327,13 @@ var ajaxCart = {
$('.ajax_cart_tax_cost').text(jsonData.tax_cost);
$('.ajax_cart_tourism_tax_cost').text(jsonData.tourism_tax_cost);
- if (parseFloat(jsonData.tourism_tax) > 0) {
- $('.ajax_cart_tourism_tax_line').show();
+ $('.ajax_cart_total_taxes_cost').text(jsonData.total_taxes_cost);
+ if (jsonData.show_tourism_tax_separately && parseFloat(jsonData.tourism_tax) > 0) {
+ $('.ajax_cart_tax_line, .ajax_cart_tourism_tax_line').show();
+ $('.ajax_cart_total_taxes_line').hide();
} else {
- $('.ajax_cart_tourism_tax_line').hide();
+ $('.ajax_cart_tax_line, .ajax_cart_tourism_tax_line').hide();
+ $('.ajax_cart_total_taxes_line').show();
}
$('.cart_block_wrapping_cost').text(jsonData.wrapping_cost);
diff --git a/themes/hotel-reservation-theme/modules/blockcart/blockcart.tpl b/themes/hotel-reservation-theme/modules/blockcart/blockcart.tpl
index f5be5f9d7..5cad1221a 100644
--- a/themes/hotel-reservation-theme/modules/blockcart/blockcart.tpl
+++ b/themes/hotel-reservation-theme/modules/blockcart/blockcart.tpl
@@ -137,7 +137,8 @@
{/if} -->
{block name='blockcart_shopping_cart_total_tax'}
{if $show_tax && $use_tax}
-
+ {* Always rendered — see blockcart_shopping_cart_total_tourism_tax below for why a value-gated {if} would break on later AJAX-only cart updates. *}
+
{$tax_cost}
{l s='Room and Service Tax' mod='blockcart'}
@@ -145,12 +146,20 @@
{/block}
{block name='blockcart_shopping_cart_total_tourism_tax'}
{if $show_tax && $use_tax}
-
+
{$tourism_tax_cost}
{l s='Total Tourism Tax' mod='blockcart'}
{/if}
{/block}
+ {block name='blockcart_shopping_cart_total_taxes_combined'}
+ {if $show_tax && $use_tax}
+
0} style="display:none"{/if}>
+ {$total_taxes_cost}
+ {l s='Total Taxes' mod='blockcart'}
+
+ {/if}
+ {/block}
{block name='blockcart_shopping_cart_total_convenience_fee'}
{if isset($total_convenience_fee) && $total_convenience_fee}
@@ -352,7 +361,9 @@
{/block}
{block name='blockcart_layer_cart_total_tax'}
{if $show_tax && $use_tax}
-
+ {* Always rendered — see the matching dropdown block above for why a value-gated
+ {if} would break on later AJAX-only cart updates. *}
+
{l s='Room and Service Tax' mod='blockcart'}
{$tax_cost}
@@ -362,12 +373,20 @@
{if $show_tax && $use_tax}
{* Always rendered — see the matching dropdown block above for why a value-gated
{if} would break on later AJAX-only cart updates. *}
-
+
{l s='Total Tourism Tax' mod='blockcart'}
{$tourism_tax_cost}
{/if}
{/block}
+ {block name='blockcart_layer_cart_total_taxes_combined'}
+ {if $show_tax && $use_tax}
+
0} style="display:none"{/if}>
+ {l s='Total Taxes' mod='blockcart'}
+ {$total_taxes_cost}
+
+ {/if}
+ {/block}
{block name='blockcart_layer_cart_total_price'}