Fixed: change redirect url when customer try to open disable hotel
Co-authored-by: Name <sumit201@webkul.in>
This commit is contained in:
@@ -104,7 +104,7 @@ class CategoryControllerCore extends FrontController
|
||||
|
||||
// If this category belongs to a hotel but that hotel is disabled, redirect to home page
|
||||
if ($idHotel && !(new HotelBranchInformation())->hotelBranchInfoByCategoryId($id_category)) {
|
||||
Tools::redirect($this->context->link->getPageLink('index'));
|
||||
Tools::redirect($this->context->link->getPageLink('pagenotfound'));
|
||||
}
|
||||
|
||||
if (!HotelHelper::validateDateRangeForHotel($dateFrom, $dateTo, $idHotel)) {
|
||||
|
||||
@@ -129,7 +129,7 @@ class ProductControllerCore extends FrontController
|
||||
|
||||
// If the hotel this room type belongs to is disabled, redirect to home page
|
||||
if (!(new HotelBranchInformation())->hotelBranchesInfo(false, 1, 0, $idHotel)) {
|
||||
Tools::redirect($this->context->link->getPageLink('index'));
|
||||
Tools::redirect($this->context->link->getPageLink('pagenotfound'));
|
||||
}
|
||||
|
||||
if (!HotelHelper::validateDateRangeForHotel($dateFrom, $dateTo, $idHotel)) {
|
||||
|
||||
Reference in New Issue
Block a user