Fixed:Hide Roomtype restriction if roomtypes lessthan 2.

This commit is contained in:
azhar bhat
2026-10-01 11:55:19 +05:30
parent d8cf510fe5
commit 229b156e3b
3 changed files with 9 additions and 1 deletions

View File

@@ -831,6 +831,10 @@ class AdminCartRulesControllerCore extends AdminController
$product_rule_groups = $this->getProductRuleGroupsDisplay($current_object);
// Room type restriction is useful only when there is more than one room type to choose from
$objHotelRoomType = new HotelRoomType();
$total_room_types = count($objHotelRoomType->getAllRoomTypes());
$attribute_groups = AttributeGroup::getAttributesGroups($this->context->language->id);
$currencies = Currency::getCurrencies(false, true, true);
$languages = Language::getLanguages();
@@ -901,6 +905,7 @@ class AdminCartRulesControllerCore extends AdminController
'cart_rules' => $cart_rules,
'product_rule_groups' => $product_rule_groups,
'product_rule_groups_counter' => count($product_rule_groups),
'total_room_types' => $total_room_types,
'attribute_groups' => $attribute_groups,
'currentIndex' => self::$currentIndex,
'currentToken' => $this->token,