diff --git a/classes/Cart.php b/classes/Cart.php index 921afd2cf..7500dd21e 100644 --- a/classes/Cart.php +++ b/classes/Cart.php @@ -2407,7 +2407,8 @@ class CartCore extends ObjectModel $product['cart_quantity'] = $selectedProduct['quantity']; $product['total'] = $selectedProduct['total_price_tax_excl']; $product['total_wt'] = $selectedProduct['total_price_tax_incl']; - $product['price_wt'] = $selectedProduct['unit_price_tax_incl']; + $product['price_wt'] = $selectedProduct['total_price_tax_incl'] / $product['cart_quantity']; + $product['price'] = $selectedProduct['total_price_tax_excl'] / $product['cart_quantity']; $product['id_hotel'] = $selectedProduct['id_hotel']; $orderPackage[$id_address][$selectedProduct['id_hotel']]['product_list'][] = $product; if (!isset($orderPackage[$id_address][$selectedProduct['id_hotel']]['id_hotel'])) { diff --git a/controllers/admin/AdminNormalProductsController.php b/controllers/admin/AdminNormalProductsController.php index 87a959951..cf78be63c 100644 --- a/controllers/admin/AdminNormalProductsController.php +++ b/controllers/admin/AdminNormalProductsController.php @@ -3079,7 +3079,7 @@ class AdminNormalProductsControllerCore extends AdminController } else { $address->id_country = (int)$address_infos['id_country']; $address->id_state = (int)$address_infos['id_state']; - $address->zipcode = $address_infos['postcode']; + $address->postcode = $address_infos['postcode']; } $tax_rules_groups = TaxRulesGroup::getTaxRulesGroups(true); $tax_rates = array( diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php index 089d56c9c..ee8a33dfb 100644 --- a/controllers/admin/AdminProductsController.php +++ b/controllers/admin/AdminProductsController.php @@ -3180,12 +3180,8 @@ class AdminProductsControllerCore extends AdminController $objRoomTypeServiceProductPrice->id_element = $idProduct; $objRoomTypeServiceProductPrice->element_type = RoomTypeServiceProduct::WK_ELEMENT_TYPE_ROOM_TYPE; } - $objRoomTypeServiceProductPrice->price = $price; - if ($idTaxRulesGroup) { - $objRoomTypeServiceProductPrice->id_tax_rules_group = $idTaxRulesGroup; - } - + $objRoomTypeServiceProductPrice->id_tax_rules_group = $idTaxRulesGroup; $objRoomTypeServiceProductPrice->save(); } else { // create new association @@ -3912,7 +3908,7 @@ class AdminProductsControllerCore extends AdminController } else { $address->id_country = (int)$address_infos['id_country']; $address->id_state = (int)$address_infos['id_state']; - $address->zipcode = $address_infos['postcode']; + $address->postcode = $address_infos['postcode']; } $tax_rules_groups = TaxRulesGroup::getTaxRulesGroups(true); diff --git a/modules/hotelreservationsystem/classes/HotelRoomTypeFeaturePricing.php b/modules/hotelreservationsystem/classes/HotelRoomTypeFeaturePricing.php index f4be56fd3..5dbfbd1db 100644 --- a/modules/hotelreservationsystem/classes/HotelRoomTypeFeaturePricing.php +++ b/modules/hotelreservationsystem/classes/HotelRoomTypeFeaturePricing.php @@ -794,14 +794,14 @@ class HotelRoomTypeFeaturePricing extends ObjectModel * @param [int] $id_product [id of the product] * @return [array] [returns all feature prices by product] */ - public function getFeaturePricesbyIdProduct($id_product) + public function getFeaturePricesbyIdProduct($id_product, $id_cart = 0, $id_guest = 0, $id_room = 0) { $idLang = Context::getContext()->language->id; return Db::getInstance()->executeS( 'SELECT hrfp.*, hrfpl.`feature_price_name` FROM `'._DB_PREFIX_.'htl_room_type_feature_pricing` hrfp LEFT JOIN `'._DB_PREFIX_.'htl_room_type_feature_pricing_lang` hrfpl ON(hrfp.`id_feature_price` = hrfpl.`id_feature_price` AND hrfpl.`id_lang` = '.(int)$idLang.') - WHERE `id_product` = '.(int)$id_product + WHERE `id_product` = '.(int)$id_product.' AND `id_cart` = '.(int)$id_cart.' AND `id_guest` = '.(int)$id_guest.' AND `id_room` = '.(int)$id_room ); } diff --git a/modules/hotelreservationsystem/controllers/admin/AdminOrderRefundRequestsController.php b/modules/hotelreservationsystem/controllers/admin/AdminOrderRefundRequestsController.php index f6eb2fb5f..fa74ab46a 100644 --- a/modules/hotelreservationsystem/controllers/admin/AdminOrderRefundRequestsController.php +++ b/modules/hotelreservationsystem/controllers/admin/AdminOrderRefundRequestsController.php @@ -493,7 +493,7 @@ class AdminOrderRefundRequestsController extends ModuleAdminController $cartrule->date_from = date('Y-m-d H:i:s', $now); $cartrule->date_to = date('Y-m-d H:i:s', $now + (3600 * 24 * 365.25)); /* 1 year */ $cartrule->active = 1; - + $cartrule->highlight = 1; $cartrule->reduction_amount = $totalRefundedAmount; $cartrule->reduction_tax = true; $cartrule->minimum_amount_currency = $objOrder->id_currency; diff --git a/modules/wkroomsearchblock/classes/WkRoomSearchHelper.php b/modules/wkroomsearchblock/classes/WkRoomSearchHelper.php index 7ab3d7138..dc4ac075c 100644 --- a/modules/wkroomsearchblock/classes/WkRoomSearchHelper.php +++ b/modules/wkroomsearchblock/classes/WkRoomSearchHelper.php @@ -159,11 +159,13 @@ class WkRoomSearchHelper $searchedData['location'] = $objLocationCategory->name; } else { $locationCategoryId = $objCategory->id_parent; - $searchedData['location'] = $searchedData['htl_dtl']['city']; - if (isset($searchedData['htl_dtl']['state_name'])) { - $searchedData['location'] .= ', '.$searchedData['htl_dtl']['state_name']; + if ($searchedData['htl_dtl']) { + $searchedData['location'] = $searchedData['htl_dtl']['city']; + if (isset($searchedData['htl_dtl']['state_name'])) { + $searchedData['location'] .= ', '.$searchedData['htl_dtl']['state_name']; + } + $searchedData['location'] .= ', '.$searchedData['htl_dtl']['country_name']; } - $searchedData['location'] .= ', '.$searchedData['htl_dtl']['country_name']; } $searchedData['location_category_id'] = $locationCategoryId; diff --git a/themes/hotel-reservation-theme/discount.tpl b/themes/hotel-reservation-theme/discount.tpl index ea4ba715f..b011b1ec2 100644 --- a/themes/hotel-reservation-theme/discount.tpl +++ b/themes/hotel-reservation-theme/discount.tpl @@ -53,7 +53,7 @@ {/if} {if $discountDetail.reduction_amount > 0} {if $discountDetail.reduction_percent > 0} + {/if} - {convertPrice price=$discountDetail.reduction_amount} ({if $discountDetail.reduction_tax == 1}{l s='Tax included'}{else}{l s='Tax excluded'}{/if}) + {displayPrice price=$discountDetail.reduction_amount currency=$discountDetail.reduction_currency} ({if $discountDetail.reduction_tax == 1}{l s='Tax included'}{else}{l s='Tax excluded'}{/if}) {/if} {if $discountDetail.free_shipping} {if $discountDetail.reduction_percent > 0 || $discountDetail.reduction_amount > 0} + {/if} @@ -73,7 +73,7 @@ {if $discountDetail.minimal == 0} {l s='None'} {else} - {convertPrice price=$discountDetail.minimal} ({if $discountDetail.minimum_amount_tax == 1}{l s='Tax included'}{else}{l s='Tax excluded'}{/if}) + {displayPrice price=$discountDetail.minimal currency=$discountDetail.reduction_currency} ({if $discountDetail.minimum_amount_tax == 1}{l s='Tax included'}{else}{l s='Tax excluded'}{/if}) {/if}