Added: new option to save room type bed type

This commit is contained in:
vishalsingh.qlo325
2025-04-21 19:03:18 +05:30
parent 9518a916fa
commit f357658f9f
49 changed files with 341 additions and 56 deletions

View File

@@ -385,6 +385,15 @@ class ProductControllerCore extends FrontController
}
}
$objRoomTypeBedType = new HotelRoomTypeBedType();
if ($bedTypes = $objRoomTypeBedType->getAllBedTypes($this->context->language->id)) {
$dimensionUnit = Configuration::get('PS_DIMENSION_UNIT');
foreach ($bedTypes as $bedTypeKey => $bedType) {
$bedTypes[$bedTypeKey]['area'] = Tools::ps_round($bedType['width'], 2).' * '.Tools::ps_round($bedType['length'], 2);
}
$bedTypes = array_column($bedTypes, null, 'id_bed_type');
}
$this->context->smarty->assign(
array(
'id_hotel' => $hotel_id,
@@ -416,6 +425,8 @@ class ProductControllerCore extends FrontController
'ftr_img_src' => _PS_IMG_.'rf/',
'order_date_restrict' => $order_date_restrict,
'PS_SERVICE_PRODUCT_CATEGORY_FILTER' => Configuration::get('PS_SERVICE_PRODUCT_CATEGORY_FILTER'),
'bed_types_info' => $bedTypes,
'dimension_unit' => Configuration::get('PS_DIMENSION_UNIT'),
)
);