Added: New variables in cart summary to display the price more correctly

This commit is contained in:
vishalsingh.qlo325
2024-10-03 19:28:11 +05:30
parent cc5a1d4cac
commit ab59b310a0
3 changed files with 20 additions and 10 deletions

View File

@@ -3772,6 +3772,14 @@ class CartCore extends ObjectModel
}
$objHotelAdvancedPayment = new HotelAdvancedPayment();
$total_rooms_services_tax_excl_without_discount = $total_rooms + $total_demands + $total_additional_services + $total_additional_services_auto_add;
$total_rooms_services_tax_incl_without_discount = $total_rooms_wt + $total_demands_wt + $total_additional_services_wt + $total_additional_services_auto_add_wt;
$total_tax_excl_without_discount = $total_rooms_services_tax_excl_without_discount + $convenience_fee;
$total_tax_incl_without_discount = $total_rooms_services_tax_incl_without_discount + $convenience_fee_wt;
$total_tax_without_discount = $total_tax_incl_without_discount - $total_tax_excl_without_discount;
if ($total_tax_without_discount < 0) {
$total_tax_without_discount = 0;
}
$summary = array(
'delivery' => $delivery,
@@ -3814,6 +3822,11 @@ class CartCore extends ObjectModel
'is_multi_address_delivery' => $this->isMultiAddressDelivery() || ((int)Tools::getValue('multi-shipping') == 1),
'free_ship' =>!$total_shipping && !count($this->getDeliveryAddressesWithoutCarriers(true, $errors)),
'carrier' => new Carrier($this->id_carrier, $id_lang),
'total_rooms_services_tax_excl_without_discount' => $total_rooms_services_tax_excl_without_discount,
'total_rooms_services_tax_incl_without_discount' => $total_rooms_services_tax_incl_without_discount,
'total_tax_excl_without_discount' => $total_tax_excl_without_discount,
'total_tax_incl_without_discount' => $total_tax_incl_without_discount,
'total_tax_without_discount' => $total_tax_without_discount
);
$hook = Hook::exec('actionCartSummary', $summary, null, true);