Merge branch 'develop' into gli-2916

This commit is contained in:
Amit sharma
2026-03-18 16:26:27 +05:30
35 changed files with 178 additions and 153 deletions

View File

@@ -1262,6 +1262,13 @@ class AdminModulesControllerCore extends AdminController
if (Configuration::get('PS_SHOW_CAT_MODULES_'.(int)$this->id_employee)) {
$filter_categories = explode('|', Configuration::get('PS_SHOW_CAT_MODULES_'.(int)$this->id_employee));
}
if (count($filter_categories) > 0) {
foreach ($filter_categories as $fc) {
if (!empty($fc)) {
$category_filtered[$fc] = 1;
}
}
}
if (count($category_filtered) > 0 && !isset($category_filtered[$module->tab])) {
return true;
}

View File

@@ -2605,6 +2605,7 @@ class AdminNormalProductsControllerCore extends AdminController
->setSelectedCategories(array((int)$id_category));
$this->tpl_list_vars['category_tree'] = $tree->render();
$this->context->smarty->assign('token', $this->token);// as tree updates the token from the smarty context
// used to build the new url when changing category
$this->tpl_list_vars['base_url'] = preg_replace('#&id_category=[0-9]*#', '', self::$currentIndex).'&token='.$this->token;
}
@@ -4513,7 +4514,7 @@ class AdminNormalProductsControllerCore extends AdminController
if ($this->tabAccess['edit'] === 1) {
$way = (int)(Tools::getValue('way'));
$id_product = (int)Tools::getValue('id_product');
$id_category = (int)Tools::getValue('id_category');
$id_category = (int)Tools::getValue('id_category_hotel');
$positions = Tools::getValue('product');
$page = (int)Tools::getValue('page');
$selected_pagination = (int)Tools::getValue('selected_pagination');
@@ -4521,14 +4522,13 @@ class AdminNormalProductsControllerCore extends AdminController
if (is_array($positions)) {
foreach ($positions as $position => $value) {
$pos = explode('_', $value);
if ((isset($pos[1]) && isset($pos[2])) && ($pos[1] == $id_category && (int)$pos[2] === $id_product)) {
if ($page > 1) {
$position = $position + (($page - 1) * $selected_pagination);
}
if ($product = new Product((int)$pos[2])) {
if (isset($position) && $product->updatePosition($way, $position)) {
if (isset($position) && $product->updatePosition($way, $position, $id_category)) {
$category = new Category((int)$id_category);
if (Validate::isLoadedObject($category)) {
hook::Exec('categoryUpdate', array('category' => $category));

View File

@@ -3064,7 +3064,7 @@ class AdminProductsControllerCore extends AdminController
if ($obj->id) {
if ($this->product_exists_in_shop) {
$objHotelInfo = new HotelBranchInformation();
$hotelInfo = $objHotelInfo->hotelsNameAndId();
$hotelInfo = HotelBranchInformation::getProfileAccessedHotels($this->context->employee->id_profile, 1);
if ($hotelInfo) {
$objRoomInfo = new HotelRoomInformation();
$roomStatus = $objRoomInfo->getAllRoomStatus();
@@ -3111,7 +3111,7 @@ class AdminProductsControllerCore extends AdminController
$this->displayWarning($this->l('You must save the room type in this shop before managing hotel configuration.'));
}
} else {
$this->displayWarning($this->l('You must save this room type before managing hotel configuration.'));
$this->displayWarning($this->l('You must save this room type before managing rooms.'));
}
$this->tpl_form_vars['custom_form'] = $data->fetch();
@@ -4527,7 +4527,7 @@ class AdminProductsControllerCore extends AdminController
$objRoomType = new HotelRoomType();
$objHotelInfo = new HotelBranchInformation();
$data->assign('htl_info', $objHotelInfo->hotelsNameAndId());
$data->assign('htl_info', HotelBranchInformation::getProfileAccessedHotels($this->context->employee->id_profile, 1));
if ($hotelRoomType = $objRoomType->getRoomTypeInfoByIdProduct($product->id)) {
$data->assign('htl_room_type', $hotelRoomType);
$hotelFullInfo = $objHotelInfo->hotelBranchInfoById($hotelRoomType['id_hotel']);

View File

@@ -38,6 +38,8 @@ class AdminSlipControllerCore extends AdminController
$this->_select = ' o.`id_shop`';
$this->_join .= ' LEFT JOIN '._DB_PREFIX_.'orders o ON (o.`id_order` = a.`id_order`)';
$this->_join .= ' INNER JOIN '._DB_PREFIX_.'htl_booking_detail hbd
ON (a.`id_order` = hbd.`id_order`) ' . HotelBranchInformation::addHotelRestriction(false, 'hbd');
$this->_group = ' GROUP BY a.`id_order_slip`';
$this->addRowAction('statusChange');

View File

@@ -1358,8 +1358,8 @@ class AdminThemesControllerCore extends AdminController
$fields_value['theme_name'] = $theme->name;
$fields_value['theme_directory'] = $theme->directory;
$fields_value['theme_version'] = '1.0';
$fields_value['compa_from'] = _PS_VERSION_;
$fields_value['compa_to'] = _PS_VERSION_;
$fields_value['compa_from'] = _QLOAPPS_VERSION_;
$fields_value['compa_to'] = _QLOAPPS_VERSION_;
$fields_value['id_theme_export'] = Tools::getValue('id_theme_export');
$fields_value['documentationName'] = $this->l('documentation');