Fixed: change redirect url when customer try to open disable hotel

Co-authored-by: Name <sumit201@webkul.in>
This commit is contained in:
amit sharma
2026-07-17 11:35:56 +05:30
parent 612cc4d176
commit c82764dca8
2 changed files with 2 additions and 2 deletions

View File

@@ -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)) {

View File

@@ -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)) {