feat(main): Add FAQ accordion

This commit is contained in:
2026-08-11 13:25:06 +02:00
parent 635c13a0ed
commit 1493081602
22 changed files with 459 additions and 4 deletions
+38
View File
@@ -0,0 +1,38 @@
<?php
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_2_0($module)
{
$columns = Db::getInstance()->executeS(
'SHOW COLUMNS FROM `' . _DB_PREFIX_ . 'ws_customhtml` LIKE \'type\''
);
if (empty($columns)) {
if (!Db::getInstance()->execute(
'ALTER TABLE `' . _DB_PREFIX_ . 'ws_customhtml`
ADD COLUMN `type` VARCHAR(32) NOT NULL DEFAULT \'html\' AFTER `title`'
)) {
return false;
}
}
if (!Db::getInstance()->execute(
'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'ws_customhtml_faq` (
`id_ws_customhtml_faq` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`id_ws_customhtml` INT(11) NOT NULL,
`question` VARCHAR(512) NOT NULL DEFAULT \'\',
`answer` TEXT,
`ordering` INT(11) NOT NULL DEFAULT 0,
`date_add` DATETIME NOT NULL,
`date_upd` DATETIME NOT NULL,
KEY `id_ws_customhtml` (`id_ws_customhtml`)
)'
)) {
return false;
}
return $module->registerHook('actionCustomhtmlblockGridDataModifier');
}