Fixed: Admin normal products page errors when no hotel is created

This commit is contained in:
vishalsingh.qlo325
2024-06-21 11:08:32 +05:30
parent a95de1212e
commit 79d6dbaa6a

View File

@@ -280,7 +280,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);
}