From 1f18100fc5a2b84222cc5da904f211e389cebbfa Mon Sep 17 00:00:00 2001 From: "vishalsingh.qlo325" Date: Fri, 10 May 2024 16:22:02 +0530 Subject: [PATCH] Fixed: View on map button was displayed even if the option to display google maps for hotel location was disabled --- controllers/front/ContactController.php | 1 + themes/hotel-reservation-theme/contact-form.tpl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/controllers/front/ContactController.php b/controllers/front/ContactController.php index ba68dd08c..901506388 100644 --- a/controllers/front/ContactController.php +++ b/controllers/front/ContactController.php @@ -295,6 +295,7 @@ class ContactControllerCore extends FrontController $this->context->smarty->assign( array( 'hotelsInfo' => $hotelsInfo, + 'viewOnMap' => Configuration::get('WK_GOOGLE_ACTIVE_MAP'), 'gblHtlPhone' => $gblHtlPhone, 'gblHtlEmail' => $gblHtlEmail, 'gblHtlAddress' => $gblHtlAddress, diff --git a/themes/hotel-reservation-theme/contact-form.tpl b/themes/hotel-reservation-theme/contact-form.tpl index 6e7cbdc7e..4ebf927bd 100644 --- a/themes/hotel-reservation-theme/contact-form.tpl +++ b/themes/hotel-reservation-theme/contact-form.tpl @@ -184,7 +184,7 @@

{$hotel['hotel_name']}

{$hotel['address']}, {$hotel['city']}, {if {$hotel['state_name']}}{$hotel['state_name']},{/if} {$hotel['country_name']}, {$hotel['postcode']}

- {if $hotel['latitude'] != 0 || $hotel['longitude'] != 0} + {if ($hotel['latitude'] != 0 || $hotel['longitude'] != 0) && $viewOnMap}

{l s='View on map'}