Fixed: View on map button was displayed even if the option to display google maps for hotel location was disabled

This commit is contained in:
vishalsingh.qlo325
2024-05-10 16:22:02 +05:30
parent 8dcfc9e892
commit 1f18100fc5
2 changed files with 2 additions and 1 deletions

View File

@@ -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,

View File

@@ -184,7 +184,7 @@
<div class="col-xs-8">
<p class="hotel-name"><span>{$hotel['hotel_name']}</span></p>
<p class="hotel-branch-info-value">{$hotel['address']}, {$hotel['city']}, {if {$hotel['state_name']}}{$hotel['state_name']},{/if} {$hotel['country_name']}, {$hotel['postcode']}</p>
{if $hotel['latitude'] != 0 || $hotel['longitude'] != 0}
{if ($hotel['latitude'] != 0 || $hotel['longitude'] != 0) && $viewOnMap}
<p class="hotel-branch-info-value">
<a class="btn htl-map-direction-btn" href="http://maps.google.com/maps?daddr=({$hotel['latitude']},{$hotel['longitude']})" target="_blank">
<span class="">{l s='View on map'}</span>