Merge pull request #394 from abhishek-webkul/fix-hotel-city-access

Fix hotel city access method as introduced in tax flow changes
This commit is contained in:
Rohit Jain
2022-07-28 13:27:35 +05:30
committed by GitHub
5 changed files with 14 additions and 11 deletions

View File

@@ -752,11 +752,11 @@ abstract class PaymentModuleCore extends Module
$objBookingDetail->check_in_time = $objHotelBranch->check_in;
$objBookingDetail->check_out_time = $objHotelBranch->check_out;
if ($hotelAddress = $objHotelBranch->getAddress($objCartBkData->id_hotel)) {
$objHtlBkDtl->city = $hotelAddress['city'];
$objHtlBkDtl->state = $hotelAddress['state'];
$objHtlBkDtl->country = $hotelAddress['country'];
$objHtlBkDtl->zipcode = $hotelAddress['postcode'];
$objHtlBkDtl->phone = $hotelAddress['phone'];
$objBookingDetail->city = $hotelAddress['city'];
$objBookingDetail->state = $hotelAddress['state'];
$objBookingDetail->country = $hotelAddress['country'];
$objBookingDetail->zipcode = $hotelAddress['postcode'];
$objBookingDetail->phone = $hotelAddress['phone'];
}
}
if ($roomTypeInfo = $objRoomType->getRoomTypeInfoByIdProduct($idProduct)) {

View File

@@ -271,9 +271,10 @@ class AdminDashboardControllerCore extends AdminController
$hotelOptions = array(array('id_hotel' => false, 'hotel_name' => $this->l('All Hotels')));
foreach ($idsHotel as $idHotel) {
$objHotelBranchInfo = new HotelBranchInformation($idHotel, $this->context->language->id);
$hotelAddressInfo = $objHotelBranchInfo->getAddress($idHotel);
$hotelOptions[] = array(
'id_hotel' => (int) $idHotel,
'hotel_name' => $objHotelBranchInfo->hotel_name.', '.$objHotelBranchInfo->city,
'hotel_name' => $objHotelBranchInfo->hotel_name.', '.$hotelAddressInfo['city'],
);
}
$this->tpl_view_vars = array(

View File

@@ -872,7 +872,7 @@ class AdminOrdersControllerCore extends AdminController
unset($_COOKIE['wk_id_guest']);
*/
if ($payment_module->currentOrder) {
Tools::redirectAdmin(self::$currentIndex.'&id_order='.$payment_module->currentOrder.'&vieworder'.'&token='.$this->token);
Tools::redirectAdmin(self::$currentIndex.'&id_order='.$payment_module->currentOrder.'&vieworder'.'&token='.$this->token.'&conf=3');
}
}
} else {

View File

@@ -5503,11 +5503,12 @@ class AdminProductsControllerCore extends AdminController
foreach ($idsHotel as $idHotel) {
$objHotelBranchInfo = new HotelBranchInformation($idHotel, $this->context->language->id);
if (Validate::isLoadedObject($objHotelBranchInfo)) {
$hotelAddressInfo = $objHotelBranchInfo->getAddress($idHotel);
$hotelInfo = array(
'id_hotel' => $objHotelBranchInfo->id,
'hotel_name' => $objHotelBranchInfo->hotel_name,
'rating' => $objHotelBranchInfo->rating,
'city' => $objHotelBranchInfo->city,
'city' => $hotelAddressInfo['city'],
);
$hotelsInfo[] = $hotelInfo;
}

View File

@@ -19,12 +19,13 @@ class AdminOrderRestrictSettingsController extends ModuleAdminController
parent::__construct();
$this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'htl_branch_info` hb ON (a.`id_hotel` = hb.`id`)';
$this->_join .= 'LEFT JOIN `'._DB_PREFIX_.'address` ad ON (ad.`id_hotel` = hb.`id`)';
$this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'htl_branch_info_lang` hbl
ON (hb.`id` = hbl.`id` AND hbl.`id_lang` = '.(int)$this->context->language->id.')';
$this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'state` s ON (s.`id_state` = hb.`state_id`)';
$this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'state` s ON (s.`id_state` = ad.`id_state`)';
$this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'country_lang` cl
ON (cl.`id_country` = hb.`country_id` AND cl.`id_lang` = '.(int)$this->context->language->id.')';
$this->_select = 's.`name` as `state_name`, cl.`name` as country_name, hbl.`hotel_name`, hb.`city`, ';
ON (cl.`id_country` = ad.`id_country` AND cl.`id_lang` = '.(int)$this->context->language->id.')';
$this->_select = 's.`name` as `state_name`, cl.`name` as country_name, hbl.`hotel_name`, ad.`city`, ';
$this->fields_options = array(
'orderrestrict' => array(
'title' => $this->l('Order Restriction Setting'),