Merge pull request #1018 from vishal-singh-webkul/gli-1818
Fixed: Notices and display issue when there is no rooms and no hotel available.
This commit is contained in:
@@ -278,7 +278,7 @@ class AdminNormalProductsControllerCore extends AdminController
|
||||
$idServiceCategory = Configuration::get('PS_SERVICE_CATEGORY');
|
||||
$this->objLocationsCategory = new Category($idServiceCategory, $this->context->language->id);
|
||||
$nestedCategories = Category::getNestedCategories($idServiceCategory);
|
||||
if ($nestedCategories) {
|
||||
if (isset($nestedCategories[$idServiceCategory]['children']) && $nestedCategories[$idServiceCategory]['children']) {
|
||||
foreach ($nestedCategories[$idServiceCategory]['children'] as $childCategory) {
|
||||
$this->buildCategoryOptions($childCategory);
|
||||
}
|
||||
|
||||
@@ -245,9 +245,10 @@ class AdminProductsControllerCore extends AdminController
|
||||
);
|
||||
} else {
|
||||
$hotels = HotelBranchInformation::getProfileAccessedHotels($this->context->employee->id_profile, 1);
|
||||
$hotelsArray = array();
|
||||
foreach ($hotels as $hotel) {
|
||||
$addressInfo = HotelBranchInformation::getAddress($hotel['id_hotel']);
|
||||
$this->hotelsArray[$hotel['id_hotel']] = $hotel['hotel_name'].', '.$addressInfo['city'];
|
||||
$hotelsArray[$hotel['id_hotel']] = $hotel['hotel_name'].', '.$addressInfo['city'];
|
||||
}
|
||||
|
||||
$this->fields_list['hotel_name'] = array(
|
||||
@@ -256,7 +257,7 @@ class AdminProductsControllerCore extends AdminController
|
||||
'multiple' => true,
|
||||
'operator' => 'or',
|
||||
'filter_key' => 'hrt!id_hotel',
|
||||
'list' => $this->hotelsArray,
|
||||
'list' => $hotelsArray,
|
||||
'optional' => true,
|
||||
'class' => 'chosen',
|
||||
'visible_default' => true,
|
||||
@@ -399,7 +400,7 @@ class AdminProductsControllerCore extends AdminController
|
||||
$idLocationsCategory = Configuration::get('PS_LOCATIONS_CATEGORY');
|
||||
$this->objLocationsCategory = new Category($idLocationsCategory, $this->context->language->id);
|
||||
$nestedCategories = Category::getNestedCategories($idLocationsCategory);
|
||||
if ($nestedCategories) {
|
||||
if (isset($nestedCategories[$idLocationsCategory]['children']) && $nestedCategories[$idLocationsCategory]['children']) {
|
||||
foreach ($nestedCategories[$idLocationsCategory]['children'] as $childCategory) {
|
||||
$this->buildCategoryOptions($childCategory);
|
||||
}
|
||||
|
||||
@@ -127,7 +127,10 @@ class WkRoomSearchBlock extends Module
|
||||
// In the xs sceen the booking button on the landing page
|
||||
public function hookDisplayAfterHeaderHotelDesc()
|
||||
{
|
||||
return $this->display(__FILE__, 'landingPageXsBtn.tpl');
|
||||
$objHotelInfo = new HotelBranchInformation();
|
||||
if ($objHotelInfo->hotelBranchesInfo(0, 1)) {
|
||||
return $this->display(__FILE__, 'landingPageXsBtn.tpl');
|
||||
}
|
||||
}
|
||||
|
||||
// search panel block on the category page on left block
|
||||
|
||||
Reference in New Issue
Block a user