Merge pull request #416 from shreesh-webkul/order-fix

Resolved wrong address while creating new booking
This commit is contained in:
Rohit Jain
2022-08-04 15:06:46 +05:30
committed by GitHub
2 changed files with 5 additions and 1 deletions

View File

@@ -751,7 +751,7 @@ abstract class PaymentModuleCore extends Module
$objBookingDetail->email = $objHotelBranch->email;
$objBookingDetail->check_in_time = $objHotelBranch->check_in;
$objBookingDetail->check_out_time = $objHotelBranch->check_out;
if ($hotelAddress = $objHotelBranch->getAddress($objCartBkData->id_hotel)) {
if ($hotelAddress = $objHotelBranch->getAddress($objCartBookingData->id_hotel)) {
$objBookingDetail->city = $hotelAddress['city'];
$objBookingDetail->state = $hotelAddress['state'];
$objBookingDetail->country = $hotelAddress['country'];

View File

@@ -376,6 +376,10 @@ class HotelBranchInformation extends ObjectModel
if (!$id_lang)
$id_lang = Context::getContext()->language->id;
if (!$id_hotel) {
return false;
}
$cache_id = 'hotelBranch::getAddress'.(int)$id_hotel.'-'.(int)$id_lang;
if (!Cache::isStored($cache_id)) {
$sql = 'SELECT a.*, cl.`name` AS country, s.`name` AS state, s.`iso_code` AS state_iso