From c82764dca838367b5ef9e3fae5bff477ee1ccda5 Mon Sep 17 00:00:00 2001 From: amit sharma Date: Fri, 17 Jul 2026 11:35:56 +0530 Subject: [PATCH] Fixed: change redirect url when customer try to open disable hotel Co-authored-by: Name --- controllers/front/CategoryController.php | 2 +- controllers/front/ProductController.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/front/CategoryController.php b/controllers/front/CategoryController.php index c03bf83dd..427acaac3 100644 --- a/controllers/front/CategoryController.php +++ b/controllers/front/CategoryController.php @@ -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)) { diff --git a/controllers/front/ProductController.php b/controllers/front/ProductController.php index 2c01bf4c7..db3e4c574 100644 --- a/controllers/front/ProductController.php +++ b/controllers/front/ProductController.php @@ -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)) {