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:
@@ -629,7 +629,9 @@ class GuestTrackingControllerCore extends FrontController
|
||||
if ($idHotel = HotelBookingDetail::getIdHotelByIdOrder($objOrder->id)) {
|
||||
$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
|
||||
) {
|
||||
|
||||
@@ -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
|
||||
) {
|
||||
|
||||
@@ -307,7 +307,7 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController
|
||||
'value' => 0,
|
||||
),
|
||||
),
|
||||
'hint' => $this->l('If set to No, Google Maps will not be displayed for hotel location. You need to set hotels location from edit hotel page to display location on the map at contact-us page.'),
|
||||
'hint' => $this->l('If set to No, Google Maps will not be displayed for hotel location. You need to set hotels location from edit hotel page to display location on the map on front office.'),
|
||||
),
|
||||
'WK_MAP_HOTEL_ACTIVE_ONLY' => array(
|
||||
'title' => $this->l('Display Active Hotels Only'),
|
||||
|
||||
@@ -293,7 +293,9 @@ class HotelReservationSystem extends Module
|
||||
public function hookDisplayLeftColumn()
|
||||
{
|
||||
if (Tools::getValue('controller') == 'category') {
|
||||
if ($apiKey = Configuration::get('PS_API_KEY')) {
|
||||
if (($apiKey = Configuration::get('PS_API_KEY'))
|
||||
&& Configuration::get('WK_GOOGLE_ACTIVE_MAP')
|
||||
) {
|
||||
$idCategory = Tools::getValue('id_category');
|
||||
$idHotel = HotelBranchInformation::getHotelIdByIdCategory($idCategory);
|
||||
$objHotel = new HotelBranchInformation($idHotel, $this->context->language->id);
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
<div class="card-text">{l s='Hotel location not available.'}</div>
|
||||
{/if}
|
||||
|
||||
{if ($obj_hotel_branch_information->latitude|floatval != 0 && $obj_hotel_branch_information->longitude|floatval != 0)}
|
||||
{if ($obj_hotel_branch_information->latitude|floatval != 0 && $obj_hotel_branch_information->longitude|floatval != 0) && $view_on_google_map}
|
||||
<div class="hotel-location-map">
|
||||
<div class="booking-hotel-map-container"></div>
|
||||
</div>
|
||||
@@ -542,7 +542,7 @@
|
||||
<div class="card-text">{l s='Hotel location not available.'}</div>
|
||||
{/if}
|
||||
|
||||
{if ($obj_hotel_branch_information->latitude|floatval != 0 && $obj_hotel_branch_information->longitude|floatval != 0)}
|
||||
{if ($obj_hotel_branch_information->latitude|floatval != 0 && $obj_hotel_branch_information->longitude|floatval != 0) && $view_google_map}
|
||||
<div class="hotel-location-map">
|
||||
<div class="booking-hotel-map-container"></div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user