Update the hotel tooltip design

Co-authored-by: Name <sumit201@webkul.in>
This commit is contained in:
aradhana kumari
2026-08-14 20:27:56 +05:30
parent b0e3dee3b5
commit 1ffffdf25a
4 changed files with 110 additions and 11 deletions

View File

@@ -89,9 +89,11 @@ class AdminCartRulesControllerCore extends AdminController
public function formatHotelNames($hotelNames, $row)
{
$hotels = !empty($hotelNames) ? explode('|||', $hotelNames) : array();
$remaining = count($hotels) > 1 ? array_slice($hotels, 1) : array();
$this->context->smarty->assign(array(
'hotel_names_first' => !empty($hotels) ? $hotels[0] : null,
'hotel_names_remaining' => count($hotels) > 1 ? array_slice($hotels, 1) : array(),
'hotel_names_first' => !empty($hotels) ? $hotels[0] : null,
'hotel_names_remaining' => $remaining,
'hotel_names_remaining_json' => htmlspecialchars(json_encode($remaining)),
));
return $this->context->smarty->fetch(
'controllers/cart_rules/helpers/list/_hotel_names_column.tpl'
@@ -276,10 +278,21 @@ class AdminCartRulesControllerCore extends AdminController
'room_rmv_txt' => $this->l('Unselect below room types'),
)
);
$this->addJqueryUI('ui.tooltip', 'base', true);
$this->addJS(_PS_JS_DIR_.'admin/cart-rules.js');
$this->addJS(_PS_JS_DIR_.'admin/cart_rules_hotel_tooltip.js');
$this->addJqueryPlugin(array('typewatch', 'fancybox', 'autocomplete'));
}
public function renderList()
{
$this->content .= $this->context->smarty->fetch(
'controllers/cart_rules/helpers/list/_hotel_names_tooltip.tpl'
);
return parent::renderList();
}
public function initPageHeaderToolbar()
{
if (empty($this->display)) {