Fixed: Hotel locations is displayed on the google map at order-detail and category page even if option 'Display Google Maps For Hotel Location' is disabled

This commit is contained in:
vishalsingh.qlo325
2024-06-12 11:28:54 +05:30
parent 27a7b6ebd3
commit e7c85cd154
5 changed files with 13 additions and 6 deletions

View File

@@ -406,6 +406,7 @@ class OrderDetailControllerCore extends FrontController
'obj_hotel_branch_information' => $objHotelBranchInformation,
'hotel_address_info' => $hotelAddressInfo,
'hotel_refund_rules' => $hotelRefundRules,
'view_on_google_map' => Configuration::get('WK_GOOGLE_ACTIVE_MAP'),
)
);
// }
@@ -782,7 +783,9 @@ class OrderDetailControllerCore extends FrontController
if ($idHotel = HotelBookingDetail::getIdHotelByIdOrder(Tools::getValue('id_order'))) {
$objHotelBranchInformation = new HotelBranchInformation($idHotel, $this->context->language->id);
if (Validate::isLoadedObject($objHotelBranchInformation)) {
if ($apiKey = Configuration::get('PS_API_KEY')) {
if (($apiKey = Configuration::get('PS_API_KEY'))
&& Configuration::get('WK_GOOGLE_ACTIVE_MAP')
) {
if (floatval($objHotelBranchInformation->latitude) != 0
&& floatval($objHotelBranchInformation->longitude) != 0
) {