feat(main): Make groups reorderable

This commit is contained in:
2026-08-13 16:42:17 +02:00
parent 34fb95a699
commit e804c37175
10 changed files with 93 additions and 4 deletions
+24
View File
@@ -0,0 +1,24 @@
<?php
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_11_0($module)
{
$groups = Db::getInstance()->executeS(
'SELECT `id_ws_customhtml_group` FROM `' . _DB_PREFIX_ . 'ws_customhtml_group` ORDER BY `id_ws_customhtml_group` ASC'
);
foreach ($groups as $index => $group) {
if (!Db::getInstance()->update(
'ws_customhtml_group',
['ordering' => (int) $index],
'`id_ws_customhtml_group` = ' . (int) $group['id_ws_customhtml_group']
)) {
return false;
}
}
return true;
}