diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ff0608a --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ + +vendor/ diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..0975cb5 --- /dev/null +++ b/composer.json @@ -0,0 +1,29 @@ +{ + "name": "dewebsmid/ws_faqaccordion", + "description": "Displays your info as a FAQ accordion.", + "authors": [ + { + "name": "Isabelle Oving-Anno", + "email": "isabelle@dewebsmid.nl" + } + ], + "require": { + "php": ">=8.2.0" + }, + "autoload": { + "psr-4": { + "WsfaqAccordion\\": "src/" + }, + "classmap": [ + "ws_faqAccordion.php" + ], + "exclude-from-classmap": [] + }, + "config": { + "preferred-install": "dist", + "prepend-autoloader": false + }, + "type": "prestashop-module", + "author": "Isabelle Oving-Anno", + "license": "AFL-3.0" +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..b68d89f --- /dev/null +++ b/composer.lock @@ -0,0 +1,20 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "14a8801fe935c090041cfc25afe6829f", + "packages": [], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": {}, + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=8.2.0" + }, + "platform-dev": {}, + "plugin-api-version": "2.6.0" +} diff --git a/config/services.yml b/config/services.yml new file mode 100644 index 0000000..e69de29 diff --git a/config_nl.xml b/config_nl.xml new file mode 100644 index 0000000..28c4ef9 --- /dev/null +++ b/config_nl.xml @@ -0,0 +1,11 @@ + + + ws_faqAccordion + + + + + + 0 + 0 + \ No newline at end of file diff --git a/index.php b/index.php new file mode 100644 index 0000000..dedd77e --- /dev/null +++ b/index.php @@ -0,0 +1,35 @@ + + * @copyright Since 2007 PrestaShop SA and Contributors + * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) + */ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/logo.png b/logo.png new file mode 100644 index 0000000..d0df3a7 Binary files /dev/null and b/logo.png differ diff --git a/src/Module/Install.php b/src/Module/Install.php new file mode 100644 index 0000000..05f48bb --- /dev/null +++ b/src/Module/Install.php @@ -0,0 +1,12 @@ +registerHook('displayHomeAccordion'); + } +} \ No newline at end of file diff --git a/src/Module/displayHooks.php b/src/Module/displayHooks.php new file mode 100644 index 0000000..65c5d77 --- /dev/null +++ b/src/Module/displayHooks.php @@ -0,0 +1,14 @@ +context->smarty->assign('message', $message); + return $this->fetch('module:ws_faqAccordion/views/templates/front/hello.tpl'); + } +} \ No newline at end of file diff --git a/views/templates/front/hello.tpl b/views/templates/front/hello.tpl new file mode 100644 index 0000000..227fd22 --- /dev/null +++ b/views/templates/front/hello.tpl @@ -0,0 +1,2 @@ + +

{$message}

diff --git a/ws_faqAccordion.php b/ws_faqAccordion.php new file mode 100644 index 0000000..c299aa0 --- /dev/null +++ b/ws_faqAccordion.php @@ -0,0 +1,59 @@ + + * @copyright 2007-2026 De Websmid BV + * @license Valid for 1 website (or project) for each purchase of license + * International Registered Trademark & Property of De Websmid BV + */ +use WsFaqAccordion\Module\Install; +use WsFaqAccordion\Module\displayHooks; + + +if (!defined('_PS_VERSION_')) { + exit; +} + +if (file_exists(__DIR__ . '/vendor/autoload.php')) { + require_once __DIR__ . '/vendor/autoload.php'; +} + +class ws_faqAccordion extends Module +{ + use Install; + use displayHooks; + + public function __construct() + { + $this->name = 'ws_faqAccordion'; + $this->tab = 'other'; + $this->version = '1.0.0'; + $this->author = 'Isabelle Oving-Anno | De Websmid b.v.'; + $this->need_instance = 0; + $this->ps_versions_compliancy = [ + 'min' => '1.7.0', + 'max' => '9.99.99', + ]; + $this -> bootstrap = true; + + parent::__construct(); + + $this->displayName = $this->l('FAQ Accordion'); + $this->description = $this->l('Displays your info as a FAQ accordion'); + } + + +} \ No newline at end of file