diff --git a/modules/wkabouthotelblock/wkabouthotelblock.php b/modules/wkabouthotelblock/wkabouthotelblock.php index 89e9dc0a8..45173f401 100644 --- a/modules/wkabouthotelblock/wkabouthotelblock.php +++ b/modules/wkabouthotelblock/wkabouthotelblock.php @@ -85,15 +85,24 @@ class WkAboutHotelBlock extends Module public function install() { $objAboutHotelBlockDb = new WkAboutHotelBlockDb(); - $objHtlInteriorImg = new WkHotelInteriorImage(); if (!parent::install() || !$objAboutHotelBlockDb->createTables() || !$this->registerModuleHooks() || !$this->callInstallTab() - || !$objHtlInteriorImg->insertModuleDemoData() ) { return false; } + + // if module should create demo data during installation + if (isset($this->populateData) && $this->populateData) { + $objHtlInteriorImg = new WkHotelInteriorImage(); + if (!$objHtlInteriorImg->insertModuleDemoData()) { + return false; + } + } else { + Tools::deleteDirectory($this->local_path.'views/img/dummy_img'); + } + return true; } diff --git a/modules/wkhotelfeaturesblock/views/img/hotels_features_img/1.jpg b/modules/wkhotelfeaturesblock/views/img/hotels_features_img/1.jpg deleted file mode 100644 index 6c0c9709d..000000000 Binary files a/modules/wkhotelfeaturesblock/views/img/hotels_features_img/1.jpg and /dev/null differ diff --git a/modules/wkhotelfeaturesblock/views/img/hotels_features_img/2.jpg b/modules/wkhotelfeaturesblock/views/img/hotels_features_img/2.jpg deleted file mode 100644 index 8694ca69a..000000000 Binary files a/modules/wkhotelfeaturesblock/views/img/hotels_features_img/2.jpg and /dev/null differ diff --git a/modules/wkhotelfeaturesblock/views/img/hotels_features_img/3.jpg b/modules/wkhotelfeaturesblock/views/img/hotels_features_img/3.jpg deleted file mode 100644 index acec2836f..000000000 Binary files a/modules/wkhotelfeaturesblock/views/img/hotels_features_img/3.jpg and /dev/null differ diff --git a/modules/wkhotelfeaturesblock/views/img/hotels_features_img/4.jpg b/modules/wkhotelfeaturesblock/views/img/hotels_features_img/4.jpg deleted file mode 100644 index 68cae0fb2..000000000 Binary files a/modules/wkhotelfeaturesblock/views/img/hotels_features_img/4.jpg and /dev/null differ diff --git a/modules/wkhotelfeaturesblock/wkhotelfeaturesblock.php b/modules/wkhotelfeaturesblock/wkhotelfeaturesblock.php index a882e7404..6cb77dda0 100644 --- a/modules/wkhotelfeaturesblock/wkhotelfeaturesblock.php +++ b/modules/wkhotelfeaturesblock/wkhotelfeaturesblock.php @@ -115,15 +115,24 @@ class WkHotelFeaturesBlock extends Module public function install() { $objHotelFeaturesBlockDb = new WkHotelFeaturesBlockDb(); - $objFeaturesData = new WkHotelFeaturesData(); if (!parent::install() || !$objHotelFeaturesBlockDb->createTables() || !$this->registerModuleHooks() || !$this->callInstallTab() - || !$objFeaturesData->insertModuleDemoData() ) { return false; } + + // if module should create demo data during installation + if (isset($this->populateData) && $this->populateData) { + $objHotelFeaturesData = new WkHotelHotelFeaturesData(); + if (!$objHotelFeaturesData->insertModuleDemoData()) { + return false; + } + } else { + Tools::deleteDirectory($this->local_path.'views/img/dummy_img'); + } + return true; } diff --git a/modules/wkroomsearchblock/wkroomsearchblock.php b/modules/wkroomsearchblock/wkroomsearchblock.php index e959bf65d..24ff623c8 100644 --- a/modules/wkroomsearchblock/wkroomsearchblock.php +++ b/modules/wkroomsearchblock/wkroomsearchblock.php @@ -47,42 +47,42 @@ class WkRoomSearchBlock extends Module { $controller = Tools::getValue('controller'); // apply assets globally for all pages of search panel - if ('category' == $controller - || 'index' == $controller - || 'product' == $controller - ) { + if ('category' == $controller || 'index' == $controller || 'product' == $controller ) { + $objHotelBranchInformation = new HotelBranchInformation(); + $hotelBranchesInfo = $objHotelBranchInformation->hotelBranchesInfo(0, 1); + if (is_array($hotelBranchesInfo) && count($hotelBranchesInfo)) { + $this->context->controller->addCSS($this->_path.'/views/css/wk-global-search.css'); + $this->context->controller->addJS($this->_path.'/views/js/wk-room-search-block.js'); - $this->context->controller->addCSS($this->_path.'/views/css/wk-global-search.css'); - $this->context->controller->addJS($this->_path.'/views/js/wk-room-search-block.js'); - - Media::addJsDef( - array ( - 'autocomplete_search_url' => $this->context->link->getModuleLink( - 'wkroomsearchblock', - 'autocompletesearch' - ), - 'no_results_found_cond' => $this->l('No results found for this search', false, true), - 'hotel_name_cond' => $this->l('Please select a hotel name', false, true), - 'check_in_time_cond' => $this->l('Please enter Check In time', false, true), - 'check_out_time_cond' => $this->l('Please enter Check Out time', false, true), - 'less_checkin_date' => $this->l('Check In date can not be before current date.', false, true), - 'more_checkout_date' => $this->l('Check Out date must be greater than Check In date.', false, true), - 'select_htl_txt' => $this->l('Select Hotel', false, true), - 'select_age_txt' => $this->l('Select age', false, true), - 'under_1_age' => $this->l('Under 1', false, true), - 'room_txt' => $this->l('Room', false, true), - 'rooms_txt' => $this->l('Rooms', false, true), - 'remove_txt' => $this->l('Remove', false, true), - 'adult_txt' => $this->l('Adult', false, true), - 'adults_txt' => $this->l('Adults', false, true), - 'child_txt' => $this->l('Child', false, true), - 'children_txt' => $this->l('Children', false, true), - 'below_txt' => $this->l('Below', false, true), - 'years_txt' => $this->l('years', false, true), - 'all_children_txt' => $this->l('All Children', false, true), - 'invalid_occupancy_txt' => $this->l('Invalid occupancy(adults/children) found.', false, true), - ) - ); + Media::addJsDef( + array ( + 'autocomplete_search_url' => $this->context->link->getModuleLink( + 'wkroomsearchblock', + 'autocompletesearch' + ), + 'no_results_found_cond' => $this->l('No results found for this search', false, true), + 'hotel_name_cond' => $this->l('Please select a hotel name', false, true), + 'check_in_time_cond' => $this->l('Please enter Check In time', false, true), + 'check_out_time_cond' => $this->l('Please enter Check Out time', false, true), + 'less_checkin_date' => $this->l('Check In date can not be before current date.', false, true), + 'more_checkout_date' => $this->l('Check Out date must be greater than Check In date.', false, true), + 'select_htl_txt' => $this->l('Select Hotel', false, true), + 'select_age_txt' => $this->l('Select age', false, true), + 'under_1_age' => $this->l('Under 1', false, true), + 'room_txt' => $this->l('Room', false, true), + 'rooms_txt' => $this->l('Rooms', false, true), + 'remove_txt' => $this->l('Remove', false, true), + 'adult_txt' => $this->l('Adult', false, true), + 'adults_txt' => $this->l('Adults', false, true), + 'child_txt' => $this->l('Child', false, true), + 'children_txt' => $this->l('Children', false, true), + 'below_txt' => $this->l('Below', false, true), + 'years_txt' => $this->l('years', false, true), + 'all_children_txt' => $this->l('All Children', false, true), + 'invalid_occupancy_txt' => $this->l('Invalid occupancy(adults/children) found.', false, true), + ) + ); + } } // apply assets as per pages diff --git a/modules/wktestimonialblock/views/img/hotels_testimonials_img/1.jpg b/modules/wktestimonialblock/views/img/hotels_testimonials_img/1.jpg deleted file mode 100644 index 5a4e16ee5..000000000 Binary files a/modules/wktestimonialblock/views/img/hotels_testimonials_img/1.jpg and /dev/null differ diff --git a/modules/wktestimonialblock/views/img/hotels_testimonials_img/2.jpg b/modules/wktestimonialblock/views/img/hotels_testimonials_img/2.jpg deleted file mode 100644 index 15f0d03ae..000000000 Binary files a/modules/wktestimonialblock/views/img/hotels_testimonials_img/2.jpg and /dev/null differ diff --git a/modules/wktestimonialblock/views/img/hotels_testimonials_img/3.jpg b/modules/wktestimonialblock/views/img/hotels_testimonials_img/3.jpg deleted file mode 100644 index 3de9dd9f5..000000000 Binary files a/modules/wktestimonialblock/views/img/hotels_testimonials_img/3.jpg and /dev/null differ diff --git a/modules/wktestimonialblock/wktestimonialblock.php b/modules/wktestimonialblock/wktestimonialblock.php index 663142985..ff8461f13 100644 --- a/modules/wktestimonialblock/wktestimonialblock.php +++ b/modules/wktestimonialblock/wktestimonialblock.php @@ -107,15 +107,24 @@ class WkTestimonialBlock extends Module public function install() { $objTestimonialBlockDb = new WkTestimonialBlockDb(); - $objTestimonialData = new WkHotelTestimonialData(); if (!parent::install() || !$objTestimonialBlockDb->createTables() || !$this->registerModuleHooks() || !$this->callInstallTab() - || !$objTestimonialData->insertModuleDemoData() ) { return false; } + + // if module should create demo data during installation + if (isset($this->populateData) && $this->populateData) { + $objTestimonialData = new WkHotelTestimonialData(); + if (!$objTestimonialData->insertModuleDemoData()) { + return false; + } + } else { + Tools::deleteDirectory($this->local_path.'views/img/dummy_img'); + } + return true; }