+
+{/form}
diff --git a/domokits/local/modules/BetterSeo/templates/frontOffice/default/meta_hook.html b/domokits/local/modules/BetterSeo/templates/frontOffice/default/meta_hook.html
new file mode 100644
index 0000000..54ee946
--- /dev/null
+++ b/domokits/local/modules/BetterSeo/templates/frontOffice/default/meta_hook.html
@@ -0,0 +1,18 @@
+
+{BetterSeoMicroData}
+
+{loop type="better_seo_loop" name="better_seo_meta_loop" object_id=$object_id object_type=$object_type lang_id=$lang_id}
+ {if $NOINDEX == 1 and $NOFOLLOW == 1}
+
+ {elseif $NOINDEX == 1}
+
+ {elseif $NOFOLLOW == 1}
+
+ {/if}
+
+ {if $JSON_DATA}
+
+ {/if}
+{/loop}
diff --git a/domokits/local/modules/CanonicalUrl/CHANGELOG.md b/domokits/local/modules/CanonicalUrl/CHANGELOG.md
new file mode 100644
index 0000000..1261d48
--- /dev/null
+++ b/domokits/local/modules/CanonicalUrl/CHANGELOG.md
@@ -0,0 +1,20 @@
+# 1.2.0
+
+- Add canonical override in seo form
+
+# 1.1.1
+
+- Fix exception when Thelia was not configured
+
+# 1.1.0
+
+- Adds the unit tests in the case of a single domain
+- Adds the case there is a subfolder
+
+# 1.0.1
+
+- Fix ```installer-name``` in the composer.json file
+
+# 1.0.2
+
+- Fix hook scope for compatibility with the other modules
\ No newline at end of file
diff --git a/domokits/local/modules/CanonicalUrl/CanonicalUrl.php b/domokits/local/modules/CanonicalUrl/CanonicalUrl.php
new file mode 100644
index 0000000..aa9e51d
--- /dev/null
+++ b/domokits/local/modules/CanonicalUrl/CanonicalUrl.php
@@ -0,0 +1,35 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace CanonicalUrl;
+
+use Symfony\Component\DependencyInjection\Loader\Configurator\ServicesConfigurator;
+use Thelia\Module\BaseModule;
+
+class CanonicalUrl extends BaseModule
+{
+ /** @var string */
+ const DOMAIN_NAME = 'canonicalurl';
+
+ const SEO_CANONICAL_META_KEY = 'seo_canonical_meta';
+
+ /**
+ * Defines how services are loaded in your modules.
+ */
+ public static function configureServices(ServicesConfigurator $servicesConfigurator): void
+ {
+ $servicesConfigurator->load(self::getModuleCode().'\\', __DIR__)
+ ->exclude([THELIA_MODULE_DIR.ucfirst(self::getModuleCode()).'/I18n/*'])
+ ->autowire(true)
+ ->autoconfigure(true);
+ }
+}
diff --git a/domokits/local/modules/CanonicalUrl/Config/config.xml b/domokits/local/modules/CanonicalUrl/Config/config.xml
new file mode 100644
index 0000000..585a638
--- /dev/null
+++ b/domokits/local/modules/CanonicalUrl/Config/config.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/domokits/local/modules/CanonicalUrl/Config/module.xml b/domokits/local/modules/CanonicalUrl/Config/module.xml
new file mode 100644
index 0000000..118f20b
--- /dev/null
+++ b/domokits/local/modules/CanonicalUrl/Config/module.xml
@@ -0,0 +1,38 @@
+
+
+ CanonicalUrl\CanonicalUrl
+
+ Adds the canonical Url in the metas of your site
+
+
+ Ajoute l'Url canonique dans les metas de votre site
+
+
+ en_US
+ fr_FR
+
+ 2.1.6
+
+
+ Gilles Bourgeat
+ gilles.bourgeat@gmail.com
+ https://github.com/gillesbourgeat
+
+
+ Franck Allimant
+ CQFDev
+ franck@cqfdev.fr
+ www.cqfdev.fr
+
+
+ Vincent Lopes-Vicente
+ OpenStudio
+ vlopes@openstudio.fr
+
+
+ classic
+ 2.5.0
+ prod
+
diff --git a/domokits/local/modules/CanonicalUrl/Config/routing.xml b/domokits/local/modules/CanonicalUrl/Config/routing.xml
new file mode 100644
index 0000000..fc772b7
--- /dev/null
+++ b/domokits/local/modules/CanonicalUrl/Config/routing.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/domokits/local/modules/CanonicalUrl/Event/CanonicalUrlEvent.php b/domokits/local/modules/CanonicalUrl/Event/CanonicalUrlEvent.php
new file mode 100644
index 0000000..51c9862
--- /dev/null
+++ b/domokits/local/modules/CanonicalUrl/Event/CanonicalUrlEvent.php
@@ -0,0 +1,50 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace CanonicalUrl\Event;
+
+use Symfony\Contracts\EventDispatcher\Event;
+
+/**
+ * Class CanonicalUrlEvent.
+ *
+ * @author Gilles Bourgeat
+ */
+class CanonicalUrlEvent extends Event
+{
+ /** @var string|null */
+ protected $url = null;
+
+ /**
+ * @return string|null
+ */
+ public function getUrl()
+ {
+ return $this->url;
+ }
+
+ /**
+ * @param string|null $url
+ *
+ * @return $this
+ */
+ public function setUrl($url)
+ {
+ if ($url !== null && $url[0] !== '/' && filter_var($url, \FILTER_VALIDATE_URL) === false) {
+ throw new \InvalidArgumentException('The value "'.(string) $url.'" is not a valid Url or Uri.');
+ }
+
+ $this->url = $url;
+
+ return $this;
+ }
+}
diff --git a/domokits/local/modules/CanonicalUrl/Event/CanonicalUrlEvents.php b/domokits/local/modules/CanonicalUrl/Event/CanonicalUrlEvents.php
new file mode 100644
index 0000000..0312382
--- /dev/null
+++ b/domokits/local/modules/CanonicalUrl/Event/CanonicalUrlEvents.php
@@ -0,0 +1,23 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace CanonicalUrl\Event;
+
+/**
+ * Class CanonicalUrlEvents.
+ *
+ * @author Gilles Bourgeat
+ */
+class CanonicalUrlEvents
+{
+ const GENERATE_CANONICAL = 'canonical.url.generate.canonical';
+}
diff --git a/domokits/local/modules/CanonicalUrl/EventListener/CanonicalUrlListener.php b/domokits/local/modules/CanonicalUrl/EventListener/CanonicalUrlListener.php
new file mode 100644
index 0000000..25a9cb7
--- /dev/null
+++ b/domokits/local/modules/CanonicalUrl/EventListener/CanonicalUrlListener.php
@@ -0,0 +1,249 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace CanonicalUrl\EventListener;
+
+use BetterSeo\Model\BetterSeoQuery;
+use CanonicalUrl\CanonicalUrl;
+use CanonicalUrl\Event\CanonicalUrlEvent;
+use CanonicalUrl\Event\CanonicalUrlEvents;
+use Symfony\Component\EventDispatcher\EventSubscriberInterface;
+use Symfony\Component\HttpFoundation\RequestStack;
+use Thelia\Core\HttpFoundation\Request;
+use Thelia\Core\HttpFoundation\Session\Session;
+use Thelia\Log\Tlog;
+use Thelia\Model\ConfigQuery;
+use Thelia\Model\Lang;
+use Thelia\Model\LangQuery;
+use Thelia\Model\MetaDataQuery;
+
+/**
+ * Class CanonicalUrlListener.
+ *
+ * @author Gilles Bourgeat
+ */
+class CanonicalUrlListener implements EventSubscriberInterface
+{
+ /** @var RequestStack */
+ protected $requestStack;
+
+ /** @var Session */
+ protected $session;
+
+ public function __construct(RequestStack $requestStack)
+ {
+ $this->requestStack = $requestStack;
+ }
+
+ public function generateUrlCanonical(CanonicalUrlEvent $event): void
+ {
+ /** @var Request $request */
+ if (null === $request = $this->requestStack->getCurrentRequest()) {
+ return;
+ }
+
+ if ($event->getUrl() !== null) {
+ return;
+ }
+
+ if (null !== $canonicalOverride = $this->getCanonicalOverride()) {
+ try {
+ $event->setUrl($canonicalOverride);
+
+ return;
+ } catch (\InvalidArgumentException $e) {
+ Tlog::getInstance()->addWarning($e->getMessage());
+ }
+ }
+
+ $parseUrlByCurrentLocale = $this->getParsedUrlByCurrentLocale();
+
+ if (empty($parseUrlByCurrentLocale['host'])) {
+ return;
+ }
+
+ // Be sure to use the proper domain name
+ $canonicalUrl = $parseUrlByCurrentLocale['scheme'].'://'.$parseUrlByCurrentLocale['host'];
+
+ // preserving a potential subdirectory, e.g. http://somehost.com/mydir/index.php/...
+ $canonicalUrl .= $request->getBaseUrl();
+
+ // Remove script name from path, e.g. http://somehost.com/index.php/...
+ $canonicalUrl = preg_replace("!/index(_dev)?\.php!", '', $canonicalUrl);
+
+ $path = $request->getPathInfo();
+
+ if (!empty($path) && $path != '/') {
+ $canonicalUrl .= $path;
+
+ $canonicalUrl = rtrim($canonicalUrl, '/');
+ } else if (isset($parseUrlByCurrentLocale['query'])) {
+ $canonicalUrl .= '/?'. (array_key_exists("query", $parseUrlByCurrentLocale)) ? $parseUrlByCurrentLocale['query'] : "";
+ }
+
+ try {
+ $event->setUrl($canonicalUrl);
+ } catch (\InvalidArgumentException $e) {
+ Tlog::getInstance()->addWarning($e->getMessage());
+ }
+ }
+
+ /**
+ * @return array
+ * {@inheritdoc}
+ */
+ public static function getSubscribedEvents()
+ {
+ return [
+ CanonicalUrlEvents::GENERATE_CANONICAL => [
+ 'generateUrlCanonical', 128,
+ ],
+ ];
+ }
+
+ /**
+ * @return array
+ *
+ * At least one element will be present within the array.
+ * Potential keys within this array are:
+ * scheme - e.g. http
+ * host
+ * port
+ * user
+ * pass
+ * path
+ * query - after the question mark ?
+ * fragment - after the hashmark #
+ */
+ protected function getParsedUrlByCurrentLocale()
+ {
+ /** @var Request $request */
+ $request = $this->requestStack->getCurrentRequest();
+
+ // for one domain by lang
+ if ((int) ConfigQuery::read('one_domain_foreach_lang', 0) === 1) {
+ // We always query the DB here, as the Lang configuration (then the related URL) may change during the
+ // user session lifetime, and improper URLs could be generated. This is quite odd, okay, but may happen.
+ $langUrl = LangQuery::create()->findPk($request->getSession()->getLang()->getId())->getUrl();
+
+ if (!empty($langUrl) && false !== $parse = parse_url($langUrl)) {
+ return $parse;
+ }
+ }
+
+ // Configured site URL
+ $urlSite = ConfigQuery::read('url_site');
+ if (!empty($urlSite) && false !== $parse = parse_url($urlSite)) {
+ return $parse;
+ }
+
+ // return current URL
+ return parse_url($request->getUri());
+ }
+
+ /**
+ * @return string|null
+ */
+ protected function getCanonicalOverride()
+ {
+ /** @var Request $request */
+ $request = $this->requestStack->getCurrentRequest();
+ $lang = $request->getSession()->getLang();
+
+ $routeParameters = $this->getRouteParameters();
+
+ if (null === $routeParameters) {
+ return null;
+ }
+
+ $url = null;
+
+ $metaCanonical = MetaDataQuery::create()
+ ->filterByMetaKey(CanonicalUrl::SEO_CANONICAL_META_KEY)
+ ->filterByElementKey($routeParameters['view'])
+ ->filterByElementId($routeParameters['id'])
+ ->findOne();
+
+ if (null !== $metaCanonical) {
+ $canonicalValues = json_decode($metaCanonical->getValue(), true);
+
+ $url = isset($canonicalValues[$lang->getLocale()]) && ! empty($canonicalValues[$lang->getLocale()]) ? $canonicalValues[$lang->getLocale()] :null;
+ }
+
+ // Try to get old field of BetterSeoModule
+ if (null === $url && class_exists("BetterSeo\BetterSeo")) {
+ try {
+ $betterSeoData = BetterSeoQuery::create()
+ ->filterByObjectType($routeParameters['view'])
+ ->filterByObjectId($routeParameters['id'])
+ ->findOne();
+
+ $url = $betterSeoData->setLocale($lang->getLocale())
+ ->getCanonicalField();
+ } catch (\Throwable $exception) {
+ //Catch if field doesn't exist but do nothing
+ }
+ }
+
+ if (null === $url) {
+ return null;
+ }
+
+ if (false === filter_var($url, \FILTER_VALIDATE_URL)) {
+ return rtrim($this->getSiteBaseUrlForLocale($lang), "/")."/".$url;
+ }
+
+ return $url;
+ }
+
+ protected function getSiteBaseUrlForLocale(Lang $lang = null)
+ {
+ if (null === $lang) {
+ $lang = $this->requestStack->getCurrentRequest()->getSession()->getLang();
+ }
+ if ((int) ConfigQuery::read('one_domain_foreach_lang', 0) === 1) {
+ // We always query the DB here, as the Lang configuration (then the related URL) may change during the
+ // user session lifetime, and improper URLs could be generated. This is quite odd, okay, but may happen.
+ $langUrl = LangQuery::create()->findPk($lang->getId())->getUrl();
+ return $langUrl;
+ }
+
+ // Configured site URL
+ $urlSite = ConfigQuery::read('url_site');
+ return $urlSite;
+ }
+
+ /**
+ * @return array|null
+ */
+ protected function getRouteParameters()
+ {
+ /** @var Request $request */
+ $request = $this->requestStack->getCurrentRequest();
+
+ $view = $request->get('view');
+ if (null === $view) {
+ $view = $request->get('_view');
+ }
+ if (null === $view) {
+ return null;
+ }
+
+ $id = $request->get($view.'_id');
+
+ if (null === $id) {
+ return null;
+ }
+
+ return compact('view', 'id');
+ }
+}
diff --git a/domokits/local/modules/CanonicalUrl/EventListener/SeoFormListener.php b/domokits/local/modules/CanonicalUrl/EventListener/SeoFormListener.php
new file mode 100644
index 0000000..1e06cc3
--- /dev/null
+++ b/domokits/local/modules/CanonicalUrl/EventListener/SeoFormListener.php
@@ -0,0 +1,112 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace CanonicalUrl\EventListener;
+
+use CanonicalUrl\CanonicalUrl;
+use Symfony\Component\EventDispatcher\EventDispatcher;
+use Symfony\Component\EventDispatcher\EventSubscriberInterface;
+use Symfony\Component\Form\Extension\Core\Type\TextType;
+use Symfony\Component\HttpFoundation\RequestStack;
+use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
+use Thelia\Action\BaseAction;
+use Thelia\Core\Event\TheliaEvents;
+use Thelia\Core\Event\TheliaFormEvent;
+use Thelia\Core\Event\UpdateSeoEvent;
+use Thelia\Core\HttpFoundation\Request;
+use Thelia\Model\MetaDataQuery;
+
+class SeoFormListener extends BaseAction implements EventSubscriberInterface
+{
+ /** @var RequestStack */
+ protected $requestStack;
+
+ public function __construct(RequestStack $requestStack)
+ {
+ $this->requestStack = $requestStack;
+ }
+
+ public static function getSubscribedEvents()
+ {
+ return [
+ TheliaEvents::FORM_AFTER_BUILD.'.thelia_seo' => ['addCanonicalField', 128],
+ TheliaEvents::CATEGORY_UPDATE_SEO => ['saveCategorySeoFields', 128],
+ TheliaEvents::BRAND_UPDATE_SEO => ['saveBrandSeoFields', 128],
+ TheliaEvents::CONTENT_UPDATE_SEO => ['saveContentSeoFields', 128],
+ TheliaEvents::FOLDER_UPDATE_SEO => ['saveFolderSeoFields', 128],
+ TheliaEvents::PRODUCT_UPDATE_SEO => ['saveProductSeoFields', 128],
+ ];
+ }
+
+ public function saveCategorySeoFields(UpdateSeoEvent $event, $eventName, EventDispatcherInterface $dispatcher): void
+ {
+ $this->saveSeoFields($event, $eventName, $dispatcher, 'category');
+ }
+
+ public function saveBrandSeoFields(UpdateSeoEvent $event, $eventName, EventDispatcherInterface $dispatcher): void
+ {
+ $this->saveSeoFields($event, $eventName, $dispatcher, 'brand');
+ }
+
+ public function saveContentSeoFields(UpdateSeoEvent $event, $eventName, EventDispatcherInterface $dispatcher): void
+ {
+ $this->saveSeoFields($event, $eventName, $dispatcher, 'content');
+ }
+
+ public function saveFolderSeoFields(UpdateSeoEvent $event, $eventName, EventDispatcherInterface $dispatcher): void
+ {
+ $this->saveSeoFields($event, $eventName, $dispatcher, 'folder');
+ }
+
+ public function saveProductSeoFields(UpdateSeoEvent $event, $eventName, EventDispatcherInterface $dispatcher): void
+ {
+ $this->saveSeoFields($event, $eventName, $dispatcher, 'product');
+ }
+
+ protected function saveSeoFields(UpdateSeoEvent $event, $eventName, EventDispatcherInterface $dispatcher, $elementKey): void
+ {
+ $form = $this->requestStack->getCurrentRequest()->get('thelia_seo');
+
+ if (null === $form || !\array_key_exists('id', $form) || !\array_key_exists('canonical', $form)) {
+ return;
+ }
+
+ $canonicalValues = [];
+
+ $canonicalMetaData = MetaDataQuery::create()
+ ->filterByMetaKey(CanonicalUrl::SEO_CANONICAL_META_KEY)
+ ->filterByElementKey($elementKey)
+ ->filterByElementId($form['id'])
+ ->findOneOrCreate();
+
+ if (!$canonicalMetaData->isNew()) {
+ $canonicalValues = json_decode($canonicalMetaData->getValue(), true);
+ }
+
+ $locale = $form['locale'];
+ $canonicalValues[$locale] = $form['canonical'];
+
+ $canonicalMetaData
+ ->setIsSerialized(0)
+ ->setValue(json_encode($canonicalValues))
+ ->save();
+ }
+
+ public function addCanonicalField(TheliaFormEvent $event): void
+ {
+ $event->getForm()->getFormBuilder()
+ ->add(
+ 'canonical',
+ TextType::class
+ );
+ }
+}
diff --git a/domokits/local/modules/CanonicalUrl/Hook/MetaHook.php b/domokits/local/modules/CanonicalUrl/Hook/MetaHook.php
new file mode 100644
index 0000000..7f02df8
--- /dev/null
+++ b/domokits/local/modules/CanonicalUrl/Hook/MetaHook.php
@@ -0,0 +1,49 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace CanonicalUrl\Hook;
+
+use CanonicalUrl\Event\CanonicalUrlEvent;
+use CanonicalUrl\Event\CanonicalUrlEvents;
+use Symfony\Component\EventDispatcher\EventDispatcherInterface;
+use Thelia\Core\Event\Hook\HookRenderEvent;
+use Thelia\Core\Hook\BaseHook;
+
+/**
+ * Class MetaHook.
+ *
+ * @author Gilles Bourgeat
+ */
+class MetaHook extends BaseHook
+{
+ /** @var EventDispatcherInterface */
+ protected $eventDispatcher;
+
+ public function __construct(EventDispatcherInterface $eventDispatcher)
+ {
+ $this->eventDispatcher = $eventDispatcher;
+ }
+
+ public function onMainHeadBottom(HookRenderEvent $hookRender): void
+ {
+ $event = new CanonicalUrlEvent();
+
+ $this->eventDispatcher->dispatch(
+ $event,
+ CanonicalUrlEvents::GENERATE_CANONICAL,
+ );
+
+ if ($event->getUrl()) {
+ $hookRender->add('');
+ }
+ }
+}
diff --git a/domokits/local/modules/CanonicalUrl/Hook/SeoUpdateFormHook.php b/domokits/local/modules/CanonicalUrl/Hook/SeoUpdateFormHook.php
new file mode 100644
index 0000000..90d780f
--- /dev/null
+++ b/domokits/local/modules/CanonicalUrl/Hook/SeoUpdateFormHook.php
@@ -0,0 +1,50 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace CanonicalUrl\Hook;
+
+use CanonicalUrl\CanonicalUrl;
+use Thelia\Core\Event\Hook\HookRenderEvent;
+use Thelia\Core\Hook\BaseHook;
+use Thelia\Model\MetaDataQuery;
+
+class SeoUpdateFormHook extends BaseHook
+{
+ public function addInputs(HookRenderEvent $event): void
+ {
+ $id = $event->getArgument('id');
+ $type = $event->getArgument('type');
+
+ $canonical = null;
+ $canonicalMetaData = MetaDataQuery::create()
+ ->filterByMetaKey(CanonicalUrl::SEO_CANONICAL_META_KEY)
+ ->filterByElementKey($type)
+ ->filterByElementId($id)
+ ->findOneOrCreate();
+
+ $canonicalMetaDataValues = json_decode($canonicalMetaData->getValue(), true);
+
+ $lang = $this->getSession()->getAdminEditionLang();
+
+ if (isset($canonicalMetaDataValues[$lang->getLocale()])) {
+ $canonical = $canonicalMetaDataValues[$lang->getLocale()];
+ }
+
+ $event->add($this->render(
+ 'hook-seo-update-form.html',
+ [
+ 'form' => $event->getArgument('form'),
+ 'canonical' => $canonical,
+ ]
+ ));
+ }
+}
diff --git a/domokits/local/modules/CanonicalUrl/I18n/backOffice/default/en_US.php b/domokits/local/modules/CanonicalUrl/I18n/backOffice/default/en_US.php
new file mode 100644
index 0000000..e9c0307
--- /dev/null
+++ b/domokits/local/modules/CanonicalUrl/I18n/backOffice/default/en_US.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Surcharge de l\'url canonique' => 'Canonical url override',
+];
diff --git a/domokits/local/modules/CanonicalUrl/LICENSE.txt b/domokits/local/modules/CanonicalUrl/LICENSE.txt
new file mode 100644
index 0000000..cfbc66d
--- /dev/null
+++ b/domokits/local/modules/CanonicalUrl/LICENSE.txt
@@ -0,0 +1,165 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
\ No newline at end of file
diff --git a/domokits/local/modules/CanonicalUrl/Readme.md b/domokits/local/modules/CanonicalUrl/Readme.md
new file mode 100644
index 0000000..5c4fa63
--- /dev/null
+++ b/domokits/local/modules/CanonicalUrl/Readme.md
@@ -0,0 +1,47 @@
+# Canonical Url
+
+This module generates a canonical URL for every page of your shop. Once activated, you'll find a `` tag in the header of your pages.
+
+## Examples
+
+- If the page URL is not rewritten, the canonical URL will contain all the URL parameters. Example for : For URL ```http://demo.thelia.net/?view=product&locale=en_US&product_id=18```
+ ```html
+
+ ```
+ Obviously, this is far from ideal. Consider activating URL rewriting !
+
+- When the page URL contains the script name (index.php), it will be removed from the canonical URL. Example, the canonical URL of ```http://demo.thelia.net/index.php?view=product&locale=en_US&product_id=18``` is :
+ ```html
+
+ ```
+
+ When a rewritten URL contains parameters, these parameters a removed. For ```http://demo.thelia.net/index.php/en_en-your-path.html?page=44```, the canonical URL is :
+ ```html
+
+ ```
+
+- If the page URL contains a domain which is not the main shop domain, this domain is replaced by the main shop domain. For ```http://demo458.thelia.net/index.php/en_en-your-path.html?page=44``` the canonical URL is :
+ ```html
+
+ ```
+
+## Installation
+
+### Manually
+
+* Copy the module into ```/local/modules/``` directory and be sure that the name of the module is CanonicalUrl.
+* Activate it in your thelia administration panel
+
+### Composer
+
+Add it in your main thelia composer.json file
+
+```
+composer require thelia/canonical-url-module:~2.1
+```
+
+## Usage
+
+You just have to activate the module and check the meta tags of your shop.
+
+The canonical will be generated automatically but you can define a canonical url in seo form for each item if you want override the generated url.
diff --git a/domokits/local/modules/CanonicalUrl/Tests/CanonicalUrlTest.php b/domokits/local/modules/CanonicalUrl/Tests/CanonicalUrlTest.php
new file mode 100644
index 0000000..40bf0e7
--- /dev/null
+++ b/domokits/local/modules/CanonicalUrl/Tests/CanonicalUrlTest.php
@@ -0,0 +1,245 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace CanonicalUrl\Tests;
+
+use CanonicalUrl\Event\CanonicalUrlEvent;
+use CanonicalUrl\EventListener\CanonicalUrlListener;
+use Symfony\Component\HttpFoundation\Request;
+
+/**
+ * Class CanonicalUrlTest.
+ *
+ * @author Gilles Bourgeat
+ */
+class CanonicalUrlTest extends \PHPUnit_Framework_TestCase
+{
+ protected function setUp(): void
+ {
+ /*$config = $this->getMock('Thelia\Model\ConfigQuery');
+
+ $config->expects($this->any())
+ ->method('read')
+ ->with('allow_slash_ended_uri')
+ ->will($this->returnValue(true));*/
+ }
+
+ public function testRemoveFileIndex(): void
+ {
+ $this->performList('http://myhost.com/test', [
+ 'http://myhost.com/index.php/test',
+ 'http://myhost.com/index.php/test/',
+ 'http://myhost.com/index.php/test?page=22&list=1',
+ 'http://myhost.com/index.php/test/?page=22&list=1',
+ ]);
+ }
+
+ public function testRemoveFileIndexDev(): void
+ {
+ $this->performList('http://myhost.com/test', [
+ 'http://myhost.com/index_dev.php/test',
+ 'http://myhost.com/index_dev.php/test/',
+ 'http://myhost.com/index_dev.php/test?page=22&list=1',
+ 'http://myhost.com/index_dev.php/test/?page=22&list=1',
+ ], $this->fakeServer(
+ '/var/www/web/index_dev.php',
+ '/index_dev.php'
+ ));
+ }
+
+ public function testHTTPWithSubDomain(): void
+ {
+ $this->performList('http://mysubdomain.myhost.com/test', [
+ 'http://mysubdomain.myhost.com/index.php/test/?page=22&list=1',
+ ]);
+ }
+
+ public function testHTTPS(): void
+ {
+ $this->performList('https://myhost.com/test', [
+ 'https://myhost.com/index.php/test/?page=22&list=1',
+ ]);
+ }
+
+ public function testHTTPSWithSubDomain(): void
+ {
+ $this->performList('https://mysubdomain.myhost.com/test', [
+ 'https://mysubdomain.myhost.com/index.php/test/?page=22&list=1',
+ ]);
+ }
+
+ public function testHTTPWithSubdirectory(): void
+ {
+ $this->performList('http://myhost.com/web/test', [
+ 'http://myhost.com/web/index.php/test',
+ 'http://myhost.com/web/index.php/test/',
+ 'http://myhost.com/web/index.php/test?page=22&list=1',
+ 'http://myhost.com/web/index.php/test?page=22&list=1/',
+ ], $this->fakeServer(
+ '/var/www/web/index.php',
+ '/web/index.php'
+ ));
+
+ $this->performList('http://myhost.com/web/test', [
+ 'http://myhost.com/web/index_dev.php/test',
+ 'http://myhost.com/web/index_dev.php/test/',
+ 'http://myhost.com/web/index_dev.php/test?page=22&list=1',
+ 'http://myhost.com/web/index_dev.php/test?page=22&list=1/',
+ ], $this->fakeServer(
+ '/var/www/web/index_dev.php',
+ '/web/index_dev.php'
+ ));
+ }
+
+ public function testHTTPWithMultipleSubdirectory(): void
+ {
+ $this->performList('http://myhost.com/web/web2/web3/test', [
+ 'http://myhost.com/web/web2/web3/index.php/test/?page=22&list=1',
+ ], $this->fakeServer(
+ '/var/www/web/web2/web3/index.php',
+ '/web/web2/web3/index.php'
+ ));
+
+ $this->performList('http://myhost.com/web/web2/web3/test', [
+ 'http://myhost.com/web/web2/web3/index_dev.php/test/?page=22&list=1',
+ ], $this->fakeServer(
+ '/var/www/web/web2/web3/index_dev.php',
+ '/web/web2/web3/index_dev.php'
+ ));
+ }
+
+ public function testHTTPSWithSubdirectory(): void
+ {
+ $this->performList('https://myhost.com/web/test', [
+ 'https://myhost.com/web/index.php/test/?page=22&list=1',
+ ], $this->fakeServer(
+ '/var/www/web/index.php',
+ '/web/index.php'
+ ));
+ }
+
+ public function testHTTPSWithMultipleSubdirectory(): void
+ {
+ $this->performList('https://myhost.com/web/web2/web3/test', [
+ 'https://myhost.com/web/web2/web3/index.php/test/?page=22&list=1',
+ ], $this->fakeServer(
+ '/var/www/web/web2/web3/index.php',
+ '/web/web2/web3/index.php'
+ ));
+ }
+
+ public function testWithNoPath(): void
+ {
+ $this->performList('http://myhost.com/?list=22&page=1', [
+ 'http://myhost.com?list=22&page=1',
+ 'http://myhost.com/?list=22&page=1',
+ 'http://myhost.com/index.php?list=22&page=1',
+ 'http://myhost.com/index.php/?list=22&page=1',
+ ]);
+
+ $this->performList('http://myhost.com/?list=22&page=1', [
+ 'http://myhost.com/index_dev.php?list=22&page=1',
+ 'http://myhost.com/index_dev.php/?list=22&page=1',
+ ], $this->fakeServer(
+ '/var/www/web/index_dev.php',
+ '/index_dev.php'
+ ));
+ }
+
+ public function testWithNoPathAndMultipleSubdirectory(): void
+ {
+ $this->performList('http://myhost.com/web/?list=22&page=1', [
+ 'http://myhost.com/web/index.php?list=22&page=1',
+ 'http://myhost.com/web/?list=22&page=1',
+ 'http://myhost.com/web/index.php?list=22&page=1',
+ 'http://myhost.com/web/index.php/?list=22&page=1',
+ ], $this->fakeServer(
+ '/var/www/web/index.php',
+ '/web/index.php'
+ ));
+
+ $this->performList('http://myhost.com/web/?list=22&page=1', [
+ 'http://myhost.com/web/index_dev.php?list=22&page=1',
+ 'http://myhost.com/web/index_dev.php/?list=22&page=1',
+ ], $this->fakeServer(
+ '/var/www/web/index_dev.php',
+ '/web/index_dev.php'
+ ));
+ }
+
+ public function testWithNotRewrittenUrl(): void
+ {
+ $this->performList('http://myhost.com/web/?view=category&lang=fr_FR&category_id=48', [
+ 'http://myhost.com/web/index.php?view=category&lang=fr_FR&category_id=48',
+ 'http://myhost.com/web/?lang=fr_FR&view=category&category_id=48',
+ 'http://myhost.com/web/index.php?&category_id=48&lang=fr_FR&view=category',
+ 'http://myhost.com/web/index.php/?category_id=48&view=category&lang=fr_FR',
+ ], $this->fakeServer(
+ '/var/www/web/index.php',
+ '/web/index.php'
+ ));
+ }
+
+ public function testOverrideCanonicalEvent(): void
+ {
+ $canonicalUrlListener = new CanonicalUrlListener(Request::create('https://myhost.com/test'));
+
+ $event = new CanonicalUrlEvent();
+
+ // override canonical
+ $canonical = 'http://myscanonical.com';
+ $event->setUrl($canonical);
+
+ $canonicalUrlListener->generateUrlCanonical($event);
+
+ $this->assertEquals($canonical, $event->getUrl());
+ }
+
+ /**
+ * @param string $scriptFileName
+ * @param string $scriptName
+ *
+ * @return array
+ */
+ protected function fakeServer(
+ $scriptFileName = '/var/www/web/index.php',
+ $scriptName = '/index.php'
+ ) {
+ return [
+ 'SCRIPT_FILENAME' => $scriptFileName,
+ 'SCRIPT_NAME' => $scriptName,
+ ];
+ }
+
+ /**
+ * @param string $canonicalExpected canonical expected
+ * @param array $list array of uri
+ */
+ protected function performList($canonicalExpected, array $list, array $server = []): void
+ {
+ if (empty($server)) {
+ $server = $this->fakeServer();
+ }
+
+ foreach ($list as $uri) {
+ $canonicalUrlListener = new CanonicalUrlListener(
+ Request::create($uri, 'GET', [], [], [], $server)
+ );
+
+ $event = new CanonicalUrlEvent();
+
+ $canonicalUrlListener->generateUrlCanonical($event);
+
+ $this->assertEquals($canonicalExpected, $event->getUrl());
+ }
+ }
+}
diff --git a/domokits/local/modules/CanonicalUrl/composer.json b/domokits/local/modules/CanonicalUrl/composer.json
new file mode 100644
index 0000000..0d30553
--- /dev/null
+++ b/domokits/local/modules/CanonicalUrl/composer.json
@@ -0,0 +1,11 @@
+{
+ "name": "thelia/canonical-url-module",
+ "license": "LGPL-3.0+",
+ "type": "thelia-module",
+ "require": {
+ "thelia/installer": "~1.1"
+ },
+ "extra": {
+ "installer-name": "CanonicalUrl"
+ }
+}
\ No newline at end of file
diff --git a/domokits/local/modules/CanonicalUrl/templates/backOffice/default/hook-seo-update-form.html b/domokits/local/modules/CanonicalUrl/templates/backOffice/default/hook-seo-update-form.html
new file mode 100644
index 0000000..502f863
--- /dev/null
+++ b/domokits/local/modules/CanonicalUrl/templates/backOffice/default/hook-seo-update-form.html
@@ -0,0 +1,6 @@
+{form_field form=$form field='canonical' }
+
+
+
+
+{/form_field}
\ No newline at end of file
diff --git a/domokits/local/modules/Carousel/CHANGELOG.md b/domokits/local/modules/Carousel/CHANGELOG.md
new file mode 100644
index 0000000..b4525a3
--- /dev/null
+++ b/domokits/local/modules/Carousel/CHANGELOG.md
@@ -0,0 +1,6 @@
+# 2.3.0-alpha1
+
+- Moved the images from the directory 'media' in the module to thelia/local/media/images/carousel.
+- The current images will be automatically copied in the new directory during the update of the module
+- Removed AdminIncludes directory
+- All html,js and css files are now in 'templates'
\ No newline at end of file
diff --git a/domokits/local/modules/Carousel/Carousel.php b/domokits/local/modules/Carousel/Carousel.php
new file mode 100644
index 0000000..ac2cd89
--- /dev/null
+++ b/domokits/local/modules/Carousel/Carousel.php
@@ -0,0 +1,124 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Carousel;
+
+use Propel\Runtime\Connection\ConnectionInterface;
+use Symfony\Component\DependencyInjection\Loader\Configurator\ServicesConfigurator;
+use Symfony\Component\Filesystem\Filesystem;
+use Symfony\Component\Finder\Finder;
+use Symfony\Component\Finder\SplFileInfo;
+use Thelia\Install\Database;
+use Thelia\Model\ConfigQuery;
+use Thelia\Module\BaseModule;
+
+/**
+ * Class Carousel.
+ *
+ * @author Franck Allimant
+ */
+class Carousel extends BaseModule
+{
+ public const DOMAIN_NAME = 'carousel';
+
+ /**
+ * @return bool true to continue module activation, false to prevent it
+ */
+ public function preActivation(ConnectionInterface $con = null)
+ {
+ if (!self::getConfigValue('is_initialized', false)) {
+ $database = new Database($con);
+
+ $database->insertSql(null, [__DIR__.'/Config/TheliaMain.sql']);
+
+ self::setConfigValue('is_initialized', true);
+ }
+
+ return true;
+ }
+
+ public function destroy(ConnectionInterface $con = null, $deleteModuleData = false): void
+ {
+ $database = new Database($con);
+
+ $database->insertSql(null, [__DIR__.'/Config/sql/destroy.sql']);
+ }
+
+ public function getUploadDir()
+ {
+ $uploadDir = ConfigQuery::read('images_library_path');
+
+ if ($uploadDir === null) {
+ $uploadDir = THELIA_LOCAL_DIR.'media'.DS.'images';
+ } else {
+ $uploadDir = THELIA_ROOT.$uploadDir;
+ }
+
+ return $uploadDir.DS.self::DOMAIN_NAME;
+ }
+
+ /**
+ * @param string $currentVersion
+ * @param string $newVersion
+ *
+ * @author Thomas Arnaud
+ */
+ public function update($currentVersion, $newVersion, ConnectionInterface $con = null): void
+ {
+ $uploadDir = $this->getUploadDir();
+ $fileSystem = new Filesystem();
+
+ if (!$fileSystem->exists($uploadDir) && $fileSystem->exists(__DIR__.DS.'media'.DS.'carousel')) {
+ $finder = new Finder();
+ $finder->files()->in(__DIR__.DS.'media'.DS.'carousel');
+
+ $fileSystem->mkdir($uploadDir);
+
+ /** @var SplFileInfo $file */
+ foreach ($finder as $file) {
+ copy($file, $uploadDir.DS.$file->getRelativePathname());
+ }
+ $fileSystem->remove(__DIR__.DS.'media');
+ }
+
+ $finder = (new Finder())->files()->name('#.*?\.sql#')->sortByName()->in(__DIR__.DS.'Config'.DS.'update');
+
+ if (0 === $finder->count()) {
+ return;
+ }
+
+ $database = new Database($con);
+
+ // apply update only if table exists
+ if ($database->execute("SHOW TABLES LIKE 'carousel'")->rowCount() === 0) {
+ return;
+ }
+
+ /** @var SplFileInfo $updateSQLFile */
+ foreach ($finder as $updateSQLFile) {
+ if (version_compare($currentVersion, str_replace('.sql', '', $updateSQLFile->getFilename()), '<')) {
+ $database->insertSql(null, [$updateSQLFile->getPathname()]);
+ }
+ }
+ }
+
+ /**
+ * Defines how services are loaded in your modules.
+ */
+ public static function configureServices(ServicesConfigurator $servicesConfigurator): void
+ {
+ $servicesConfigurator->load(self::getModuleCode().'\\', __DIR__)
+ ->exclude([THELIA_MODULE_DIR.ucfirst(self::getModuleCode()).'/I18n/*'])
+ ->autowire(true)
+ ->autoconfigure(true);
+ }
+}
diff --git a/domokits/local/modules/Carousel/Config/TheliaMain.sql b/domokits/local/modules/Carousel/Config/TheliaMain.sql
new file mode 100644
index 0000000..f39cc5a
--- /dev/null
+++ b/domokits/local/modules/Carousel/Config/TheliaMain.sql
@@ -0,0 +1,51 @@
+
+# This is a fix for InnoDB in MySQL >= 4.1.x
+# It "suspends judgement" for fkey relationships until are tables are set.
+SET FOREIGN_KEY_CHECKS = 0;
+
+-- ---------------------------------------------------------------------
+-- carousel
+-- ---------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `carousel`;
+
+CREATE TABLE `carousel`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `file` VARCHAR(255),
+ `position` INTEGER,
+ `disable` INTEGER,
+ `group` VARCHAR(255),
+ `url` VARCHAR(255),
+ `limited` INTEGER,
+ `start_date` DATETIME,
+ `end_date` DATETIME,
+ `created_at` DATETIME,
+ `updated_at` DATETIME,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB;
+
+-- ---------------------------------------------------------------------
+-- carousel_i18n
+-- ---------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `carousel_i18n`;
+
+CREATE TABLE `carousel_i18n`
+(
+ `id` INTEGER NOT NULL,
+ `locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL,
+ `alt` VARCHAR(255),
+ `title` VARCHAR(255),
+ `description` LONGTEXT,
+ `chapo` TEXT,
+ `postscriptum` TEXT,
+ PRIMARY KEY (`id`,`locale`),
+ CONSTRAINT `carousel_i18n_fk_2ec1b2`
+ FOREIGN KEY (`id`)
+ REFERENCES `carousel` (`id`)
+ ON DELETE CASCADE
+) ENGINE=InnoDB;
+
+# This restores the fkey checks, after having unset them earlier
+SET FOREIGN_KEY_CHECKS = 1;
diff --git a/domokits/local/modules/Carousel/Config/config.xml b/domokits/local/modules/Carousel/Config/config.xml
new file mode 100644
index 0000000..443a64e
--- /dev/null
+++ b/domokits/local/modules/Carousel/Config/config.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/domokits/local/modules/Carousel/Config/module.xml b/domokits/local/modules/Carousel/Config/module.xml
new file mode 100644
index 0000000..c9eeff7
--- /dev/null
+++ b/domokits/local/modules/Carousel/Config/module.xml
@@ -0,0 +1,24 @@
+
+
+ Carousel\Carousel
+
+ An image carousel
+
+
+ Un carrousel d'images
+
+
+ en_US
+ fr_FR
+
+ 2.5.4
+
+ Manuel Raynaud, Franck Allimant
+ manu@raynaud.io, franck@cqfdev.fr
+
+ classic
+ 2.5.4
+ alpha
+
diff --git a/domokits/local/modules/Carousel/Config/routing.xml b/domokits/local/modules/Carousel/Config/routing.xml
new file mode 100644
index 0000000..44e9590
--- /dev/null
+++ b/domokits/local/modules/Carousel/Config/routing.xml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+ Carousel\Controller\ConfigurationController::uploadImage
+
+
+
+ Carousel\Controller\ConfigurationController::updateAction
+
+
+
+ Carousel\Controller\ConfigurationController::deleteAction
+
+
+
diff --git a/domokits/local/modules/Carousel/Config/schema.xml b/domokits/local/modules/Carousel/Config/schema.xml
new file mode 100644
index 0000000..9764d90
--- /dev/null
+++ b/domokits/local/modules/Carousel/Config/schema.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/domokits/local/modules/Carousel/Config/sql/destroy.sql b/domokits/local/modules/Carousel/Config/sql/destroy.sql
new file mode 100644
index 0000000..e611606
--- /dev/null
+++ b/domokits/local/modules/Carousel/Config/sql/destroy.sql
@@ -0,0 +1,6 @@
+SET FOREIGN_KEY_CHECKS = 0;
+
+DROP TABLE IF EXISTS `carousel`;
+DROP TABLE IF EXISTS `carousel_i18n`;
+
+SET FOREIGN_KEY_CHECKS = 1;
\ No newline at end of file
diff --git a/domokits/local/modules/Carousel/Config/sqldb.map b/domokits/local/modules/Carousel/Config/sqldb.map
new file mode 100644
index 0000000..a58fd16
--- /dev/null
+++ b/domokits/local/modules/Carousel/Config/sqldb.map
@@ -0,0 +1,2 @@
+# Sqlfile -> Database map
+TheliaMain.sql=TheliaMain
diff --git a/domokits/local/modules/Carousel/Config/update/2.4.0.sql b/domokits/local/modules/Carousel/Config/update/2.4.0.sql
new file mode 100644
index 0000000..8f95a9a
--- /dev/null
+++ b/domokits/local/modules/Carousel/Config/update/2.4.0.sql
@@ -0,0 +1 @@
+ALTER TABLE `carousel` ADD (`disable` INTEGER, `group` VARCHAR(255),`limited` INTEGER, `start_date` DATETIME, `end_date` DATETIME);
diff --git a/domokits/local/modules/Carousel/Controller/ConfigurationController.php b/domokits/local/modules/Carousel/Controller/ConfigurationController.php
new file mode 100644
index 0000000..a79d460
--- /dev/null
+++ b/domokits/local/modules/Carousel/Controller/ConfigurationController.php
@@ -0,0 +1,196 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Carousel\Controller;
+
+use Carousel\Form\CarouselImageForm;
+use Carousel\Form\CarouselUpdateForm;
+use Carousel\Model\Carousel;
+use Carousel\Model\CarouselQuery;
+use Symfony\Component\Form\Form;
+use Symfony\Component\HttpFoundation\File\UploadedFile;
+use Symfony\Component\HttpFoundation\RedirectResponse;
+use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
+use Thelia\Controller\Admin\BaseAdminController;
+use Thelia\Core\Event\File\FileCreateOrUpdateEvent;
+use Thelia\Core\Event\TheliaEvents;
+use Thelia\Core\Form\TheliaFormFactory;
+use Thelia\Core\HttpFoundation\Request;
+use Thelia\Core\Security\AccessManager;
+use Thelia\Core\Security\Resource\AdminResources;
+use Thelia\Form\Exception\FormValidationException;
+use Thelia\Model\Lang;
+use Thelia\Model\LangQuery;
+use Thelia\Tools\URL;
+
+/**
+ * Class ConfigurationController.
+ *
+ * @author manuel raynaud
+ */
+class ConfigurationController extends BaseAdminController
+{
+ public function uploadImage(
+ Request $request,
+ TheliaFormFactory $formFactory,
+ EventDispatcherInterface $eventDispatcher
+ ) {
+ if (null !== $response = $this->checkAuth(AdminResources::MODULE, ['carousel'], AccessManager::CREATE)) {
+ return $response;
+ }
+
+ $form = $formFactory->createForm(CarouselImageForm::class);
+ $error_message = null;
+ try {
+ $formData = $this->validateForm($form)->getData();
+
+ /** @var UploadedFile $fileBeingUploaded */
+ $fileBeingUploaded = $formData['file'];
+
+ $fileModel = new Carousel();
+
+ $fileCreateOrUpdateEvent = new FileCreateOrUpdateEvent(1);
+ $fileCreateOrUpdateEvent->setModel($fileModel);
+ $fileCreateOrUpdateEvent->setUploadedFile($fileBeingUploaded);
+
+ $eventDispatcher->dispatch(
+ $fileCreateOrUpdateEvent,
+ TheliaEvents::IMAGE_SAVE
+ );
+
+ // Compensate issue #1005
+ $langs = LangQuery::create()->find();
+
+ /** @var Lang $lang */
+ foreach ($langs as $lang) {
+ $fileCreateOrUpdateEvent->getModel()->setLocale($lang->getLocale())->setTitle('')->save();
+ }
+
+ $response = $this->redirectToConfigurationPage();
+ } catch (FormValidationException $e) {
+ $error_message = $this->createStandardFormValidationErrorMessage($e);
+ }
+
+ if (null !== $error_message) {
+ $this->setupFormErrorContext(
+ 'carousel upload',
+ $error_message,
+ $form
+ );
+
+ $response = $this->render(
+ 'module-configure',
+ [
+ 'module_code' => 'Carousel',
+ ]
+ );
+ }
+
+ return $response;
+ }
+
+ /**
+ * @param Form $form
+ * @param string $fieldName
+ * @param int $id
+ *
+ * @return string
+ */
+ protected function getFormFieldValue($form, $fieldName, $id)
+ {
+ $value = $form->get(sprintf('%s%d', $fieldName, $id))->getData();
+
+ return $value;
+ }
+
+ public function updateAction(
+ TheliaFormFactory $formFactory
+ ) {
+ if (null !== $response = $this->checkAuth(AdminResources::MODULE, ['carousel'], AccessManager::UPDATE)) {
+ return $response;
+ }
+
+ $form = $formFactory->createForm(CarouselUpdateForm::class);
+
+ $error_message = null;
+
+ try {
+ $updateForm = $this->validateForm($form);
+
+ $carousels = CarouselQuery::create()->findAllByPosition();
+
+ $locale = $this->getCurrentEditionLocale();
+
+ /** @var Carousel $carousel */
+ foreach ($carousels as $carousel) {
+ $id = $carousel->getId();
+
+ $carousel
+ ->setPosition($this->getFormFieldValue($updateForm, 'position', $id))
+ ->setDisable($this->getFormFieldValue($updateForm, 'disable', $id))
+ ->setUrl($this->getFormFieldValue($updateForm, 'url', $id))
+ ->setLocale($locale)
+ ->setTitle($this->getFormFieldValue($updateForm, 'title', $id))
+ ->setAlt($this->getFormFieldValue($updateForm, 'alt', $id))
+ ->setChapo($this->getFormFieldValue($updateForm, 'chapo', $id))
+ ->setDescription($this->getFormFieldValue($updateForm, 'description', $id))
+ ->setPostscriptum($this->getFormFieldValue($updateForm, 'postscriptum', $id))
+ ->setGroup($this->getFormFieldValue($updateForm, 'group', $id))
+ ->setLimited($this->getFormFieldValue($updateForm, 'limited', $id))
+ ->setStartDate($this->getFormFieldValue($updateForm, 'start_date', $id))
+ ->setEndDate($this->getFormFieldValue($updateForm, 'end_date', $id))
+ ->save();
+ }
+
+ $response = $this->redirectToConfigurationPage();
+ } catch (FormValidationException $e) {
+ $error_message = $this->createStandardFormValidationErrorMessage($e);
+ }
+
+ if (null !== $error_message) {
+ $this->setupFormErrorContext(
+ 'carousel upload',
+ $error_message,
+ $form
+ );
+
+ $response = $this->render('module-configure', ['module_code' => 'Carousel']);
+ }
+
+ return $response;
+ }
+
+ public function deleteAction(
+ Request $request
+ ) {
+ if (null !== $response = $this->checkAuth(AdminResources::MODULE, ['carousel'], AccessManager::DELETE)) {
+ return $response;
+ }
+
+ $imageId = $request->get('image_id');
+
+ if ($imageId != '') {
+ $carousel = CarouselQuery::create()->findPk($imageId);
+
+ if (null !== $carousel) {
+ $carousel->delete();
+ }
+ }
+
+ return $this->redirectToConfigurationPage();
+ }
+
+ protected function redirectToConfigurationPage()
+ {
+ return new RedirectResponse(URL::getInstance()->absoluteUrl('/admin/module/Carousel'));
+ }
+}
diff --git a/domokits/local/modules/Carousel/Form/CarouselImageForm.php b/domokits/local/modules/Carousel/Form/CarouselImageForm.php
new file mode 100644
index 0000000..02653ee
--- /dev/null
+++ b/domokits/local/modules/Carousel/Form/CarouselImageForm.php
@@ -0,0 +1,46 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Carousel\Form;
+
+use Carousel\Carousel;
+use Symfony\Component\Form\Extension\Core\Type\FileType;
+use Symfony\Component\Validator\Constraints\Image;
+use Thelia\Core\Translation\Translator;
+use Thelia\Form\BaseForm;
+
+/**
+ * Class CarouselImageForm.
+ *
+ * @author manuel raynaud
+ */
+class CarouselImageForm extends BaseForm
+{
+ protected function buildForm(): void
+ {
+ $translator = Translator::getInstance();
+ $this->formBuilder
+ ->add(
+ 'file',
+ FileType::class,
+ [
+ 'constraints' => [
+ new Image(),
+ ],
+ 'label' => $translator->trans('Carousel image', [], Carousel::DOMAIN_NAME),
+ 'label_attr' => [
+ 'for' => 'file',
+ ],
+ ]
+ );
+ }
+}
diff --git a/domokits/local/modules/Carousel/Form/CarouselUpdateForm.php b/domokits/local/modules/Carousel/Form/CarouselUpdateForm.php
new file mode 100644
index 0000000..f9e0497
--- /dev/null
+++ b/domokits/local/modules/Carousel/Form/CarouselUpdateForm.php
@@ -0,0 +1,222 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Carousel\Form;
+
+use Carousel\Carousel;
+use Carousel\Model\CarouselQuery;
+use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
+use Symfony\Component\Form\Extension\Core\Type\DateTimeType;
+use Symfony\Component\Form\Extension\Core\Type\TextareaType;
+use Symfony\Component\Form\Extension\Core\Type\TextType;
+use Symfony\Component\Form\Extension\Core\Type\UrlType;
+use Thelia\Form\BaseForm;
+
+/**
+ * Class CarouselUpdateForm.
+ *
+ * @author manuel raynaud
+ */
+class CarouselUpdateForm extends BaseForm
+{
+ protected function buildForm(): void
+ {
+ $formBuilder = $this->formBuilder;
+
+ $carousels = CarouselQuery::create()->orderByPosition()->find();
+
+ /** @var \Carousel\Model\Carousel $carousel */
+ foreach ($carousels as $carousel) {
+ $id = $carousel->getId();
+
+ $formBuilder->add(
+ 'position'.$id,
+ TextType::class,
+ [
+ 'label' => $this->translator->trans('Image position in carousel', [], Carousel::DOMAIN_NAME),
+ 'label_attr' => [
+ 'for' => 'position'.$id,
+ ],
+ 'required' => false,
+ 'attr' => [
+ 'placeholder' => $this->translator->trans(
+ 'Image position in carousel',
+ [],
+ Carousel::DOMAIN_NAME
+ ),
+ ],
+ ]
+ )->add(
+ 'alt'.$id,
+ TextType::class,
+ [
+ 'label' => $this->translator->trans('Alternative image text', [], Carousel::DOMAIN_NAME),
+ 'label_attr' => [
+ 'for' => 'alt'.$id,
+ ],
+ 'required' => false,
+ 'attr' => [
+ 'placeholder' => $this->translator->trans(
+ 'Displayed when image is not visible',
+ [],
+ Carousel::DOMAIN_NAME
+ ),
+ ],
+ ]
+ )->add(
+ 'group'.$id,
+ TextType::class,
+ [
+ 'label' => $this->translator->trans('Group image', [], Carousel::DOMAIN_NAME),
+ 'label_attr' => [
+ 'for' => 'group'.$id,
+ ],
+ 'required' => false,
+ 'attr' => [
+ 'placeholder' => $this->translator->trans(
+ 'Group of images',
+ [],
+ Carousel::DOMAIN_NAME
+ ),
+ ],
+ ]
+ )->add(
+ 'url'.$id,
+ UrlType::class,
+ [
+ 'label' => $this->translator->trans('Image URL', [], Carousel::DOMAIN_NAME),
+ 'label_attr' => [
+ 'for' => 'url'.$id,
+ ],
+ 'required' => false,
+ 'attr' => [
+ 'placeholder' => $this->translator->trans(
+ 'Please enter a valid URL',
+ [],
+ Carousel::DOMAIN_NAME
+ ),
+ ],
+ ]
+ )->add(
+ 'title'.$id,
+ TextType::class,
+ [
+ 'constraints' => [],
+ 'required' => false,
+ 'label' => $this->translator->trans('Title', [], Carousel::DOMAIN_NAME),
+ 'label_attr' => [
+ 'for' => 'title_field'.$id,
+ ],
+ 'attr' => [
+ 'placeholder' => $this->translator->trans('A descriptive title', [], Carousel::DOMAIN_NAME),
+ ],
+ ]
+ )->add(
+ 'chapo'.$id,
+ TextareaType::class,
+ [
+ 'constraints' => [],
+ 'required' => false,
+ 'label' => $this->translator->trans('Summary', [], Carousel::DOMAIN_NAME),
+ 'label_attr' => [
+ 'for' => 'summary_field'.$id,
+ 'help' => $this->translator->trans(
+ 'A short description, used when a summary or an introduction is required',
+ [],
+ Carousel::DOMAIN_NAME
+ ),
+ ],
+ 'attr' => [
+ 'rows' => 3,
+ 'placeholder' => $this->translator->trans('Short description text', [], Carousel::DOMAIN_NAME),
+ ],
+ ]
+ )->add(
+ 'description'.$id,
+ TextareaType::class,
+ [
+ 'constraints' => [],
+ 'required' => false,
+ 'label' => $this->translator->trans('Detailed description', [], Carousel::DOMAIN_NAME),
+ 'label_attr' => [
+ 'for' => 'detailed_description_field'.$id,
+ 'help' => $this->translator->trans('The detailed description.', [], Carousel::DOMAIN_NAME),
+ ],
+ 'attr' => [
+ 'rows' => 5,
+ ],
+ ]
+ )->add(
+ 'disable'.$id,
+ CheckboxType::class,
+ [
+ 'required' => false,
+ 'label' => $this->translator->trans('Disable image', [], Carousel::DOMAIN_NAME),
+ 'label_attr' => [
+ 'for' => 'enable'.$id,
+ ],
+ ]
+ )->add(
+ 'limited'.$id,
+ CheckboxType::class,
+ [
+ 'required' => false,
+ 'label' => $this->translator->trans('Limited', [], Carousel::DOMAIN_NAME),
+ 'label_attr' => [
+ 'for' => 'limited'.$id,
+ ],
+ ]
+ )->add(
+ 'start_date'.$id,
+ DateTimeType::class,
+ [
+ 'label' => $this->translator->trans('Start date', [], Carousel::DOMAIN_NAME),
+ 'widget' => 'single_text',
+ 'required' => false,
+ ]
+ )->add(
+ 'end_date'.$id,
+ DateTimeType::class,
+ [
+ 'label' => $this->translator->trans('End date', [], Carousel::DOMAIN_NAME),
+ 'widget' => 'single_text',
+ 'required' => false,
+ ]
+ )->add(
+ 'postscriptum'.$id,
+ TextareaType::class,
+ [
+ 'constraints' => [],
+ 'required' => false,
+ 'label' => $this->translator->trans('Conclusion', [], Carousel::DOMAIN_NAME),
+ 'label_attr' => [
+ 'for' => 'conclusion_field'.$id,
+ 'help' => $this->translator->trans(
+ 'A short text, used when an additional or supplemental information is required.',
+ [],
+ Carousel::DOMAIN_NAME
+ ),
+ ],
+ 'attr' => [
+ 'placeholder' => $this->translator->trans('Short additional text', [], Carousel::DOMAIN_NAME),
+ 'rows' => 3,
+ ],
+ ]
+ );
+ }
+ }
+
+ public static function getName()
+ {
+ return 'carousel_update';
+ }
+}
diff --git a/domokits/local/modules/Carousel/Hook/BackHook.php b/domokits/local/modules/Carousel/Hook/BackHook.php
new file mode 100644
index 0000000..25c4a35
--- /dev/null
+++ b/domokits/local/modules/Carousel/Hook/BackHook.php
@@ -0,0 +1,43 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Carousel\Hook;
+
+use Carousel\Carousel;
+use Thelia\Core\Event\Hook\HookRenderBlockEvent;
+use Thelia\Core\Hook\BaseHook;
+use Thelia\Tools\URL;
+
+/**
+ * Class BackHook.
+ *
+ * @author Emmanuel Nurit
+ */
+class BackHook extends BaseHook
+{
+ /**
+ * Add a new entry in the admin tools menu.
+ *
+ * should add to event a fragment with fields : id,class,url,title
+ */
+ public function onMainTopMenuTools(HookRenderBlockEvent $event): void
+ {
+ $event->add(
+ [
+ 'id' => 'tools_menu_carousel',
+ 'class' => '',
+ 'url' => URL::getInstance()->absoluteUrl('/admin/module/Carousel'),
+ 'title' => $this->trans('Edit your carousel', [], Carousel::DOMAIN_NAME),
+ ]
+ );
+ }
+}
diff --git a/domokits/local/modules/Carousel/I18n/backOffice/default/de_DE.php b/domokits/local/modules/Carousel/I18n/backOffice/default/de_DE.php
new file mode 100644
index 0000000..00b6c40
--- /dev/null
+++ b/domokits/local/modules/Carousel/I18n/backOffice/default/de_DE.php
@@ -0,0 +1,24 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Add an image to the carousel' => 'Ein Bild zu Karussell hinzufügen',
+ 'Add this image to the carousel' => 'Dieses Bild zu Karussell hinzufügen',
+ 'Carousel image' => 'Karussell-Bild',
+ 'Carousel images' => 'Karussell-Bilder',
+ 'Delete a carousel image' => 'Ein Karussell-Bild löschen',
+ 'Do you really want to remove this image from the carousel ?' => 'Wollen Sie dieses Bild wirklich aus dem Karussell entfernen?',
+ 'Edit your carousel.' => 'Karussell bearbeiten.',
+ 'Remove this image' => 'Dieses Bild entfernen',
+ 'Your carousel contains no image. Please add one using the form above.' => 'Das Karussell enthält kein Bild. Bitte fügen Sie mit dem Formular oben eines hinzu.',
+ 'Position' => 'Position',
+];
diff --git a/domokits/local/modules/Carousel/I18n/backOffice/default/en_US.php b/domokits/local/modules/Carousel/I18n/backOffice/default/en_US.php
new file mode 100644
index 0000000..a55382d
--- /dev/null
+++ b/domokits/local/modules/Carousel/I18n/backOffice/default/en_US.php
@@ -0,0 +1,25 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Add an image to the carousel' => 'Add an image to the carousel',
+ 'Add this image to the carousel' => 'Add this image to the carousel',
+ 'Carousel image' => 'Carousel image',
+ 'Carousel images' => 'Carousel images',
+ 'Delete a carousel image' => 'Delete a carousel image',
+ 'Do you really want to remove this image from the carousel ?' => 'Do you really want to remove this image from the carousel ?',
+ 'Edit your carousel.' => 'Edit your carousel.',
+ 'Remove this image' => 'Remove this image',
+ 'Your carousel contains no image. Please add one using the form above.' => 'Your carousel contains no image. Please add one using the form above.',
+ 'Position' => 'Position',
+ 'YYYY-MM-DD' => 'YYYY-MM-DD',
+];
diff --git a/domokits/local/modules/Carousel/I18n/backOffice/default/fr_FR.php b/domokits/local/modules/Carousel/I18n/backOffice/default/fr_FR.php
new file mode 100644
index 0000000..0b43a67
--- /dev/null
+++ b/domokits/local/modules/Carousel/I18n/backOffice/default/fr_FR.php
@@ -0,0 +1,25 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Add an image to the carousel' => 'Ajouter une image au carrousel',
+ 'Add this image to the carousel' => 'Ajouter l\'image au carrousel',
+ 'Carousel image' => 'Image du carrousel',
+ 'Carousel images' => 'Images du carrousel',
+ 'Delete a carousel image' => 'Supprimer une image du carrousel',
+ 'Do you really want to remove this image from the carousel ?' => 'Voulez-vous vraiment retirer cette image du carrousel ?',
+ 'Edit your carousel.' => 'Modifier votre carrousel',
+ 'Remove this image' => 'Supprimer cette image',
+ 'Your carousel contains no image. Please add one using the form above.' => 'Votre carrousel ne contient aucune image. Ajoutez votre première image avec le formulaire ci-dessus',
+ 'Position' => 'Position',
+ 'YYYY-MM-DD' => 'AAAA-MM-JJ',
+];
diff --git a/domokits/local/modules/Carousel/I18n/backOffice/default/ru_RU.php b/domokits/local/modules/Carousel/I18n/backOffice/default/ru_RU.php
new file mode 100644
index 0000000..5a162b4
--- /dev/null
+++ b/domokits/local/modules/Carousel/I18n/backOffice/default/ru_RU.php
@@ -0,0 +1,24 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Add an image to the carousel' => 'Добавить изображение в карусель',
+ 'Add this image to the carousel' => 'Добавить это изображение в карусель',
+ 'Carousel image' => 'Изображение карусели',
+ 'Carousel images' => 'Изображения карусели',
+ 'Delete a carousel image' => 'Удалить изображение карусели',
+ 'Do you really want to remove this image from the carousel ?' => 'Вы действительно хотите удалить это изображение из карусели ?',
+ 'Edit your carousel.' => 'Редактировать вашу карусель.',
+ 'Remove this image' => 'Удалить это изображение',
+ 'Your carousel contains no image. Please add one using the form above.' => 'Ваша карусель не содержит изображений. Пожалуйста, добавьте одно используя форму ниже.',
+ 'Position' => 'Позиция',
+];
diff --git a/domokits/local/modules/Carousel/I18n/backOffice/default/tr_TR.php b/domokits/local/modules/Carousel/I18n/backOffice/default/tr_TR.php
new file mode 100644
index 0000000..252bcb1
--- /dev/null
+++ b/domokits/local/modules/Carousel/I18n/backOffice/default/tr_TR.php
@@ -0,0 +1,24 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Add an image to the carousel' => 'Slayt için bir resim ekle',
+ 'Add this image to the carousel' => 'slayt için bu resim ekleme',
+ 'Carousel image' => 'slayt görüntü',
+ 'Carousel images' => 'slayt görüntüleri',
+ 'Delete a carousel image' => 'Bir slayt resmi silme',
+ 'Do you really want to remove this image from the carousel ?' => 'Bu görüntüyü slayttan kaldırmak istiyor musunuz?',
+ 'Edit your carousel.' => 'slayt düzenleyin.',
+ 'Remove this image' => 'Bu resmi kaldırma',
+ 'Your carousel contains no image. Please add one using the form above.' => 'Senin slayt hiçbir görüntü içermiyor . Lütfen yukarıdaki formu kullanarak ekleyin.',
+ 'Position' => 'Pozisyon',
+];
diff --git a/domokits/local/modules/Carousel/I18n/de_DE.php b/domokits/local/modules/Carousel/I18n/de_DE.php
new file mode 100644
index 0000000..fa52b4b
--- /dev/null
+++ b/domokits/local/modules/Carousel/I18n/de_DE.php
@@ -0,0 +1,30 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'A descriptive title' => 'Beschreibungstitel',
+ 'A short description, used when a summary or an introduction is required' => 'Eine kurze beschreibung, benutzt wenn eine Zusammenfassung order eine Einleitung ist nötig',
+ 'A short text, used when an additional or supplemental information is required.' => 'Ein kurzer Text, der verwendet wird, wenn eine zusätzliche oder ergänzende Information erforderlich ist.',
+ 'Alternative image text' => 'Alternativer Bildtext',
+ 'Carousel image' => 'Karussell-Bild',
+ 'Conclusion' => 'Abschluss',
+ 'Detailed description' => 'Detaillierte Beschreibung',
+ 'Displayed when image is not visible' => 'Angezeigt, wenn das Bild nicht sichtbar ist',
+ 'Image URL' => 'Bild-URL',
+ 'Image position in carousel' => 'Position des Bildes im Karussell',
+ 'Please enter a valid URL' => 'Bitte geben Sie eine gültige URL ein',
+ 'Short additional text' => 'Kurzer zusätzlicher Text',
+ 'Short description text' => 'Kurzes Beschreibungstext',
+ 'Summary' => 'Zusammenfassung',
+ 'The detailed description.' => 'Die detaillierte Beschreibung.',
+ 'Title' => 'Titel',
+];
diff --git a/domokits/local/modules/Carousel/I18n/en_US.php b/domokits/local/modules/Carousel/I18n/en_US.php
new file mode 100644
index 0000000..f3423c2
--- /dev/null
+++ b/domokits/local/modules/Carousel/I18n/en_US.php
@@ -0,0 +1,32 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'A descriptive title' => 'A descriptive title',
+ 'A short description, used when a summary or an introduction is required' => 'A short description, used when a summary or an introduction is required',
+ 'A short text, used when an additional or supplemental information is required.' => 'A short text, used when an additional or supplemental information is required.',
+ 'Alternative image text' => 'Alternative image text',
+ 'Carousel image' => 'Carousel image',
+ 'Conclusion' => 'Conclusion',
+ 'Detailed description' => 'Detailed description',
+ 'Displayed when image is not visible' => 'Displayed when image is not visible',
+ 'Edit your carousel' => 'Edit your carousel',
+ 'Image URL' => 'Image URL',
+ 'Image position in carousel' => 'Image position in carousel',
+ 'Please enter a valid URL' => 'Please enter a valid URL',
+ 'Short additional text' => 'Short additional text',
+ 'Short description text' => 'Short description text',
+ 'Summary' => 'Summary',
+ 'The detailed description.' => 'The detailed description.',
+ 'Title' => 'Title',
+ 'YYYY-MM-DD' => 'AAAA-MM-JJ',
+];
diff --git a/domokits/local/modules/Carousel/I18n/fr_FR.php b/domokits/local/modules/Carousel/I18n/fr_FR.php
new file mode 100644
index 0000000..2822cff
--- /dev/null
+++ b/domokits/local/modules/Carousel/I18n/fr_FR.php
@@ -0,0 +1,37 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'A descriptive title' => 'Un titre descriptif',
+ 'A short description, used when a summary or an introduction is required' => 'Une courte description, utilisée lorsqu\'un résumé ou une introduction est requise',
+ 'A short text, used when an additional or supplemental information is required.' => 'Un texte court, utilisé quand une conclusion ou une information complémentaire est nécessaire.',
+ 'Alternative image text' => 'Texte alternatif de l\'image',
+ 'Carousel image' => 'Image du carrousel',
+ 'Conclusion' => 'Conclusion',
+ 'Detailed description' => 'Description détaillée',
+ 'Disable image' => 'Désactiver l\'image',
+ 'Displayed when image is not visible' => 'Affiché lorsque l\'image n\'est pas visible',
+ 'Edit your carousel' => 'Modifier votre carousel',
+ 'End date' => 'Date de fin',
+ 'Group image' => 'Groupe de l\'image',
+ 'Group of images' => 'Nom du groupe auquel l\'image appartient',
+ 'Image URL' => 'URL de l\'image',
+ 'Image position in carousel' => 'Position de l\'image dans le carrousel',
+ 'Limited' => 'Afficher l\'image entre les dates ci-dessous',
+ 'Please enter a valid URL' => 'Merci d\'indiquer une URL valide',
+ 'Short additional text' => 'Un court texte supplémentaire',
+ 'Short description text' => 'Un court texte de description',
+ 'Start date' => 'Date de début',
+ 'Summary' => 'Résumé',
+ 'The detailed description.' => 'La description détaillée.',
+ 'Title' => 'Titre',
+];
diff --git a/domokits/local/modules/Carousel/I18n/it_IT.php b/domokits/local/modules/Carousel/I18n/it_IT.php
new file mode 100644
index 0000000..62eb7e7
--- /dev/null
+++ b/domokits/local/modules/Carousel/I18n/it_IT.php
@@ -0,0 +1,21 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'A descriptive title' => 'Un titolo descrittivo',
+ 'A short description, used when a summary or an introduction is required' => 'Una breve descrizione, utilizzata quando è necessario un sommario o un\'introduzione',
+ 'Conclusion' => 'Conclusione',
+ 'Detailed description' => 'Descrizione dettagliata',
+ 'Summary' => 'Riassunto',
+ 'The detailed description.' => 'La descrizione dettagliata.',
+ 'Title' => 'Titolo',
+];
diff --git a/domokits/local/modules/Carousel/I18n/ru_RU.php b/domokits/local/modules/Carousel/I18n/ru_RU.php
new file mode 100644
index 0000000..bcd1443
--- /dev/null
+++ b/domokits/local/modules/Carousel/I18n/ru_RU.php
@@ -0,0 +1,31 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'A descriptive title' => 'Описательный заголовок',
+ 'A short description, used when a summary or an introduction is required' => 'Краткое описание, используется когда необходимо',
+ 'A short text, used when an additional or supplemental information is required.' => 'Краткий текст используемый, когда необходима дополнительной информации.',
+ 'Alternative image text' => 'Альтернативный текст изображения',
+ 'Carousel image' => 'Изображение карусели',
+ 'Conclusion' => 'Заключение',
+ 'Detailed description' => 'Детальное описание',
+ 'Displayed when image is not visible' => 'Отображается когда изображения не видно',
+ 'Edit your carousel' => 'Редактировать вашу карусель',
+ 'Image URL' => 'URL изображения',
+ 'Image position in carousel' => 'Позиция изображения в карусели',
+ 'Please enter a valid URL' => 'Пожалуйста введите корректный URL',
+ 'Short additional text' => 'Краткий дополнительный текст',
+ 'Short description text' => 'Текст краткого описания',
+ 'Summary' => 'Краткое описание',
+ 'The detailed description.' => 'Детальное описание',
+ 'Title' => 'Заголовок',
+];
diff --git a/domokits/local/modules/Carousel/I18n/tr_TR.php b/domokits/local/modules/Carousel/I18n/tr_TR.php
new file mode 100644
index 0000000..0d33e73
--- /dev/null
+++ b/domokits/local/modules/Carousel/I18n/tr_TR.php
@@ -0,0 +1,30 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'A descriptive title' => 'Açıklayıcı bir başlık',
+ 'A short description, used when a summary or an introduction is required' => 'Bir Özeti veya giriş gerekli olduğunda kullanılan kısa bir açıklama',
+ 'A short text, used when an additional or supplemental information is required.' => 'Bir ek ya da tamamlayıcı bilgi gerekli olduğunda kullanılan kısa bir metin.',
+ 'Alternative image text' => 'Alternatif resim metini',
+ 'Carousel image' => 'slayt görüntü',
+ 'Conclusion' => 'Sonuç',
+ 'Detailed description' => 'Detaylı açıklama',
+ 'Displayed when image is not visible' => 'resim görünür olmadığında görüntülenen',
+ 'Image URL' => 'Resim Bağlantı [Link]',
+ 'Image position in carousel' => 'slayt bulunduğu resim',
+ 'Please enter a valid URL' => 'Lütfen geçerli bir URL girin',
+ 'Short additional text' => 'Kısa ek metin',
+ 'Short description text' => 'Kısa açıklama metni',
+ 'Summary' => 'Özet',
+ 'The detailed description.' => 'Ayrıntılı açıklama.',
+ 'Title' => 'Başlık',
+];
diff --git a/domokits/local/modules/Carousel/Loop/Carousel.php b/domokits/local/modules/Carousel/Loop/Carousel.php
new file mode 100644
index 0000000..5c995ec
--- /dev/null
+++ b/domokits/local/modules/Carousel/Loop/Carousel.php
@@ -0,0 +1,237 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Carousel\Loop;
+
+use Carousel\Model\CarouselQuery;
+use Propel\Runtime\ActiveQuery\Criteria;
+use Thelia\Core\Event\Image\ImageEvent;
+use Thelia\Core\Event\TheliaEvents;
+use Thelia\Core\Template\Element\LoopResult;
+use Thelia\Core\Template\Element\LoopResultRow;
+use Thelia\Core\Template\Loop\Argument\Argument;
+use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
+use Thelia\Core\Template\Loop\Image;
+use Thelia\Log\Tlog;
+use Thelia\Type\EnumListType;
+use Thelia\Type\EnumType;
+use Thelia\Type\TypeCollection;
+
+/**
+ * Class CarouselLoop.
+ *
+ * @author manuel raynaud
+ */
+class Carousel extends Image
+{
+ protected function getArgDefinitions()
+ {
+ return new ArgumentCollection(
+ Argument::createIntTypeArgument('width'),
+ Argument::createIntTypeArgument('height'),
+ Argument::createIntTypeArgument('rotation', 0),
+ Argument::createAnyTypeArgument('background_color'),
+ Argument::createIntTypeArgument('quality'),
+ new Argument(
+ 'resize_mode',
+ new TypeCollection(
+ new EnumType(['crop', 'borders', 'none'])
+ ),
+ 'none'
+ ),
+ new Argument(
+ 'order',
+ new TypeCollection(
+ new EnumListType(['alpha', 'alpha-reverse', 'manual', 'manual-reverse', 'random'])
+ ),
+ 'manual'
+ ),
+ Argument::createAnyTypeArgument('effects'),
+ Argument::createBooleanTypeArgument('allow_zoom', false),
+ Argument::createBooleanTypeArgument('filter_disable_slides', true),
+ Argument::createAlphaNumStringTypeArgument('group'),
+ Argument::createAlphaNumStringTypeArgument('format')
+ );
+ }
+
+ /**
+ * @throws \Propel\Runtime\Exception\PropelException
+ *
+ * @return LoopResult
+ */
+ public function parseResults(LoopResult $loopResult)
+ {
+ /** @var \Carousel\Model\Carousel $carousel */
+ foreach ($loopResult->getResultDataCollection() as $carousel) {
+ $imgSourcePath = $carousel->getUploadDir().DS.$carousel->getFile();
+ if (!file_exists($imgSourcePath)) {
+ Tlog::getInstance()->error(sprintf('Carousel source image file %s does not exists.', $imgSourcePath));
+ continue;
+ }
+
+ $startDate = $carousel->getStartDate();
+ $endDate = $carousel->getEndDate();
+
+ if ($carousel->getLimited()) {
+ $now = new \DateTime();
+ if ($carousel->getDisable()) {
+ if ($now > $startDate && $now < $endDate) {
+ $carousel
+ ->setDisable(0)
+ ->save();
+ }
+ } else {
+ if ($now < $startDate || $now > $endDate) {
+ $carousel
+ ->setDisable(1)
+ ->save();
+ }
+ }
+ }
+
+ if ($this->getFilterDisableSlides() && $carousel->getDisable()) {
+ continue;
+ }
+
+ $loopResultRow = new LoopResultRow($carousel);
+
+ $event = new ImageEvent();
+ $event->setSourceFilepath($imgSourcePath)
+ ->setCacheSubdirectory('carousel');
+
+ switch ($this->getResizeMode()) {
+ case 'crop':
+ $resize_mode = \Thelia\Action\Image::EXACT_RATIO_WITH_CROP;
+ break;
+ case 'borders':
+ $resize_mode = \Thelia\Action\Image::EXACT_RATIO_WITH_BORDERS;
+ break;
+ case 'none':
+ default:
+ $resize_mode = \Thelia\Action\Image::KEEP_IMAGE_RATIO;
+ }
+
+ // Prepare tranformations
+ $width = $this->getWidth();
+ $height = $this->getHeight();
+ $rotation = $this->getRotation();
+ $background_color = $this->getBackgroundColor();
+ $quality = $this->getQuality();
+ $effects = $this->getEffects();
+ $format = $this->getFormat();
+
+ if (null !== $width) {
+ $event->setWidth($width);
+ }
+ if (null !== $height) {
+ $event->setHeight($height);
+ }
+ $event->setResizeMode($resize_mode);
+ if (null !== $rotation) {
+ $event->setRotation($rotation);
+ }
+ if (null !== $background_color) {
+ $event->setBackgroundColor($background_color);
+ }
+ if (null !== $quality) {
+ $event->setQuality($quality);
+ }
+ if (null !== $effects) {
+ $event->setEffects($effects);
+ }
+ if (null !== $format) {
+ $event->setFormat($format);
+ }
+
+ $event->setAllowZoom($this->getAllowZoom());
+
+ // Dispatch image processing event
+ $this->dispatcher->dispatch($event, TheliaEvents::IMAGE_PROCESS);
+
+ if ($startDate) {
+ $startDate = $startDate->format('Y-m-d').'T'.$startDate->format('H:i');
+ }
+ if ($endDate) {
+ $endDate = $endDate->format('Y-m-d').'T'.$endDate->format('H:i');
+ }
+
+ $loopResultRow
+ ->set('ID', $carousel->getId())
+ ->set('LOCALE', $this->locale)
+ ->set('IMAGE_URL', $event->getFileUrl())
+ ->set('ORIGINAL_IMAGE_URL', $event->getOriginalFileUrl())
+ ->set('IMAGE_PATH', $event->getCacheFilepath())
+ ->set('ORIGINAL_IMAGE_PATH', $event->getSourceFilepath())
+ ->set('TITLE', $carousel->getVirtualColumn('i18n_TITLE'))
+ ->set('CHAPO', $carousel->getVirtualColumn('i18n_CHAPO'))
+ ->set('DESCRIPTION', $carousel->getVirtualColumn('i18n_DESCRIPTION'))
+ ->set('POSTSCRIPTUM', $carousel->getVirtualColumn('i18n_POSTSCRIPTUM'))
+ ->set('ALT', $carousel->getVirtualColumn('i18n_ALT'))
+ ->set('URL', $carousel->getUrl())
+ ->set('POSITION', $carousel->getPosition())
+ ->set('DISABLE', $carousel->getDisable())
+ ->set('GROUP', $carousel->getGroup())
+ ->set('LIMITED', $carousel->getLimited())
+ ->set('START_DATE', $startDate)
+ ->set('END_DATE', $endDate)
+ ;
+
+ $loopResult->addRow($loopResultRow);
+ }
+
+ return $loopResult;
+ }
+
+ /**
+ * this method returns a Propel ModelCriteria.
+ *
+ * @return \Propel\Runtime\ActiveQuery\ModelCriteria
+ */
+ public function buildModelCriteria()
+ {
+ $search = CarouselQuery::create();
+ $group = $this->getGroup();
+
+ $this->configureI18nProcessing($search, ['ALT', 'TITLE', 'CHAPO', 'DESCRIPTION', 'POSTSCRIPTUM']);
+
+ $orders = $this->getOrder();
+
+ // Results ordering
+ foreach ($orders as $order) {
+ switch ($order) {
+ case 'alpha':
+ $search->addAscendingOrderByColumn('i18n_TITLE');
+ break;
+ case 'alpha-reverse':
+ $search->addDescendingOrderByColumn('i18n_TITLE');
+ break;
+ case 'manual-reverse':
+ $search->orderByPosition(Criteria::DESC);
+ break;
+ case 'manual':
+ $search->orderByPosition(Criteria::ASC);
+ break;
+ case 'random':
+ $search->clearOrderByColumns();
+ $search->addAscendingOrderByColumn('RAND()');
+ break 2;
+ break;
+ }
+ }
+
+ if ($group) {
+ $search->filterByGroup($group);
+ }
+
+ return $search;
+ }
+}
diff --git a/domokits/local/modules/Carousel/Model/Carousel.php b/domokits/local/modules/Carousel/Model/Carousel.php
new file mode 100644
index 0000000..f81a496
--- /dev/null
+++ b/domokits/local/modules/Carousel/Model/Carousel.php
@@ -0,0 +1,120 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Carousel\Model;
+
+use Carousel\Model\Base\Carousel as BaseCarousel;
+use Propel\Runtime\ActiveQuery\ModelCriteria;
+use Propel\Runtime\Connection\ConnectionInterface;
+use Symfony\Component\Filesystem\Exception\IOException;
+use Symfony\Component\Filesystem\Filesystem;
+use Thelia\Files\FileModelInterface;
+use Thelia\Files\FileModelParentInterface;
+use Thelia\Form\BaseForm;
+
+class Carousel extends BaseCarousel implements FileModelInterface
+{
+ public function preDelete(ConnectionInterface $con = null)
+ {
+ $carousel = new \Carousel\Carousel();
+
+ $fs = new Filesystem();
+
+ try {
+ $fs->remove($carousel->getUploadDir().DS.$this->getFile());
+
+ return true;
+ } catch (IOException $e) {
+ return false;
+ }
+ }
+
+ /**
+ * Set file parent id.
+ *
+ * @param int $parentId parent id
+ *
+ * @return $this
+ */
+ public function setParentId($parentId)
+ {
+ return $this;
+ }
+
+ /**
+ * Get file parent id.
+ *
+ * @return int parent id
+ */
+ public function getParentId()
+ {
+ return $this->getId();
+ }
+
+ /**
+ * @return FileModelParentInterface the parent file model
+ */
+ public function getParentFileModel()
+ {
+ return new static();
+ }
+
+ /**
+ * Get the ID of the form used to change this object information.
+ *
+ * @return BaseForm the form
+ */
+ public function getUpdateFormId()
+ {
+ return 'carousel.image';
+ }
+
+ /**
+ * @return string the path to the upload directory where files are stored, without final slash
+ */
+ public function getUploadDir()
+ {
+ $carousel = new \Carousel\Carousel();
+
+ return $carousel->getUploadDir();
+ }
+
+ /**
+ * @return string the URL to redirect to after update from the back-office
+ */
+ public function getRedirectionUrl()
+ {
+ return '/admin/module/Carousel';
+ }
+
+ /**
+ * Get the Query instance for this object.
+ *
+ * @return ModelCriteria
+ */
+ public function getQueryInstance()
+ {
+ return CarouselQuery::create();
+ }
+
+ /**
+ * @param bool $visible true if the file is visible, false otherwise
+ *
+ * @return FileModelInterface
+ */
+ public function setVisible($visible)
+ {
+ // Not implemented
+
+ return $this;
+ }
+}
diff --git a/domokits/local/modules/Carousel/Model/CarouselI18n.php b/domokits/local/modules/Carousel/Model/CarouselI18n.php
new file mode 100644
index 0000000..dd31b3e
--- /dev/null
+++ b/domokits/local/modules/Carousel/Model/CarouselI18n.php
@@ -0,0 +1,19 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Carousel\Model;
+
+use Carousel\Model\Base\CarouselI18n as BaseCarouselI18n;
+
+class CarouselI18n extends BaseCarouselI18n
+{
+}
diff --git a/domokits/local/modules/Carousel/Model/CarouselI18nQuery.php b/domokits/local/modules/Carousel/Model/CarouselI18nQuery.php
new file mode 100644
index 0000000..b54b2d4
--- /dev/null
+++ b/domokits/local/modules/Carousel/Model/CarouselI18nQuery.php
@@ -0,0 +1,26 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Carousel\Model;
+
+use Carousel\Model\Base\CarouselI18nQuery as BaseCarouselI18nQuery;
+
+/**
+ * Skeleton subclass for performing query and update operations on the 'carousel_i18n' table.
+ *
+ * You should add additional methods to this class to meet the
+ * application requirements. This class will only be generated as
+ * long as it does not already exist in the output directory.
+ */
+class CarouselI18nQuery extends BaseCarouselI18nQuery
+{
+} // CarouselI18nQuery
diff --git a/domokits/local/modules/Carousel/Model/CarouselQuery.php b/domokits/local/modules/Carousel/Model/CarouselQuery.php
new file mode 100644
index 0000000..6a478a8
--- /dev/null
+++ b/domokits/local/modules/Carousel/Model/CarouselQuery.php
@@ -0,0 +1,31 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Carousel\Model;
+
+use Carousel\Model\Base\CarouselQuery as BaseCarouselQuery;
+
+/**
+ * Skeleton subclass for performing query and update operations on the 'carousel' table.
+ *
+ * You should add additional methods to this class to meet the
+ * application requirements. This class will only be generated as
+ * long as it does not already exist in the output directory.
+ */
+class CarouselQuery extends BaseCarouselQuery
+{
+ public function findAllByPosition()
+ {
+ return $this->orderByPosition()
+ ->find();
+ }
+} // CarouselQuery
diff --git a/domokits/local/modules/Carousel/Readme.md b/domokits/local/modules/Carousel/Readme.md
new file mode 100644
index 0000000..830f32d
--- /dev/null
+++ b/domokits/local/modules/Carousel/Readme.md
@@ -0,0 +1,69 @@
+# Carousel
+
+This module for Thelia add a customizable carousel on your home page. You can upload you own image and overload the default template in your template for using the carousel.
+
+## Installation
+
+* Copy the module into ```/local/modules/``` directory and be sure that the name of the module is Carousel.
+* Activate it in your thelia administration panel
+
+## Usage
+
+In the configuration panel of this module, you can upload as many images as you want.
+
+## Hook
+
+The carousel is installed in the "Home page - main area" (home.body) hook.
+
+## Loop
+
+Customize images with the `carousel` loop, which has the same arguments as the `image` loop. You can define a width, a height, and many other parameters
+
+### Input arguments
+
+|Argument |Description |
+|--- |--- |
+|**width** | A width in pixels, for resizing image. If only the width is provided, the image ratio is preserved. Example : width="200" |
+|**height** | A height in pixels, for resizing image. If only the height is provided, the image ratio is preserved. example : height="200" |
+|**rotation** |The rotation angle in degrees (positive or negative) applied to the image. The background color of the empty areas is the one specified by 'background_color'. example : rotation="90" |
+|**background_color** |The color applied to empty image parts during processing. Use $rgb or $rrggbb color format. example : background_color="$cc8000"|
+|**quality** |The generated image quality, from 0(!) to 100%. The default value is 75% (you can hange this in the Administration panel). example : quality="70"|
+|**resize_mode** | If 'crop', the image will have the exact specified width and height, and will be cropped if required. If 'borders', the image will have the exact specified width and height, and some borders may be added. The border color is the one specified by 'background_color'. If 'none' or missing, the image ratio is preserved, and depending od this ratio, may not have the exact width and height required. resize_mode="crop"|
+|**effects** |One or more comma separated effects definitions, that will be applied to the image in the specified order. Please see below a detailed description of available effects. Expected values :
gamma:value : change the image Gamma to the specified value. Example: gamma:0.7.
grayscale or greyscale : switch image to grayscale.
colorize:color : apply a color mask to the image. The color format is $rgb or $rrggbb. Example: colorize:$ff2244.
negative : transform the image in its negative equivalent.
vflip or vertical_flip : flip the image vertically.
hflip or horizontal_flip : flip the image horizontally.
example : effects="greyscale,gamma:0.7,vflip" |
+|**group** |The name of an image group. Return only images from the specified group|
+|**filter_disable_slides** |if true (the default), the disabled slides will not be displayed|
+
+### Ouput arguments
+
+|Variable |Description |
+|--- |--- |
+|$ID |the image ID |
+|$IMAGE_URL |The absolute URL to the generated image |
+|$ORIGINAL_IMAGE_URL |The absolute URL to the original image |
+|$IMAGE_PATH |The absolute path to the generated image file |
+|$ORIGINAL_IMAGE_PATH |The absolute path to the original image file |
+|$ALT |alt text |
+|$TITLE |the slide title |
+|$CHAPO |the slide summary |
+|$DESCRIPTION |the slide description |
+|$POSTSCRIPTUM |the slide conclusion |
+|$LOCALE |the textual elements locale |
+|$POSITION |the slide position in the carousel |
+|$URL |the related URL |
+|$LIMITED| true if slide is disabled, false otherwise |
+|$START_DATE| limited slide display start date |
+|$END_DATE| limited slide display end date |
+|$DISABLE| true if slide display is limited |
+|$GROUP| name of the group the slide belong to |
+
+### Exemple
+
+```
+{loop type="carousel" name="carousel.front" width="1200" height="390" resize_mode="borders"}
+
+{/loop}
+```
+
+## How to override ?
+
+If you want your own carousel in your tempalte, create the directory ```modules/Carousel``` then create the template ```carousel.html``` in this directory. Here you can create your own carousel and the replace the default template provided in the module.
diff --git a/domokits/local/modules/Carousel/composer.json b/domokits/local/modules/Carousel/composer.json
new file mode 100644
index 0000000..5cfd6d3
--- /dev/null
+++ b/domokits/local/modules/Carousel/composer.json
@@ -0,0 +1,11 @@
+{
+ "name": "thelia/carousel-module",
+ "license": "LGPL-3.0+",
+ "type": "thelia-module",
+ "require": {
+ "thelia/installer": "~1.1"
+ },
+ "extra": {
+ "installer-name": "Carousel"
+ }
+}
diff --git a/domokits/local/modules/Carousel/templates/backOffice/default/assets/js/module-configuration.js b/domokits/local/modules/Carousel/templates/backOffice/default/assets/js/module-configuration.js
new file mode 100644
index 0000000..54b03e5
--- /dev/null
+++ b/domokits/local/modules/Carousel/templates/backOffice/default/assets/js/module-configuration.js
@@ -0,0 +1,6 @@
+$(function() {
+ // Set proper image ID in delete from
+ $('a.image-delete').click(function(ev) {
+ $('#image_delete_id').val($(this).data('id'));
+ });
+});
diff --git a/domokits/local/modules/Carousel/templates/backOffice/default/module_configuration.html b/domokits/local/modules/Carousel/templates/backOffice/default/module_configuration.html
new file mode 100644
index 0000000..df01b41
--- /dev/null
+++ b/domokits/local/modules/Carousel/templates/backOffice/default/module_configuration.html
@@ -0,0 +1,179 @@
+
+
+
+ {intl l='Edit your carousel.' d='carousel.bo.default'}
+
\r\n\r\n'
+ ),
+ (@max,
+ 'fr_FR',
+ 'Confirmation de paiement par chèque',
+ 'Paiement de la commande : {$order_ref}',
+ 'Cher client,\r\nCe message confirme le paiement par chèque de votre commande numero {$order_ref} sur notre boutique.\r\nVotre facture est maintenant disponible dans votre compte client à l''adresse {config key="url_site"}\r\nMerci encore pour votre achat !\r\nL''équipe {config key="store_name"}', '\r\n\r\n\r\n \r\n Confirmation du paiement de votre commande sur {config key="url_site"} \r\n \r\n\r\n\r\n
\r\n
\r\n
{config key="store_name"}
\r\n
Confirmation du paiement de votre commande
\r\n
N° {$order_ref}
\r\n
\r\n
\r\n Le suivi de votre commande est disponible dans la rubrique mon compte sur\r\n {config key="url_site"}\r\n
\r\n
Merci pour votre achat !
\r\n
L''équipe {config key="store_name"}
\r\n
\r\n\r\n'
+ );
diff --git a/domokits/local/modules/Cheque/Controller/ConfigureController.php b/domokits/local/modules/Cheque/Controller/ConfigureController.php
new file mode 100644
index 0000000..607ca10
--- /dev/null
+++ b/domokits/local/modules/Cheque/Controller/ConfigureController.php
@@ -0,0 +1,84 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Cheque\Controller;
+
+use Cheque\Cheque;
+use Symfony\Component\HttpFoundation\RedirectResponse;
+use Thelia\Controller\Admin\BaseAdminController;
+use Thelia\Core\Security\AccessManager;
+use Thelia\Core\Security\Resource\AdminResources;
+use Thelia\Form\Exception\FormValidationException;
+use Thelia\Tools\URL;
+
+/**
+ * Class SetTransferConfig.
+ *
+ * @author Thelia
+ */
+class ConfigureController extends BaseAdminController
+{
+ public function configure()
+ {
+ if (null !== $response = $this->checkAuth(AdminResources::MODULE, 'Cheque', AccessManager::UPDATE)) {
+ return $response;
+ }
+
+ // Initialize the potential exception
+ $ex = null;
+
+ // Create the Form from the request
+ $configurationForm = $this->createForm('cheque.instructions.configure');
+
+ try {
+ // Check the form against constraints violations
+ $form = $this->validateForm($configurationForm, 'POST');
+
+ // Get the form field values
+ $data = $form->getData();
+
+ Cheque::setConfigValue('instructions', $data['instructions'], $this->getCurrentEditionLocale());
+ Cheque::setConfigValue('payable_to', $data['payable_to']);
+
+ // Log configuration modification
+ $this->adminLogAppend(
+ 'cheque.configuration.message',
+ AccessManager::UPDATE,
+ 'Cheque instructions configuration updated'
+ );
+
+ // Everything is OK.
+ return new RedirectResponse(URL::getInstance()->absoluteUrl('/admin/module/Cheque'));
+ } catch (FormValidationException $ex) {
+ // Form cannot be validated. Create the error message using
+ // the BaseAdminController helper method.
+ $error_msg = $this->createStandardFormValidationErrorMessage($ex);
+ } catch (\Exception $ex) {
+ // Any other error
+ $error_msg = $ex->getMessage();
+ }
+
+ // At this point, the form has errors, and should be redisplayed. We don not redirect,
+ // just redisplay the same template.
+ // Setup the Form error context, to make error information available in the template.
+ $this->setupFormErrorContext(
+ $this->getTranslator()->trans('Cheque instructions configuration', [], Cheque::MESSAGE_DOMAIN),
+ $error_msg,
+ $configurationForm,
+ $ex
+ );
+
+ // Do not redirect at this point, or the error context will be lost.
+ // Just redisplay the current template.
+ return $this->render('module-configure', ['module_code' => 'Cheque']);
+ }
+}
diff --git a/domokits/local/modules/Cheque/Form/ConfigurationForm.php b/domokits/local/modules/Cheque/Form/ConfigurationForm.php
new file mode 100644
index 0000000..312d181
--- /dev/null
+++ b/domokits/local/modules/Cheque/Form/ConfigurationForm.php
@@ -0,0 +1,80 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Cheque\Form;
+
+use Cheque\Cheque;
+use Symfony\Component\Form\Extension\Core\Type\TextareaType;
+use Symfony\Component\Form\Extension\Core\Type\TextType;
+use Symfony\Component\Validator\Constraints\NotBlank;
+use Thelia\Core\Translation\Translator;
+use Thelia\Form\BaseForm;
+
+/**
+ * Class ConfigurationForm.
+ *
+ * @author Thelia
+ */
+class ConfigurationForm extends BaseForm
+{
+ protected function trans($str, $params = [])
+ {
+ return Translator::getInstance()->trans($str, $params, Cheque::MESSAGE_DOMAIN);
+ }
+
+ protected function buildForm(): void
+ {
+ $this->formBuilder
+ ->add(
+ 'payable_to',
+ TextType::class,
+ [
+ 'constraints' => [new NotBlank()],
+ 'label' => $this->trans('Cheque is payable to: '),
+ 'label_attr' => [
+ 'for' => 'payable_to',
+ 'help' => $this->trans('The name to which the cheque shoud be payable to.'),
+ ],
+ 'attr' => [
+ 'rows' => 10,
+ 'placeholder' => $this->trans('Pay cheque to'),
+ ],
+ ]
+ )
+ ->add(
+ 'instructions',
+ TextareaType::class,
+ [
+ 'constraints' => [],
+ 'required' => false,
+ 'label' => $this->trans('Cheque instructions'),
+ 'label_attr' => [
+ 'for' => 'namefield',
+ 'help' => $this->trans('Please enter here the payment by cheque instructions'),
+ ],
+ 'attr' => [
+ 'rows' => 10,
+ 'placeholder' => $this->trans('Payment instruction'),
+ ],
+ ]
+ )
+ ;
+ }
+
+ /**
+ * @return string the name of you form. This name must be unique
+ */
+ public static function getName()
+ {
+ return 'cheque_configuration_instructions';
+ }
+}
diff --git a/domokits/local/modules/Cheque/Hook/HookManager.php b/domokits/local/modules/Cheque/Hook/HookManager.php
new file mode 100644
index 0000000..8591131
--- /dev/null
+++ b/domokits/local/modules/Cheque/Hook/HookManager.php
@@ -0,0 +1,33 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Cheque\Hook;
+
+use Thelia\Core\Event\Hook\HookRenderEvent;
+use Thelia\Core\Hook\BaseHook;
+
+/**
+ * Class HookManager.
+ *
+ * @author Franck Allimant
+ */
+class HookManager extends BaseHook
+{
+ public function onAdditionalPaymentInfo(HookRenderEvent $event): void
+ {
+ $content = $this->render('order-placed.additional-payment-info.html', [
+ 'placed_order_id' => $event->getArgument('placed_order_id'),
+ ]);
+
+ $event->add($content);
+ }
+}
diff --git a/domokits/local/modules/Cheque/I18n/backOffice/default/de_DE.php b/domokits/local/modules/Cheque/I18n/backOffice/default/de_DE.php
new file mode 100644
index 0000000..ebed375
--- /dev/null
+++ b/domokits/local/modules/Cheque/I18n/backOffice/default/de_DE.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Cheque instructions configuration' => 'Scheck-Anleitungen-Konfiguration',
+];
diff --git a/domokits/local/modules/Cheque/I18n/backOffice/default/en_US.php b/domokits/local/modules/Cheque/I18n/backOffice/default/en_US.php
new file mode 100644
index 0000000..d6dc1de
--- /dev/null
+++ b/domokits/local/modules/Cheque/I18n/backOffice/default/en_US.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Cheque instructions configuration' => 'Cheque instructions configuration',
+];
diff --git a/domokits/local/modules/Cheque/I18n/backOffice/default/fr_FR.php b/domokits/local/modules/Cheque/I18n/backOffice/default/fr_FR.php
new file mode 100644
index 0000000..3dd9d8e
--- /dev/null
+++ b/domokits/local/modules/Cheque/I18n/backOffice/default/fr_FR.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Cheque instructions configuration' => 'Instructions de paiement par chèque',
+];
diff --git a/domokits/local/modules/Cheque/I18n/backOffice/default/ru_RU.php b/domokits/local/modules/Cheque/I18n/backOffice/default/ru_RU.php
new file mode 100644
index 0000000..a40b84d
--- /dev/null
+++ b/domokits/local/modules/Cheque/I18n/backOffice/default/ru_RU.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Cheque instructions configuration' => 'Конфигурация инструкций для чека',
+];
diff --git a/domokits/local/modules/Cheque/I18n/backOffice/default/tr_TR.php b/domokits/local/modules/Cheque/I18n/backOffice/default/tr_TR.php
new file mode 100644
index 0000000..d7dbdb2
--- /dev/null
+++ b/domokits/local/modules/Cheque/I18n/backOffice/default/tr_TR.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Cheque instructions configuration' => 'Çek yönergeleri yapılandırma',
+];
diff --git a/domokits/local/modules/Cheque/I18n/de_DE.php b/domokits/local/modules/Cheque/I18n/de_DE.php
new file mode 100644
index 0000000..2f37846
--- /dev/null
+++ b/domokits/local/modules/Cheque/I18n/de_DE.php
@@ -0,0 +1,21 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Cheque instructions' => 'Scheck-Anweisungen',
+ 'Cheque instructions configuration' => 'Scheck-Anleitungen-Konfiguration',
+ 'Cheque is payable to: ' => 'Scheck ist zahlbar an: ',
+ 'Pay cheque to' => 'Scheck bezahlen an',
+ 'Payment instruction' => 'Zahlungsanweisungen',
+ 'Please enter here the payment by cheque instructions' => 'Bitte geben Sie hier die Zahlung durch Scheck Anweisungen ein',
+ 'The name to which the cheque shoud be payable to.' => 'Der Name, an den der Scheck bezahlbar sein soll.',
+];
diff --git a/domokits/local/modules/Cheque/I18n/en_US.php b/domokits/local/modules/Cheque/I18n/en_US.php
new file mode 100644
index 0000000..2ef9451
--- /dev/null
+++ b/domokits/local/modules/Cheque/I18n/en_US.php
@@ -0,0 +1,21 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Cheque instructions' => 'Cheque instructions',
+ 'Cheque instructions configuration' => 'Cheque instructions configuration',
+ 'Cheque is payable to: ' => 'Cheque is payable to: ',
+ 'Pay cheque to' => 'Pay cheque to',
+ 'Payment instruction' => 'Payment instruction',
+ 'Please enter here the payment by cheque instructions' => 'Please enter here the payment by cheque instructions',
+ 'The name to which the cheque shoud be payable to.' => 'The name to which the cheque shoud be payable to.',
+];
diff --git a/domokits/local/modules/Cheque/I18n/fr_FR.php b/domokits/local/modules/Cheque/I18n/fr_FR.php
new file mode 100644
index 0000000..0c1ab59
--- /dev/null
+++ b/domokits/local/modules/Cheque/I18n/fr_FR.php
@@ -0,0 +1,21 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Cheque instructions' => 'Instructions de paiement',
+ 'Cheque instructions configuration' => 'Instructions de paiement par chèque',
+ 'Cheque is payable to: ' => 'Ordre du chèque',
+ 'Pay cheque to' => 'Ordre du chèque',
+ 'Payment instruction' => 'Instructions de paiement',
+ 'Please enter here the payment by cheque instructions' => 'Indiquez ici les instructions particulières de paiement par chèque',
+ 'The name to which the cheque shoud be payable to.' => 'Le nom à fare figurer sur le chèque',
+];
diff --git a/domokits/local/modules/Cheque/I18n/frontOffice/default/de_DE.php b/domokits/local/modules/Cheque/I18n/frontOffice/default/de_DE.php
new file mode 100644
index 0000000..46100d2
--- /dev/null
+++ b/domokits/local/modules/Cheque/I18n/frontOffice/default/de_DE.php
@@ -0,0 +1,16 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Be sure to sign your cheque !' => 'Vergessen Sie nicht, Ihren Scheck zu unterschreiben !',
+ 'Please make your cheque payable to %name, and send it to the following address :' => 'Bitte stellen Sie den Scheck auf %name, und senden Sie es an die folgende Adresse : ',
+];
diff --git a/domokits/local/modules/Cheque/I18n/frontOffice/default/en_US.php b/domokits/local/modules/Cheque/I18n/frontOffice/default/en_US.php
new file mode 100644
index 0000000..8499d61
--- /dev/null
+++ b/domokits/local/modules/Cheque/I18n/frontOffice/default/en_US.php
@@ -0,0 +1,16 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Be sure to sign your cheque !' => 'Be sure to sign your cheque !',
+ 'Please make your cheque payable to %name, and send it to the following address :' => 'Please make your cheque payable to %name, and send it to the following address :',
+];
diff --git a/domokits/local/modules/Cheque/I18n/frontOffice/default/fr_FR.php b/domokits/local/modules/Cheque/I18n/frontOffice/default/fr_FR.php
new file mode 100644
index 0000000..5f2d4b2
--- /dev/null
+++ b/domokits/local/modules/Cheque/I18n/frontOffice/default/fr_FR.php
@@ -0,0 +1,16 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Be sure to sign your cheque !' => 'N\'oubliez pas de signer votre chèque !',
+ 'Please make your cheque payable to %name, and send it to the following address :' => 'Merci de libeller votre chèque à l\'ordre de %name, et de l\'expédier à l\'adresse suivante :',
+];
diff --git a/domokits/local/modules/Cheque/I18n/frontOffice/default/ru_RU.php b/domokits/local/modules/Cheque/I18n/frontOffice/default/ru_RU.php
new file mode 100644
index 0000000..25c109d
--- /dev/null
+++ b/domokits/local/modules/Cheque/I18n/frontOffice/default/ru_RU.php
@@ -0,0 +1,16 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Be sure to sign your cheque !' => 'Убедитесь в том, что подписали чек !',
+ 'Please make your cheque payable to %name, and send it to the following address :' => 'Пожалуйста убедитесь что ваш чек предназначен %name, и вышлите его по следующему адресу :',
+];
diff --git a/domokits/local/modules/Cheque/I18n/frontOffice/default/tr_TR.php b/domokits/local/modules/Cheque/I18n/frontOffice/default/tr_TR.php
new file mode 100644
index 0000000..01546fc
--- /dev/null
+++ b/domokits/local/modules/Cheque/I18n/frontOffice/default/tr_TR.php
@@ -0,0 +1,16 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Be sure to sign your cheque !' => 'Çekini imzalamak emin olun!',
+ 'Please make your cheque payable to %name, and send it to the following address :' => 'Lütfen, Çek %name için ödenecek olun ve aşağıdaki adrese gönderin:',
+];
diff --git a/domokits/local/modules/Cheque/I18n/ru_RU.php b/domokits/local/modules/Cheque/I18n/ru_RU.php
new file mode 100644
index 0000000..8c0e366
--- /dev/null
+++ b/domokits/local/modules/Cheque/I18n/ru_RU.php
@@ -0,0 +1,21 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Cheque instructions' => 'Инструкция для чека',
+ 'Cheque instructions configuration' => 'Конфигурация инструкций для чека',
+ 'Cheque is payable to: ' => 'Чек предназначен:',
+ 'Pay cheque to' => 'Оплата чеком для',
+ 'Payment instruction' => 'Инструкции для оплаты',
+ 'Please enter here the payment by cheque instructions' => 'Введите здесь инструкции для оплаты чеком',
+ 'The name to which the cheque shoud be payable to.' => 'Имя получателя чека.',
+];
diff --git a/domokits/local/modules/Cheque/I18n/tr_TR.php b/domokits/local/modules/Cheque/I18n/tr_TR.php
new file mode 100644
index 0000000..20a0076
--- /dev/null
+++ b/domokits/local/modules/Cheque/I18n/tr_TR.php
@@ -0,0 +1,21 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Cheque instructions' => 'Çek yönergeleri',
+ 'Cheque instructions configuration' => 'Çek yönergeleri yapılandırma',
+ 'Cheque is payable to: ' => 'Çek için ödenir: ',
+ 'Pay cheque to' => 'Çek için ödeme',
+ 'Payment instruction' => 'Ödeme talimatı',
+ 'Please enter here the payment by cheque instructions' => 'Lütfen burada ödeme çek yönergeleri tarafından girin',
+ 'The name to which the cheque shoud be payable to.' => 'Adı için çek shoud için ödenecek.',
+];
diff --git a/domokits/local/modules/Cheque/LICENSE.txt b/domokits/local/modules/Cheque/LICENSE.txt
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/domokits/local/modules/Cheque/LICENSE.txt
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/domokits/local/modules/Cheque/Listener/SendPaymentConfirmationEmail.php b/domokits/local/modules/Cheque/Listener/SendPaymentConfirmationEmail.php
new file mode 100644
index 0000000..b0dcc8c
--- /dev/null
+++ b/domokits/local/modules/Cheque/Listener/SendPaymentConfirmationEmail.php
@@ -0,0 +1,68 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Cheque\Listener;
+
+use Cheque\Cheque;
+use Symfony\Component\EventDispatcher\EventSubscriberInterface;
+use Thelia\Action\BaseAction;
+use Thelia\Core\Event\Order\OrderEvent;
+use Thelia\Core\Event\TheliaEvents;
+use Thelia\Mailer\MailerFactory;
+
+/**
+ * Class SendEMail.
+ *
+ * @author Thelia
+ */
+class SendPaymentConfirmationEmail extends BaseAction implements EventSubscriberInterface
+{
+ /**
+ * @var MailerFactory
+ */
+ protected $mailer;
+
+ public function __construct(MailerFactory $mailer)
+ {
+ $this->mailer = $mailer;
+ }
+
+ /**
+ * @param orderEvent $event
+ *
+ * Check if we're the payment module, and send the payment confirmation email to the customer if it's the case
+ */
+ public function sendConfirmationEmail(OrderEvent $event): void
+ {
+ if ($event->getOrder()->getPaymentModuleId() === Cheque::getModuleId()) {
+ if ($event->getOrder()->isPaid()) {
+ $order = $event->getOrder();
+
+ $this->mailer->sendEmailToCustomer(
+ 'order_confirmation_cheque',
+ $order->getCustomer(),
+ [
+ 'order_id' => $order->getId(),
+ 'order_ref' => $order->getRef(),
+ ]
+ );
+ }
+ }
+ }
+
+ public static function getSubscribedEvents()
+ {
+ return [
+ TheliaEvents::ORDER_UPDATE_STATUS => ['sendConfirmationEmail', 128],
+ ];
+ }
+}
diff --git a/domokits/local/modules/Cheque/composer.json b/domokits/local/modules/Cheque/composer.json
new file mode 100644
index 0000000..8dca232
--- /dev/null
+++ b/domokits/local/modules/Cheque/composer.json
@@ -0,0 +1,11 @@
+{
+ "name": "thelia/cheque-module",
+ "license": "LGPL-3.0+",
+ "type": "thelia-module",
+ "require": {
+ "thelia/installer": "~1.1"
+ },
+ "extra": {
+ "installer-name": "Cheque"
+ }
+}
diff --git a/domokits/local/modules/Cheque/images/cheque.png b/domokits/local/modules/Cheque/images/cheque.png
new file mode 100644
index 0000000..0aad099
Binary files /dev/null and b/domokits/local/modules/Cheque/images/cheque.png differ
diff --git a/domokits/local/modules/Cheque/templates/backOffice/default/module_configuration.html b/domokits/local/modules/Cheque/templates/backOffice/default/module_configuration.html
new file mode 100644
index 0000000..5cdeb14
--- /dev/null
+++ b/domokits/local/modules/Cheque/templates/backOffice/default/module_configuration.html
@@ -0,0 +1,55 @@
+{if isset($smarty.get.errmes) && !empty($smarty.get.errmes)}
+
+
+
+
diff --git a/domokits/local/modules/ChoiceFilter/Config/thelia.sql b/domokits/local/modules/ChoiceFilter/Config/thelia.sql
new file mode 100644
index 0000000..381e0e7
--- /dev/null
+++ b/domokits/local/modules/ChoiceFilter/Config/thelia.sql
@@ -0,0 +1,91 @@
+
+# This is a fix for InnoDB in MySQL >= 4.1.x
+# It "suspends judgement" for fkey relationships until are tables are set.
+SET FOREIGN_KEY_CHECKS = 0;
+
+-- ---------------------------------------------------------------------
+-- choice_filter_other
+-- ---------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `choice_filter_other`;
+
+CREATE TABLE `choice_filter_other`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `type` VARCHAR(55),
+ `visible` TINYINT(1),
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB;
+
+-- ---------------------------------------------------------------------
+-- choice_filter
+-- ---------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `choice_filter`;
+
+CREATE TABLE `choice_filter`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `feature_id` INTEGER,
+ `attribute_id` INTEGER,
+ `other_id` INTEGER,
+ `category_id` INTEGER,
+ `template_id` INTEGER,
+ `position` INTEGER DEFAULT 0 NOT NULL,
+ `visible` TINYINT(1),
+ `created_at` DATETIME,
+ `updated_at` DATETIME,
+ PRIMARY KEY (`id`),
+ INDEX `choice_filter_FI_1` (`attribute_id`),
+ INDEX `choice_filter_FI_2` (`feature_id`),
+ INDEX `choice_filter_FI_3` (`other_id`),
+ INDEX `choice_filter_FI_4` (`category_id`),
+ INDEX `choice_filter_FI_5` (`template_id`),
+ CONSTRAINT `choice_filter_FK_1`
+ FOREIGN KEY (`attribute_id`)
+ REFERENCES `attribute` (`id`)
+ ON UPDATE RESTRICT
+ ON DELETE CASCADE,
+ CONSTRAINT `choice_filter_FK_2`
+ FOREIGN KEY (`feature_id`)
+ REFERENCES `feature` (`id`)
+ ON UPDATE RESTRICT
+ ON DELETE CASCADE,
+ CONSTRAINT `choice_filter_FK_3`
+ FOREIGN KEY (`other_id`)
+ REFERENCES `choice_filter_other` (`id`)
+ ON UPDATE RESTRICT
+ ON DELETE CASCADE,
+ CONSTRAINT `choice_filter_FK_4`
+ FOREIGN KEY (`category_id`)
+ REFERENCES `category` (`id`)
+ ON UPDATE RESTRICT
+ ON DELETE CASCADE,
+ CONSTRAINT `choice_filter_FK_5`
+ FOREIGN KEY (`template_id`)
+ REFERENCES `template` (`id`)
+ ON UPDATE RESTRICT
+ ON DELETE CASCADE
+) ENGINE=InnoDB;
+
+-- ---------------------------------------------------------------------
+-- choice_filter_other_i18n
+-- ---------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `choice_filter_other_i18n`;
+
+CREATE TABLE `choice_filter_other_i18n`
+(
+ `id` INTEGER NOT NULL,
+ `locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL,
+ `title` VARCHAR(255),
+ `description` LONGTEXT,
+ PRIMARY KEY (`id`,`locale`),
+ CONSTRAINT `choice_filter_other_i18n_FK_1`
+ FOREIGN KEY (`id`)
+ REFERENCES `choice_filter_other` (`id`)
+ ON DELETE CASCADE
+) ENGINE=InnoDB;
+
+# This restores the fkey checks, after having unset them earlier
+SET FOREIGN_KEY_CHECKS = 1;
diff --git a/domokits/local/modules/ChoiceFilter/Controller/ChoiceFilterController.php b/domokits/local/modules/ChoiceFilter/Controller/ChoiceFilterController.php
new file mode 100644
index 0000000..870f71b
--- /dev/null
+++ b/domokits/local/modules/ChoiceFilter/Controller/ChoiceFilterController.php
@@ -0,0 +1,130 @@
+
+ */
+class ChoiceFilterController extends BaseAdminController
+{
+ public function saveAction(Request $request)
+ {
+ $data = $request->get('ChoiceFilter');
+
+ if (!empty($data['template_id'])) {
+ ChoiceFilterQuery::create()
+ ->filterByTemplateId((int) $data['template_id'])
+ ->delete();
+
+ $choiceFilterBase = (new ChoiceFilter())
+ ->setTemplateId((int) $data['template_id']);
+
+ $template = 'choice-filter/template-edit';
+ $parameters = [
+ 'template_id' => (int) $data['template_id']
+ ];
+ $redirectUrl = '/admin/configuration/templates/update';
+
+ } elseif (!empty($data['category_id'])) {
+ ChoiceFilterQuery::create()
+ ->filterByCategoryId((int) $data['category_id'])
+ ->delete();
+
+ $choiceFilterBase = (new ChoiceFilter())
+ ->setCategoryId((int) $data['category_id']);
+
+ $template = 'choice-filter/category-edit';
+ $parameters = [
+ 'category_id' => (int) $data['category_id']
+ ];
+ $redirectUrl = '/admin/categories/update';
+
+ } else {
+ throw new \Exception("Missing parameter");
+ }
+
+ foreach ($data['filter'] as $filter) {
+ $choiceFilter = clone $choiceFilterBase;
+
+ $choiceFilter
+ ->setVisible((int) $filter['visible'])
+ ->setPosition((int) $filter['position']);
+
+ if ($filter['type'] === 'attribute') {
+ $choiceFilter
+ ->setAttributeId($filter['id']);
+ } elseif ($filter['type'] === 'feature') {
+ $choiceFilter
+ ->setFeatureId((int) $filter['id']);
+ } else {
+ $choiceFilter
+ ->setOtherId((int) $filter['id']);
+ }
+
+ $choiceFilter->save();
+ }
+
+ $this->getSession()->getFlashBag()->add('choice-filter-success', 'configuration sauvegardée avec succès');
+
+ if ($request->isXmlHttpRequest()) {
+ return $this->render(
+ $template,
+ $parameters
+ );
+ } else {
+ return $this->generateRedirect(
+ URL::getInstance()->absoluteUrl($redirectUrl, $parameters)
+ );
+ }
+ }
+
+ public function clearAction(Request $request)
+ {
+ $data = $request->get('ChoiceFilter');
+
+ if (!empty($data['template_id'])) {
+ ChoiceFilterQuery::create()
+ ->filterByTemplateId((int) $data['template_id'])
+ ->delete();
+
+ $template = 'choice-filter/template-edit';
+ $parameters = [
+ 'template_id' => (int) $data['template_id']
+ ];
+ $redirectUrl = '/admin/configuration/templates/update';
+
+ } elseif (!empty($data['category_id'])) {
+ ChoiceFilterQuery::create()
+ ->filterByCategoryId((int) $data['category_id'])
+ ->delete();
+
+ $template = 'choice-filter/category-edit';
+ $parameters = [
+ 'category_id' => (int) $data['category_id']
+ ];
+ $redirectUrl = '/admin/categories/update';
+
+ } else {
+ throw new \Exception("Missing parameter");
+ }
+
+ $this->getSession()->getFlashBag()->add('choice-filter-success', 'configuration sauvegardée avec succès');
+
+ if ($request->isXmlHttpRequest()) {
+ return $this->render(
+ $template,
+ $parameters
+ );
+ } else {
+ return $this->generateRedirect(
+ URL::getInstance()->absoluteUrl($redirectUrl, $parameters)
+ );
+ }
+ }
+}
diff --git a/domokits/local/modules/ChoiceFilter/Controller/Front/ChoiceFilterFrontController.php b/domokits/local/modules/ChoiceFilter/Controller/Front/ChoiceFilterFrontController.php
new file mode 100644
index 0000000..973beeb
--- /dev/null
+++ b/domokits/local/modules/ChoiceFilter/Controller/Front/ChoiceFilterFrontController.php
@@ -0,0 +1,202 @@
+get('locale', $request->getSession()->getLang()->getLocale());
+
+ $categoryId = $request->get('category_id');
+ $visible = $request->get('visible', true);
+
+ $features = new ObjectCollection();
+ $attributes = new ObjectCollection();
+ $others = new ObjectCollection();
+
+ $category = CategoryQuery::create()->findPk($categoryId);
+
+ $categoryChoiceFilters = ChoiceFilterQuery::findChoiceFilterByCategory($category, $templateIdFind);
+
+ if (null !== $templateIdFind) {
+ $features = ChoiceFilterQuery::findFeaturesByTemplateId(
+ $templateIdFind,
+ [$locale]
+ );
+ $attributes = ChoiceFilterQuery::findAttributesByTemplateId(
+ $templateIdFind,
+ [$locale]
+ );
+ $others = ChoiceFilterOtherQuery::findOther([$locale]);
+ }
+
+ $filters = Util::merge($categoryChoiceFilters, $features, $attributes, $others);
+
+ if (Type\BooleanOrBothType::ANY !== $visible) {
+ $visible = $visible ? 1 : 0;
+ $filters = array_filter($filters, function ($filter) use ($visible) {return $filter['Visible'] == $visible;});
+ }
+
+ $results = [];
+
+ $attributeResults = array_map(
+ fn ($filter) => $modelFactory->buildModel('ChoiceFilter', $filter, $locale),
+ array_filter($filters, function ($filter) {return $filter['Type'] === "attribute";})
+ );
+
+ if (!empty($attributeResults)) {
+ $results['attributes'] = $attributeResults;
+ }
+
+ $featureResults = array_map(
+ fn ($filter) => $modelFactory->buildModel('ChoiceFilter', $filter, $locale),
+ array_filter($filters, function ($filter) {return $filter['Type'] === "feature";})
+ );
+
+ if (!empty($attributeResults)) {
+ $results['features'] = $featureResults;
+ }
+
+ $categoryIds = [$categoryId];
+ $needCategories = !empty(array_filter($filters, function ($filter) {return $filter['Type'] === "category";}));
+ if ($needCategories) {
+ $con = Propel::getConnection();
+ $stmt = $con->prepare("
+ SELECT category.*, ci18n.title as title FROM category
+ LEFT JOIN category c_parent ON category.parent = c_parent.id
+ LEFT JOIN category c_parent_2 ON c_parent.parent = c_parent_2.id
+ LEFT JOIN category c_parent_3 ON c_parent_2.parent = c_parent_3.id
+ LEFT JOIN category c_parent_4 ON c_parent_3.parent = c_parent_4.id
+ LEFT JOIN category_i18n ci18n on category.id = ci18n.id AND ci18n.locale = :locale
+ WHERE category.id = :categoryId OR c_parent.id = :categoryId OR c_parent_2.id = :categoryId OR c_parent_3.id = :categoryId OR c_parent_4.id = :categoryId
+ ");
+ $stmt->bindValue(':locale', $locale, \PDO::PARAM_STR);
+ $stmt->bindValue(':categoryId', $categoryId, \PDO::PARAM_INT);
+ $stmt->execute();
+
+ $categoryResults = array_map(
+ fn ($category) => $modelFactory->buildModel('CategoryChoiceFilter', $category, $locale),
+ $stmt->fetchAll(\PDO::FETCH_ASSOC)
+ );
+
+ if (!empty($categoryResults)) {
+ $results['categories'] = $categoryResults;
+ }
+
+ $categoryIds = array_map(
+ fn (CategoryChoiceFilter $categoryChoiceFilter) => $categoryChoiceFilter->getId(),
+ $categoryResults
+ );
+ }
+
+ $needBrands = !empty(array_filter($filters, function ($filter) {return $filter['Type'] === "brand";}));
+ if ($needBrands) {
+ $con = Propel::getConnection();
+ $stmt = $con->prepare("
+ SELECT DISTINCT brand.id as id, brand.*, bi18n.* FROM brand
+ INNER JOIN product p on brand.id = p.brand_id
+ LEFT JOIN brand_i18n bi18n on brand.id = bi18n.id AND bi18n.locale = :locale
+ INNER JOIN product_category ON p.id = product_category.product_id AND product_category.category_id IN (:categoryIds)
+ ");
+ $stmt->bindValue(':locale', $locale, \PDO::PARAM_STR);
+ $stmt->bindValue(':categoryIds', implode(",", $categoryIds), \PDO::PARAM_STR);
+ $stmt->execute();
+
+ $brandResults = array_map(
+ fn ($brand) => $modelFactory->buildModel('BrandChoiceFilter', $brand, $locale),
+ $stmt->fetchAll(\PDO::FETCH_ASSOC)
+ );
+
+ if (!empty($brandResults)) {
+ $results['brands'] = $brandResults;
+ }
+ }
+
+ return OpenApiService::jsonResponse($results);
+ }
+}
diff --git a/domokits/local/modules/ChoiceFilter/Hook/ChoiceFilterHook.php b/domokits/local/modules/ChoiceFilter/Hook/ChoiceFilterHook.php
new file mode 100644
index 0000000..0b98d34
--- /dev/null
+++ b/domokits/local/modules/ChoiceFilter/Hook/ChoiceFilterHook.php
@@ -0,0 +1,142 @@
+
+ */
+class ChoiceFilterHook extends BaseHook
+{
+ protected $requestStack;
+
+ public function __construct(RequestStack $requestStack)
+ {
+ $this->requestStack = $requestStack;
+ }
+
+ /**
+ * @param HookRenderEvent $event
+ */
+ public function onTemplateEditBottom(HookRenderEvent $event)
+ {
+ $templateId = $event->getArgument('template_id');
+
+ $locales = $this->getEditLocales();
+
+ $features = ChoiceFilterQuery::findFeaturesByTemplateId($templateId, $locales);
+ $attributes = ChoiceFilterQuery::findAttributesByTemplateId($templateId, $locales);
+ $others = ChoiceFilterOtherQuery::findOther($locales);
+
+ /** @var ChoiceFilter[] $choiceFilters */
+ $choiceFilters = ChoiceFilterQuery::create()
+ ->filterByTemplateId($templateId)
+ ->orderByPosition()
+ ->find();
+
+ if (count($choiceFilters)) {
+ $enabled = true;
+ } else {
+ $enabled = false;
+ }
+
+ $filters = Util::merge($choiceFilters, $features, $attributes, $others);
+
+ $event->add($this->render(
+ 'choice-filter/hook/template-edit.bottom.html',
+ $event->getArguments() + ['filters' => $filters, 'enabled' => $enabled]
+ ));
+ }
+
+ public function onCategoryTabContent(HookRenderEvent $event)
+ {
+ if ($event->getArgument('view') !== 'category') {
+ return;
+ }
+
+ $locales = $this->getEditLocales();
+
+ $category = CategoryQuery::create()->filterById($event->getArgument('id'))->findOne();
+
+ $templateId = null;
+ $categoryId = null;
+ $choiceFilters = ChoiceFilterQuery::findChoiceFilterByCategory($category, $templateId, $categoryId);
+
+ $messageInfo = [];
+ $enabled = false;
+
+ if ($templateId === null) {
+ $features = new ObjectCollection();
+ $attributes = new ObjectCollection();
+ $others = new ObjectCollection();
+ $choiceFilters = new ObjectCollection();
+
+ $messageInfo[] = "Cette catégorie utilise aucune configuration des filtres";
+ } else {
+ $features = ChoiceFilterQuery::findFeaturesByTemplateId(
+ $templateId,
+ $locales
+ );
+ $attributes = ChoiceFilterQuery::findAttributesByTemplateId(
+ $templateId,
+ $locales
+ );
+ $others = ChoiceFilterOtherQuery::findOther();
+
+ if (null === $categoryId) {
+ $messageInfo[] = "Cette catégorie utilise la configuration du gabarit " . $templateId;
+ } elseif ($categoryId == $category->getId()) {
+ $enabled = true;
+ $messageInfo[] = "Cette catégorie utilise sa propre configuration des filtres";
+ } else {
+ $messageInfo[] = "Cette catégorie utilise la configuration des filtres de la catégorie " . $categoryId;
+ }
+ }
+
+ $filters = Util::merge($choiceFilters, $features, $attributes, $others);
+
+ $event->add($this->render(
+ 'choice-filter/hook/category.tab-content.html',
+ $event->getArguments() + ['category_id' => $event->getArgument('id'), 'filters' => $filters, 'enabled' => $enabled, 'messageInfo' => $messageInfo]
+ ));
+ }
+
+ public function onCategoryEditJs(HookRenderEvent $event)
+ {
+ $event->add($this->render(
+ 'choice-filter/hook/category.edit-js.html',
+ $event->getArguments()
+ ));
+ }
+
+ public function onTemplateEditJs(HookRenderEvent $event)
+ {
+ $event->add($this->render(
+ 'choice-filter/hook/template.edit-js.html',
+ $event->getArguments()
+ ));
+ }
+
+ /**
+ * @return string[] list of locale
+ */
+ protected function getEditLocales()
+ {
+ /** @var Session $session */
+ $session = $this->requestStack->getCurrentRequest()->getSession();
+
+ $locale = $session->getAdminEditionLang()->getLocale();
+
+ return [$locale];
+ }
+}
diff --git a/domokits/local/modules/ChoiceFilter/I18n/backOffice/default/fr_FR.php b/domokits/local/modules/ChoiceFilter/I18n/backOffice/default/fr_FR.php
new file mode 100644
index 0000000..c3c7b21
--- /dev/null
+++ b/domokits/local/modules/ChoiceFilter/I18n/backOffice/default/fr_FR.php
@@ -0,0 +1,17 @@
+ 'Personnaliser la configuration des filtres pour cette catégorie',
+ 'ID' => 'ID',
+ 'No' => 'Non',
+ 'Position' => 'Position',
+ 'Position of the filters in front for this category' => 'Position des filtres en front pour cette category',
+ 'Position of the filters in front for this template' => 'Position des filtres en front pour ce gabarit',
+ 'Reset default values' => 'Réinitialiser les valeurs par défaut',
+ 'Save' => 'Sauvegarder',
+ 'The position of the filters is for now the default one.' => 'La position des filtres est pour le moment celle par défaut.',
+ 'Title' => 'Titre',
+ 'Type' => 'Type',
+ 'Visible' => 'Visible',
+ 'Yes' => 'Oui',
+);
diff --git a/domokits/local/modules/ChoiceFilter/I18n/en_US.php b/domokits/local/modules/ChoiceFilter/I18n/en_US.php
new file mode 100644
index 0000000..0b4fa14
--- /dev/null
+++ b/domokits/local/modules/ChoiceFilter/I18n/en_US.php
@@ -0,0 +1,4 @@
+ 'The displayed english string',
+);
diff --git a/domokits/local/modules/ChoiceFilter/I18n/fr_FR.php b/domokits/local/modules/ChoiceFilter/I18n/fr_FR.php
new file mode 100644
index 0000000..3708624
--- /dev/null
+++ b/domokits/local/modules/ChoiceFilter/I18n/fr_FR.php
@@ -0,0 +1,4 @@
+ 'La traduction française de la chaine',
+);
diff --git a/domokits/local/modules/ChoiceFilter/LICENCE b/domokits/local/modules/ChoiceFilter/LICENCE
new file mode 100644
index 0000000..3312f1f
--- /dev/null
+++ b/domokits/local/modules/ChoiceFilter/LICENCE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
\ No newline at end of file
diff --git a/domokits/local/modules/ChoiceFilter/Loop/ChoiceFilterLoop.php b/domokits/local/modules/ChoiceFilter/Loop/ChoiceFilterLoop.php
new file mode 100644
index 0000000..1e65416
--- /dev/null
+++ b/domokits/local/modules/ChoiceFilter/Loop/ChoiceFilterLoop.php
@@ -0,0 +1,152 @@
+
+ */
+class ChoiceFilterLoop extends BaseLoop implements ArraySearchLoopInterface
+{
+ protected function getArgDefinitions()
+ {
+ return new ArgumentCollection(
+ Argument::createIntTypeArgument('template_id'),
+ Argument::createIntTypeArgument('category_id'),
+ Argument::createBooleanOrBothTypeArgument('visible', true),
+ new Argument(
+ 'order',
+ new Type\TypeCollection(
+ new Type\EnumListType(
+ [
+ 'position',
+ 'position_reverse'
+ ]
+ )
+ ),
+ 'position'
+ )
+ );
+ }
+
+ public function buildArray()
+ {
+ $templateId = $this->getTemplateId();
+ $categoryId = $this->getCategoryId();
+
+ if (null === $templateId && null === $categoryId) {
+ throw new LoopException('The argument template_id or category_id is required');
+ }
+
+ if (null !== $templateId && null !== $categoryId) {
+ throw new LoopException('The argument template_id or category_id can not be set together');
+ }
+
+ if (null !== $categoryId) {
+ $category = CategoryQuery::create()->findPk($categoryId);
+
+ $templateIdFind = null;
+ $categoryIdFind = null;
+ $choiceFilters = ChoiceFilterQuery::findChoiceFilterByCategory($category, $templateIdFind, $categoryId);
+
+ if ($templateIdFind === null) {
+ $features = new ObjectCollection();
+ $attributes = new ObjectCollection();
+ $others = new ObjectCollection();
+ $choiceFilters = new ObjectCollection();
+ } else {
+ $features = ChoiceFilterQuery::findFeaturesByTemplateId(
+ $templateIdFind
+ );
+ $attributes = ChoiceFilterQuery::findAttributesByTemplateId(
+ $templateIdFind
+ );
+ $others = ChoiceFilterOtherQuery::findOther();
+ }
+
+ $filters = Util::merge($choiceFilters, $features, $attributes, $others);
+ } elseif (null !== $templateId) {
+ $features = ChoiceFilterQuery::findFeaturesByTemplateId($templateId);
+ $attributes = ChoiceFilterQuery::findAttributesByTemplateId($templateId);
+ $others = ChoiceFilterOtherQuery::findOther();
+
+ /** @var ChoiceFilter[] $choiceFilters */
+ $choiceFilters = ChoiceFilterQuery::create()
+ ->filterByTemplateId($templateId)
+ ->orderByPosition()
+ ->find();
+
+ $filters = Util::merge($choiceFilters, $features, $attributes, $others);
+ }
+
+ if (null !== $orders = $this->getOrder()) {
+ foreach ($orders as $order) {
+ switch ($order) {
+ case "position_reverse":
+ return array_reverse($filters);
+ break;
+ }
+ }
+ }
+
+ if ($this->getVisible() !== Type\BooleanOrBothType::ANY) {
+ $visible = $this->getVisible() ? 1 : 0;
+ foreach ($filters as $key => $filter) {
+ if ($filter['Visible'] != $visible) {
+ unset($filters[$key]);
+ }
+ }
+ }
+
+ return $filters;
+ }
+
+ /**
+ * @param LoopResult $loopResult
+ *
+ * @return LoopResult
+ */
+ public function parseResults(LoopResult $loopResult)
+ {
+ /** @var ChoiceFilter $choiceFilter */
+ foreach ($loopResult->getResultDataCollection() as $choiceFilter) {
+ $loopResultRow = new LoopResultRow($choiceFilter);
+
+ $loopResultRow
+ ->set('TYPE', $choiceFilter['Type'])
+ ->set('ID', $choiceFilter['Id'])
+ ->set('VISIBLE', $choiceFilter['Visible'])
+ ->set('POSITION', $choiceFilter['Position']);
+
+ $this->addOutputFields($loopResultRow, $choiceFilter);
+
+ $loopResult->addRow($loopResultRow);
+ }
+
+ return $loopResult;
+ }
+}
diff --git a/domokits/local/modules/ChoiceFilter/Model/Api/BrandChoiceFilter.php b/domokits/local/modules/ChoiceFilter/Model/Api/BrandChoiceFilter.php
new file mode 100644
index 0000000..d8d04e5
--- /dev/null
+++ b/domokits/local/modules/ChoiceFilter/Model/Api/BrandChoiceFilter.php
@@ -0,0 +1,122 @@
+id;
+ }
+
+ public function setId(int $id): BrandChoiceFilter
+ {
+ $this->id = $id;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getTitle(): ?string
+ {
+ return $this->title;
+ }
+
+ /**
+ * @param string $title
+ */
+ public function setTitle(?string $title): BrandChoiceFilter
+ {
+ $this->title = $title;
+
+ return $this;
+ }
+
+ public function isVisible(): bool
+ {
+ return $this->visible;
+ }
+
+ /**
+ * @param bool $visible
+ */
+ public function setVisible(?bool $visible = true): BrandChoiceFilter
+ {
+ $this->visible = $visible;
+
+ return $this;
+ }
+
+ /**
+ * @return int
+ */
+ public function getPosition(): ?int
+ {
+ return $this->position;
+ }
+
+ /**
+ * @param int $position
+ */
+ public function setPosition(?int $position): BrandChoiceFilter
+ {
+ $this->position = $position;
+
+ return $this;
+ }
+}
diff --git a/domokits/local/modules/ChoiceFilter/Model/Api/CategoryChoiceFilter.php b/domokits/local/modules/ChoiceFilter/Model/Api/CategoryChoiceFilter.php
new file mode 100644
index 0000000..821c5a8
--- /dev/null
+++ b/domokits/local/modules/ChoiceFilter/Model/Api/CategoryChoiceFilter.php
@@ -0,0 +1,149 @@
+id;
+ }
+
+ public function setId(int $id): CategoryChoiceFilter
+ {
+ $this->id = $id;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getTitle(): ?string
+ {
+ return $this->title;
+ }
+
+ /**
+ * @param string $title
+ */
+ public function setTitle(?string $title): CategoryChoiceFilter
+ {
+ $this->title = $title;
+
+ return $this;
+ }
+
+ public function isVisible(): bool
+ {
+ return $this->visible;
+ }
+
+ /**
+ * @param bool $visible
+ */
+ public function setVisible(?bool $visible = true): CategoryChoiceFilter
+ {
+ $this->visible = $visible;
+
+ return $this;
+ }
+
+ /**
+ * @return int
+ */
+ public function getPosition(): ?int
+ {
+ return $this->position;
+ }
+
+ /**
+ * @param int $position
+ */
+ public function setPosition(?int $position): CategoryChoiceFilter
+ {
+ $this->position = $position;
+
+ return $this;
+ }
+
+ /**
+ * @return int
+ */
+ public function getParent(): ?int
+ {
+ return $this->parent;
+ }
+
+ /**
+ * @param int|null $parent
+ * @return CategoryChoiceFilter
+ */
+ public function setParent(?int $parent): CategoryChoiceFilter
+ {
+ $this->parent = $parent;
+
+ return $this;
+ }
+}
diff --git a/domokits/local/modules/ChoiceFilter/Model/Api/ChoiceFilter.php b/domokits/local/modules/ChoiceFilter/Model/Api/ChoiceFilter.php
new file mode 100644
index 0000000..81e89f7
--- /dev/null
+++ b/domokits/local/modules/ChoiceFilter/Model/Api/ChoiceFilter.php
@@ -0,0 +1,226 @@
+id;
+ }
+
+ public function setId(int $id): ChoiceFilter
+ {
+ $this->id = $id;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getTitle(): ?string
+ {
+ return $this->title;
+ }
+
+ /**
+ * @param string $title
+ */
+ public function setTitle(?string $title): ChoiceFilter
+ {
+ $this->title = $title;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getType(): ?string
+ {
+ return $this->type;
+ }
+
+ /**
+ * @param string $title
+ */
+ public function setType(?string $type): ChoiceFilter
+ {
+ $this->type = $type;
+
+ return $this;
+ }
+
+ public function isVisible(): bool
+ {
+ return $this->visible;
+ }
+
+ /**
+ * @param bool $visible
+ */
+ public function setVisible(?bool $visible = true): ChoiceFilter
+ {
+ $this->visible = $visible;
+
+ return $this;
+ }
+
+ /**
+ * @return int
+ */
+ public function getPosition(): ?int
+ {
+ return $this->position;
+ }
+
+ /**
+ * @param int $position
+ */
+ public function setPosition(?int $position): ChoiceFilter
+ {
+ $this->position = $position;
+
+ return $this;
+ }
+
+ public function getValues(): array
+ {
+ return $this->values;
+ }
+
+ /**
+ * @param int $values
+ */
+ public function setValues(?array $values): ChoiceFilter
+ {
+ $this->values = $values;
+
+ return $this;
+ }
+
+ protected function getTheliaModel($propelModelName = null)
+ {
+ return parent::getTheliaModel(\ChoiceFilter\Model\ChoiceFilter::class);
+ }
+
+ public function createOrUpdateFromData($data, $locale = null): void
+ {
+ parent::createOrUpdateFromData($data, $locale);
+
+ $values = [];
+
+ $modelFactory = $this->modelFactory;
+ if ($this->type === "feature") {
+ $values = array_map(
+ function (FeatureAv $featureAv) use ($modelFactory) {
+ return $modelFactory->buildModel('ChoiceFilterValue',
+ [
+ 'id' => $featureAv->getId(),
+ 'title' => $featureAv->getTitle(),
+ 'position' => $featureAv->getPosition()
+ ]
+ );
+ },
+ iterator_to_array(
+ FeatureAvQuery::create()
+ ->filterByFeatureId($this->getId())
+ ->useFeatureAvI18nQuery()
+ ->filterByLocale($locale)
+ ->endUse()
+ ->find()
+ )
+ );
+ }
+ if ($this->type === "attribute") {
+ $values = array_map(
+ function (AttributeAv $attributeAv) use ($modelFactory) {
+ return $modelFactory->buildModel('ChoiceFilterValue',
+ [
+ 'id' => $attributeAv->getId(),
+ 'title' => $attributeAv->getTitle(),
+ 'position' => $attributeAv->getPosition()
+ ]
+ );
+ },
+ iterator_to_array(
+ AttributeAvQuery::create()
+ ->filterByAttributeId($this->getId())
+ ->useAttributeAvI18nQuery()
+ ->filterByLocale($locale)
+ ->endUse()
+ ->find()
+ )
+ );
+ }
+
+ $this->setValues($values);
+ }
+}
diff --git a/domokits/local/modules/ChoiceFilter/Model/Api/ChoiceFilterValue.php b/domokits/local/modules/ChoiceFilter/Model/Api/ChoiceFilterValue.php
new file mode 100644
index 0000000..acd4330
--- /dev/null
+++ b/domokits/local/modules/ChoiceFilter/Model/Api/ChoiceFilterValue.php
@@ -0,0 +1,88 @@
+id;
+ }
+
+ public function setId(int $id): ChoiceFilterValue
+ {
+ $this->id = $id;
+
+ return $this;
+ }
+
+ public function getTitle(): ?string
+ {
+ return $this->title;
+ }
+
+ public function setTitle(string $title): ChoiceFilterValue
+ {
+ $this->title = $title;
+
+ return $this;
+ }
+
+ /**
+ * @return int
+ */
+ public function getPosition(): ?int
+ {
+ return $this->position;
+ }
+
+ /**
+ * @param int $position
+ */
+ public function setPosition(?int $position): ChoiceFilterValue
+ {
+ $this->position = $position;
+
+ return $this;
+ }
+}
diff --git a/domokits/local/modules/ChoiceFilter/Model/ChoiceFilter.php b/domokits/local/modules/ChoiceFilter/Model/ChoiceFilter.php
new file mode 100644
index 0000000..28ce769
--- /dev/null
+++ b/domokits/local/modules/ChoiceFilter/Model/ChoiceFilter.php
@@ -0,0 +1,10 @@
+useChoiceFilterOtherI18nQuery(null, Criteria::LEFT_JOIN)
+ ->endUse();
+
+ $locales = array_map(function ($value) {
+ return '"' . $value . '"';
+ }, $locales);
+
+ $otherQuery->addJoinCondition('ChoiceFilterOtherI18n', 'ChoiceFilterOtherI18n.locale IN (' . implode(',', $locales) . ')');
+
+ $otherQuery->withColumn('ChoiceFilterOtherI18n.title', 'Title');
+
+ $otherQuery->groupBy('id');
+
+ return $otherQuery->find();
+ }
+}
diff --git a/domokits/local/modules/ChoiceFilter/Model/ChoiceFilterQuery.php b/domokits/local/modules/ChoiceFilter/Model/ChoiceFilterQuery.php
new file mode 100644
index 0000000..2f88ee4
--- /dev/null
+++ b/domokits/local/modules/ChoiceFilter/Model/ChoiceFilterQuery.php
@@ -0,0 +1,192 @@
+useAttributeTemplateQuery()
+ ->filterByTemplateId($templateId)
+ ->endUse();
+
+ $attributeQuery->useAttributeI18nQuery(null, Criteria::LEFT_JOIN)
+ ->endUse();
+
+ $locales = array_map(function ($value) {
+ return '"' . $value . '"';
+ }, $locales);
+
+ $attributeQuery->addJoinCondition('AttributeI18n', 'AttributeI18n.locale IN (' . implode(',', $locales) . ')');
+
+ $attributeQuery->withColumn('AttributeI18n.title', 'Title');
+ $attributeQuery->withColumn('AttributeTemplate.position', 'Position');
+
+ $attributeQuery->groupBy('id');
+
+ $attributeQuery->orderBy('position');
+
+ return $attributeQuery->find();
+ }
+
+ /**
+ * @param int $templateId
+ * @param string[] list of locale
+ * @return Feature[]|ObjectCollection
+ */
+ public static function findFeaturesByTemplateId($templateId, $locales = ['en_US'])
+ {
+ $featureQuery = FeatureQuery::create();
+
+ $featureQuery->useFeatureTemplateQuery()
+ ->filterByTemplateId($templateId)
+ ->endUse();
+
+ $featureQuery->useFeatureI18nQuery(null, Criteria::LEFT_JOIN)
+ ->endUse();
+
+ $locales = array_map(function ($value) {
+ return '"' . $value . '"';
+ }, $locales);
+
+ $featureQuery->addJoinCondition('FeatureI18n', 'FeatureI18n.locale IN (' . implode(',', $locales) . ')');
+
+ $featureQuery->withColumn('FeatureI18n.title', 'Title');
+ $featureQuery->withColumn('FeatureTemplate.position', 'Position');
+
+ $featureQuery->groupBy('id');
+
+ $featureQuery->orderBy('position');
+
+ return $featureQuery->find();
+ }
+
+ /**
+ * @param Category $category
+ * @return Category[]
+ */
+ protected static function getParentCategoriesHasTemplate(Category $category)
+ {
+ $categories = [];
+ if (0 !== (int) $category->getParent()) {
+ $category = CategoryQuery::create()->filterById($category->getParent())->findOne();
+
+ if (null !== $category->getDefaultTemplateId()) {
+ $categories[] = $category;
+ }
+
+ $categories = $categories + static::getParentCategoriesHasTemplate($category);
+ }
+
+ return $categories;
+ }
+
+ public static function findChoiceFilterByCategory(
+ Category $category,
+ &$templateId = null,
+ &$categoryId = null
+ ) {
+ $choiceFilters = ChoiceFilterQuery::create()
+ ->filterByCategoryId($category->getId())
+ ->orderByPosition()
+ ->find();
+
+ $parents = static::getParentCategoriesHasTemplate($category);
+
+ if (count($choiceFilters)) {
+ if (null !== $category->getDefaultTemplateId()) {
+ $templateId = $category->getDefaultTemplateId();
+ $categoryId = $category->getId();
+ return $choiceFilters;
+ } else {
+ foreach ($parents as $parent) {
+ if (null !== $parent->getDefaultTemplateId()) {
+ $templateId = $parent->getDefaultTemplateId();
+ $categoryId = $category->getId();
+ return $choiceFilters;
+ }
+ }
+ }
+ }
+
+ if (null !== $category->getDefaultTemplateId()) {
+ $choiceFilters = ChoiceFilterQuery::create()
+ ->filterByCategoryId($category->getId())
+ ->orderByPosition()
+ ->find();
+
+ if (count($choiceFilters)) {
+ $templateId = $category->getDefaultTemplateId();
+ $categoryId = $category->getId();
+ return $choiceFilters;
+ }
+ }
+
+ foreach ($parents as $parent) {
+ $choiceFilters = ChoiceFilterQuery::create()
+ ->filterByCategoryId($parent->getId())
+ ->orderByPosition()
+ ->find();
+
+ if (count($choiceFilters)) {
+ $templateId = $parent->getDefaultTemplateId();
+ $categoryId = $parent->getId();
+ return $choiceFilters;
+ }
+ }
+
+ if (null !== $category->getDefaultTemplateId()) {
+ $choiceFilters = ChoiceFilterQuery::create()
+ ->filterByTemplateId($category->getDefaultTemplateId())
+ ->orderByPosition()
+ ->find();
+
+ $templateId = $category->getDefaultTemplateId();
+ $categoryId = null;
+ return $choiceFilters;
+ }
+
+ foreach ($parents as $parent) {
+ $choiceFilters = ChoiceFilterQuery::create()
+ ->filterByTemplateId($parent->getDefaultTemplateId())
+ ->orderByPosition()
+ ->find();
+
+ if (count($choiceFilters)) {
+ $templateId = $parent->getDefaultTemplateId();
+ $categoryId = null;
+ return $choiceFilters;
+ }
+ }
+
+ return new ObjectCollection();
+ }
+}
diff --git a/domokits/local/modules/ChoiceFilter/Readme.md b/domokits/local/modules/ChoiceFilter/Readme.md
new file mode 100644
index 0000000..a71e1ca
--- /dev/null
+++ b/domokits/local/modules/ChoiceFilter/Readme.md
@@ -0,0 +1,108 @@
+# Choice Filter
+
+This module allows the management of filters in front by template and category
+
+## Installation
+
+### Manually
+
+* Copy the module into ```/local/modules/``` directory and be sure that the name of the module is ChoiceFilter.
+* Activate it in your thelia administration panel
+
+### Composer
+
+Add it in your main thelia composer.json file
+
+```
+composer require thelia/choice-filter-module:~2.0.0
+```
+
+## Usage
+
+You can choose the position of the filters
+- When you edit a template
+- When you edit a category
+
+## Loop
+
+[choice_filter]
+
+### Input arguments
+
+|Argument |Description |
+|--- |--- |
+|**template_id** | id of template |
+|**category_id** | id of category |
+|**order** | `position` or `position_reverse` |
+
+### Output arguments
+
+|Variable |Description |
+|--- |--- |
+|**$TYPE** | `feature` or `attribute` or other |
+|**$ID** | id of filter |
+|**$POSITION** | position of filter |
+|**$VISIBLE** | visible of filter |
+
+### Exemple
+
+#### For a template
+```smarty
+{loop name="choice_filter" type="choice_filter" template_id=$template_id}
+ {if $TYPE == "feature" and $VISIBLE}
+ {loop type="feature" name="feature-$ID" id=$ID}
+ {* your code *}
+ {/loop}
+ {elseif $TYPE == "attribute" and $VISIBLE}
+ {loop type="attribute" name="attribute-$ID" id=$ID}
+ {* your code *}
+ {/loop}
+ {elseif $TYPE == "brand" and $VISIBLE}
+ {* your code *}
+ {elseif $TYPE == "price" and $VISIBLE}
+ {* your code *}
+ {/if}
+{/loop}
+```
+
+#### For a category
+```smarty
+{loop name="choice_filter" type="choice_filter" category_id=$category_id}
+ {if $TYPE == "feature" and $VISIBLE}
+ {loop type="feature" name="feature-$ID" id=$ID}
+ {* your code *}
+ {/loop}
+ {elseif $TYPE == "attribute" and $VISIBLE}
+ {loop type="attribute" name="attribute-$ID" id=$ID}
+ {* your code *}
+ {/loop}
+ {elseif $TYPE == "brand" and $VISIBLE}
+ {* your code *}
+ {elseif $TYPE == "price" and $VISIBLE}
+ {* your code *}
+ {/if}
+{/loop}
+```
+
+for performance, it is best to use a cache block
+http://doc.thelia.net/en/documentation/templates/smarty/cache.html
+
+```smarty
+{cache key="choice-filter" ttl=600 category_id==$category_id}
+ {loop name="choice_filter" type="choice_filter" category_id=$category_id}
+ {if $TYPE == "feature" and $VISIBLE}
+ {loop type="feature" name="feature-$ID" id=$ID}
+ {* your code *}
+ {/loop}
+ {elseif $TYPE == "attribute" and $VISIBLE}
+ {loop type="attribute" name="attribute-$ID" id=$ID}
+ {* your code *}
+ {/loop}
+ {elseif $TYPE == "brand" and $VISIBLE}
+ {* your code *}
+ {elseif $TYPE == "price" and $VISIBLE}
+ {* your code *}
+ {/if}
+ {/loop}
+{/cache}
+```
diff --git a/domokits/local/modules/ChoiceFilter/Util.php b/domokits/local/modules/ChoiceFilter/Util.php
new file mode 100644
index 0000000..78bbef6
--- /dev/null
+++ b/domokits/local/modules/ChoiceFilter/Util.php
@@ -0,0 +1,79 @@
+ 'feature', 'Visible' => 1]);
+ }, $features->toArray());
+
+ $attributesArray = array_map(function ($attribute) {
+ return array_merge($attribute, ['Type' => 'attribute', 'Visible' => 1]);
+ }, $attributes->toArray());
+
+ $othersArray = array_map(function ($other) {
+ return $other;
+ }, $others->toArray());
+
+ if (count($choiceFilters)) {
+ $merge = [];
+ foreach ($choiceFilters as $choiceFilter) {
+ if (null !== $attributeId = $choiceFilter->getAttributeId()) {
+ foreach ($attributesArray as $key => $attributeArray) {
+ if ($attributeId == $attributeArray['Id']) {
+ $attributeArray['Visible'] = $choiceFilter->getVisible() ? 1 : 0;
+ $merge[] = $attributeArray;
+ unset($attributesArray[$key]);
+ }
+ }
+ } elseif (null !== $featureId = $choiceFilter->getFeatureId()) {
+ foreach ($featuresArray as $key => $featureArray) {
+ if ($featureId == $featureArray['Id']) {
+ $featureArray['Visible'] = $choiceFilter->getVisible() ? 1 : 0;
+ $merge[] = $featureArray;
+ unset($featuresArray[$key]);
+ }
+ }
+ } elseif (null !== $type = $choiceFilter->getChoiceFilterOther()->getType()) { // todo ajouter une jointure pour le type
+ foreach ($othersArray as $key => $otherArray) {
+ if ($type == $otherArray['Type']) {
+ $otherArray['Visible'] = $choiceFilter->getVisible() ? 1 : 0;
+ $merge[] = $otherArray;
+ unset($othersArray[$key]);
+ }
+ }
+ }
+ }
+
+ $merge = array_merge($merge, $attributesArray);
+ $merge = array_merge($merge, $featuresArray);
+ $merge = array_merge($merge, $othersArray);
+ } else {
+ $merge = array_merge($attributesArray, $featuresArray);
+ $merge = array_merge($merge, $othersArray);
+ }
+
+ $p = 1;
+ $merge = array_map(function ($array) use (&$p) {
+ return array_merge($array, ['Position' => $p++]);
+ }, $merge);
+
+ return $merge;
+ }
+}
diff --git a/domokits/local/modules/ChoiceFilter/composer.json b/domokits/local/modules/ChoiceFilter/composer.json
new file mode 100644
index 0000000..d711527
--- /dev/null
+++ b/domokits/local/modules/ChoiceFilter/composer.json
@@ -0,0 +1,12 @@
+{
+ "name": "thelia/choice-filter-module",
+ "description": "Allows the management of filters in front by template and category",
+ "license": "LGPL-3.0+",
+ "type": "thelia-module",
+ "require": {
+ "thelia/installer": "~1.1"
+ },
+ "extra": {
+ "installer-name": "ChoiceFilter"
+ }
+}
diff --git a/domokits/local/modules/ChoiceFilter/templates/backOffice/default/choice-filter/category-edit.html b/domokits/local/modules/ChoiceFilter/templates/backOffice/default/choice-filter/category-edit.html
new file mode 100644
index 0000000..3e2dbe6
--- /dev/null
+++ b/domokits/local/modules/ChoiceFilter/templates/backOffice/default/choice-filter/category-edit.html
@@ -0,0 +1 @@
+{hook name="category.tab-content" category_id=$category_id id=$category_id view="category"}
\ No newline at end of file
diff --git a/domokits/local/modules/ChoiceFilter/templates/backOffice/default/choice-filter/hook/category.edit-js.html b/domokits/local/modules/ChoiceFilter/templates/backOffice/default/choice-filter/hook/category.edit-js.html
new file mode 100644
index 0000000..af65a05
--- /dev/null
+++ b/domokits/local/modules/ChoiceFilter/templates/backOffice/default/choice-filter/hook/category.edit-js.html
@@ -0,0 +1,27 @@
+
\ No newline at end of file
diff --git a/domokits/local/modules/ChoiceFilter/templates/backOffice/default/choice-filter/hook/category.tab-content.html b/domokits/local/modules/ChoiceFilter/templates/backOffice/default/choice-filter/hook/category.tab-content.html
new file mode 100644
index 0000000..a4908c7
--- /dev/null
+++ b/domokits/local/modules/ChoiceFilter/templates/backOffice/default/choice-filter/hook/category.tab-content.html
@@ -0,0 +1 @@
+{include file="choice-filter/hook/template-edit.bottom.html" category_id=$category_id enabled=$enabled messageInfo=$messageInfo}
\ No newline at end of file
diff --git a/domokits/local/modules/ChoiceFilter/templates/backOffice/default/choice-filter/hook/template-edit.bottom.html b/domokits/local/modules/ChoiceFilter/templates/backOffice/default/choice-filter/hook/template-edit.bottom.html
new file mode 100644
index 0000000..5f1657d
--- /dev/null
+++ b/domokits/local/modules/ChoiceFilter/templates/backOffice/default/choice-filter/hook/template-edit.bottom.html
@@ -0,0 +1,117 @@
+
+
+
+
+ {if isset($template_id)}
+ {intl l="Position of the filters in front for this template" d="choicefilter.bo.default"}
+ {/if}
+ {if isset($category_id)}
+ {intl l="Position of the filters in front for this category" d="choicefilter.bo.default"}
+ {/if}
+
+
+
+
diff --git a/domokits/local/modules/CustomDelivery/Config/sqldb.map b/domokits/local/modules/CustomDelivery/Config/sqldb.map
new file mode 100644
index 0000000..63a93ba
--- /dev/null
+++ b/domokits/local/modules/CustomDelivery/Config/sqldb.map
@@ -0,0 +1,2 @@
+# Sqlfile -> Database map
+thelia.sql=thelia
diff --git a/domokits/local/modules/CustomDelivery/Config/thelia.sql b/domokits/local/modules/CustomDelivery/Config/thelia.sql
new file mode 100644
index 0000000..298b293
--- /dev/null
+++ b/domokits/local/modules/CustomDelivery/Config/thelia.sql
@@ -0,0 +1,29 @@
+
+# This is a fix for InnoDB in MySQL >= 4.1.x
+# It "suspends judgement" for fkey relationships until are tables are set.
+SET FOREIGN_KEY_CHECKS = 0;
+
+-- ---------------------------------------------------------------------
+-- custom_delivery_slice
+-- ---------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `custom_delivery_slice`;
+
+CREATE TABLE `custom_delivery_slice`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `area_id` INTEGER NOT NULL,
+ `price_max` FLOAT DEFAULT 0,
+ `weight_max` FLOAT DEFAULT 0,
+ `price` FLOAT DEFAULT 0,
+ PRIMARY KEY (`id`),
+ INDEX `FI_area_id` (`area_id`),
+ CONSTRAINT `fk_area_id`
+ FOREIGN KEY (`area_id`)
+ REFERENCES `area` (`id`)
+ ON UPDATE RESTRICT
+ ON DELETE CASCADE
+) ENGINE=InnoDB;
+
+# This restores the fkey checks, after having unset them earlier
+SET FOREIGN_KEY_CHECKS = 1;
diff --git a/domokits/local/modules/CustomDelivery/Controller/BackController.php b/domokits/local/modules/CustomDelivery/Controller/BackController.php
new file mode 100644
index 0000000..fa790ae
--- /dev/null
+++ b/domokits/local/modules/CustomDelivery/Controller/BackController.php
@@ -0,0 +1,245 @@
+
+ */
+class BackController extends BaseAdminController
+{
+ protected $currentRouter = 'router.customdelivery';
+
+ protected $useFallbackTemplate = true;
+
+ /**
+ * Save slice
+ *
+ * @return \Symfony\Component\HttpFoundation\Response
+ */
+ public function saveAction(Request $request)
+ {
+ $response = $this->checkAuth([], ['customdelivery'], AccessManager::UPDATE);
+
+ if (null !== $response) {
+ return $response;
+ }
+
+ $this->checkXmlHttpRequest();
+
+ $responseData = [
+ "success" => false,
+ "message" => '',
+ "slice" => null
+ ];
+
+ $messages = [];
+ $response = null;
+ $config = CustomDelivery::getConfig();
+
+ try {
+ if (0 !== $id = (int)$request->get('id', 0)) {
+ $slice = CustomDeliverySliceQuery::create()->findPk($id);
+ } else {
+ $slice = new CustomDeliverySlice();
+ }
+
+ if (0 !== $areaId = (int)$request->get('area', 0)) {
+ $slice->setAreaId($areaId);
+ } else {
+ $messages[] = Translator::getInstance()->trans(
+ 'The area is not valid',
+ [],
+ CustomDelivery::MESSAGE_DOMAIN
+ );
+ }
+
+ if ($config['method'] !== CustomDelivery::METHOD_WEIGHT) {
+ $priceMax = $this->getFloatVal($request->get('priceMax', 0));
+ if (0 < $priceMax) {
+ $slice->setPriceMax($priceMax);
+ } else {
+ $messages[] = Translator::getInstance()->trans(
+ 'The price max value is not valid',
+ [],
+ CustomDelivery::MESSAGE_DOMAIN
+ );
+ }
+ }
+
+ if ($config['method'] !== CustomDelivery::METHOD_PRICE) {
+ $weightMax = $this->getFloatVal($request->get('weightMax', 0));
+ if (0 < $weightMax) {
+ $slice->setWeightMax($weightMax);
+ } else {
+ $messages[] = Translator::getInstance()->trans(
+ 'The weight max value is not valid',
+ [],
+ CustomDelivery::MESSAGE_DOMAIN
+ );
+ }
+ }
+
+ $price = $this->getFloatVal($request->get('price', 0));
+ if (0 <= $price) {
+ $slice->setPrice($price);
+ } else {
+ $messages[] = Translator::getInstance()->trans(
+ 'The price value is not valid',
+ [],
+ CustomDelivery::MESSAGE_DOMAIN
+ );
+ }
+
+ if (0 === count($messages)) {
+ $slice->save();
+ $messages[] = Translator::getInstance()->trans(
+ 'Your slice has been saved',
+ [],
+ CustomDelivery::MESSAGE_DOMAIN
+ );
+
+ $responseData['success'] = true;
+ $responseData['slice'] = $slice->toArray(TableMap::TYPE_STUDLYPHPNAME);
+ }
+ } catch (\Exception $e) {
+ $message[] = $e->getMessage();
+ }
+
+ $responseData['message'] = $messages;
+
+ return $this->jsonResponse(json_encode($responseData));
+ }
+
+ protected function getFloatVal($val, $default=-1)
+ {
+ if (preg_match("#^([\d.,]+)$#", $val, $match)) {
+ return (float) str_replace(array('.', ','), array('', '.'), $match[0]);
+ }
+
+ return $default;
+ }
+
+ /**
+ * Save slice
+ *
+ * @return Response
+ */
+ public function deleteAction(Request $request)
+ {
+ $response = $this->checkAuth([], ['customdelivery'], AccessManager::DELETE);
+
+ if (null !== $response) {
+ return $response;
+ }
+
+ $this->checkXmlHttpRequest();
+
+ $responseData = [
+ "success" => false,
+ "message" => '',
+ "slice" => null
+ ];
+
+ $response = null;
+
+ try {
+ if (0 !== $id = (int)$request->get('id', 0)) {
+ $slice = CustomDeliverySliceQuery::create()->findPk($id);
+ $slice->delete();
+ $responseData['success'] = true;
+ } else {
+ $responseData['message'] = Translator::getInstance()->trans(
+ 'The slice has not been deleted',
+ [],
+ CustomDelivery::MESSAGE_DOMAIN
+ );
+ }
+ } catch (\Exception $e) {
+ $responseData['message'] = $e->getMessage();
+ }
+
+ return $this->jsonResponse(json_encode($responseData));
+ }
+
+ /**
+ * Save module configuration
+ *
+ * @param ParserContext $parserContext
+ * @return \Symfony\Component\HttpFoundation\Response
+ */
+ public function saveConfigurationAction()
+ {
+ $response = $this->checkAuth([AdminResources::MODULE], ['customdelivery'], AccessManager::UPDATE);
+
+ if (null !== $response) {
+ return $response;
+ }
+
+ $form = $this->createForm('customdelivery.configuration.form');
+ $message = "";
+
+ $response = null;
+
+ try {
+ $vform = $this->validateForm($form);
+ $data = $vform->getData();
+
+ ConfigQuery::write(
+ CustomDelivery::CONFIG_TRACKING_URL,
+ $data['url']
+ );
+ ConfigQuery::write(
+ CustomDelivery::CONFIG_PICKING_METHOD,
+ $data['method']
+ );
+ ConfigQuery::write(
+ CustomDelivery::CONFIG_TAX_RULE_ID,
+ $data['tax']
+ );
+ } catch (\Exception $e) {
+ $message = $e->getMessage();
+ }
+ if ($message) {
+ $form->setErrorMessage($message);
+ $this->getParserContext()
+ ->addForm($form)
+ ->setGeneralError($message);
+
+ return $this->render(
+ "module-configure",
+ ["module_code" => CustomDelivery::getModuleCode()]
+ );
+ }
+
+ return $this->generateRedirect(
+ URL::getInstance()->absoluteUrl("/admin/module/" . CustomDelivery::getModuleCode())
+ );
+ }
+}
diff --git a/domokits/local/modules/CustomDelivery/CustomDelivery.php b/domokits/local/modules/CustomDelivery/CustomDelivery.php
new file mode 100755
index 0000000..5f6ca1e
--- /dev/null
+++ b/domokits/local/modules/CustomDelivery/CustomDelivery.php
@@ -0,0 +1,288 @@
+ (
+ ConfigQuery::read(self::CONFIG_TRACKING_URL, self::DEFAULT_TRACKING_URL)
+ ),
+ 'method' => (
+ intval(ConfigQuery::read(self::CONFIG_PICKING_METHOD, self::DEFAULT_PICKING_METHOD))
+ ),
+ 'tax' => (
+ intval(ConfigQuery::read(self::CONFIG_TAX_RULE_ID))
+ )
+ ];
+
+ return $config;
+ }
+
+ public function postActivation(ConnectionInterface $con = null): void
+ {
+ if (!$this->getConfigValue('is_initialized', false)) {
+ $database = new Database($con);
+
+ $database->insertSql(null, array(__DIR__ . '/Config/thelia.sql'));
+
+ $this->setConfigValue('is_initialized', true);
+ }
+
+ // register config variables
+ if (null === ConfigQuery::read(self::CONFIG_TRACKING_URL, null)) {
+ ConfigQuery::write(self::CONFIG_TRACKING_URL, self::DEFAULT_TRACKING_URL);
+ }
+
+ if (null === ConfigQuery::read(self::CONFIG_PICKING_METHOD, null)) {
+ ConfigQuery::write(self::CONFIG_PICKING_METHOD, self::DEFAULT_PICKING_METHOD);
+ }
+
+ // create new message
+ if (null === MessageQuery::create()->findOneByName('mail_custom_delivery')) {
+
+ $message = new Message();
+ $message
+ ->setName('mail_custom_delivery')
+ ->setHtmlTemplateFileName('custom-delivery-shipping.html')
+ ->setHtmlLayoutFileName('')
+ ->setTextTemplateFileName('custom-delivery-shipping.txt')
+ ->setTextLayoutFileName('')
+ ->setSecured(0);
+
+ $languages = LangQuery::create()->find();
+
+ foreach ($languages as $language) {
+ $locale = $language->getLocale();
+
+ $message->setLocale($locale);
+
+ $message->setTitle(
+ $this->trans('Custom delivery shipping message', [], $locale)
+ );
+ $message->setSubject(
+ $this->trans('Your order {$order_ref} has been shipped', [], $locale)
+ );
+ }
+
+ $message->save();
+ }
+ }
+
+ /**
+ * This method is called by the Delivery loop, to check if the current module has to be displayed to the customer.
+ * Override it to implements your delivery rules/
+ *
+ * If you return true, the delivery method will de displayed to the customer
+ * If you return false, the delivery method will not be displayed
+ *
+ * @param Country $country the country to deliver to.
+ * @param State $state the state to deliver to.
+ *
+ * @return boolean
+ */
+ public function isValidDelivery(Country $country, State $state = null)
+ {
+ // Retrieve the cart
+ $cart = $this->getRequest()->getSession()->getSessionCart($this->getDispatcher());
+
+ /** @var CustomDeliverySlice $slice */
+ $slice = $this->getSlicePostage($cart, $country, $state);
+
+ return null !== $slice;
+ }
+
+ /**
+ * Calculate and return delivery price in the shop's default currency
+ *
+ * @param Country $country the country to deliver to.
+ * @param State $state the state to deliver to.
+ *
+ * @return OrderPostage the delivery price
+ * @throws DeliveryException if the postage price cannot be calculated.
+ */
+ public function getPostage(Country $country, State $state = null)
+ {
+ $cart = $this->getRequest()->getSession()->getSessionCart($this->getDispatcher());
+
+ /** @var CustomDeliverySlice $slice */
+ $postage = $this->getSlicePostage($cart, $country, $state);
+
+ if (null === $postage) {
+ throw new DeliveryException();
+ }
+
+ return $postage;
+ }
+
+ /**
+ *
+ * This method return true if your delivery manages virtual product delivery.
+ *
+ * @return bool
+ */
+ public function handleVirtualProductDelivery()
+ {
+ return false;
+ }
+
+ protected function trans($id, array $parameters = [], $locale = null)
+ {
+ if (null === $this->translator) {
+ $this->translator = Translator::getInstance();
+ }
+
+ return $this->translator->trans($id, $parameters, CustomDelivery::MESSAGE_DOMAIN, $locale);
+ }
+
+ public function getDeliveryMode()
+ {
+ return 'delivery';
+ }
+
+ /**
+ * If a state is given and has slices, use them.
+ * If state is given but has no slices, check if the country has slices.
+ * If the country has slices, use them.
+ * If the country has no slices, the module is not valid for delivery
+ *
+ * @param Cart $cart
+ * @param Country $country
+ * @param State $state
+ * @return OrderPostage|null
+ */
+ protected function getSlicePostage(Cart $cart, Country $country, State $state = null)
+ {
+ $config = self::getConfig();
+ $currency = $cart->getCurrency();
+ /** @var CustomDeliverySlice $slice */
+ $slice = null;
+
+ if (null !== $state && null !== $areas = CountryAreaQuery::create()
+ ->filterByStateId($state->getId())
+ ->select([CountryAreaTableMap::AREA_ID])
+ ->find()
+ ) {
+ $slice = $this->getAreaSlice($areas, $cart, $currency, $config);
+ }
+
+ if (null === $slice && null !== $areas = CountryAreaQuery::create()
+ ->filterByCountryId($country->getId())
+ ->filterByStateId(null)
+ ->select([CountryAreaTableMap::AREA_ID])
+ ->find()
+ ) {
+ $slice = $this->getAreaSlice($areas, $cart, $currency, $config);
+ }
+
+ if ($slice === null) {
+ return null;
+ }
+
+ return $this->getAreaPostage($slice, $currency, $country, $config);
+ }
+
+ /**
+ * @param $areas
+ * @param Cart $cart
+ * @param Currency $currency
+ * @param $config
+ * @return CustomDeliverySlice
+ */
+ protected function getAreaSlice($areas, Cart $cart, Currency $currency, $config)
+ {
+ $query = CustomDeliverySliceQuery::create()->filterByAreaId($areas, Criteria::IN);
+
+ if ($config['method'] != CustomDelivery::METHOD_PRICE) {
+ $query->filterByWeightMax($cart->getWeight(), Criteria::GREATER_THAN);
+ $query->orderByWeightMax(Criteria::ASC);
+ }
+
+ if ($config['method'] != CustomDelivery::METHOD_WEIGHT) {
+ $total = $cart->getTotalAmount();
+ // convert amount to the default currency
+ if (0 == $currency->getByDefault()) {
+ $total = $total / $currency->getRate();
+ }
+
+ $query->filterByPriceMax($total, Criteria::GREATER_THAN);
+ $query->orderByPriceMax(Criteria::ASC);
+ }
+
+ return $query->findOne();
+ }
+
+ /**
+ * @param CustomDeliverySlice $slice
+ * @param Currency $currency
+ * @param Country $country
+ * @param $config
+ * @return OrderPostage
+ */
+ protected function getAreaPostage(CustomDeliverySlice $slice, Currency $currency, Country $country, $config)
+ {
+ if (0 == $currency->getByDefault()) {
+ $untaxedPostage = $slice->getPrice() * $currency->getRate();
+ } else {
+ $untaxedPostage = $slice->getPrice();
+ }
+ $untaxedPostage = round($untaxedPostage, 2);
+
+ $locale = $this->getRequest()->getSession()->getLang()->getLocale();
+
+ return $this->buildOrderPostage($untaxedPostage, $country, $locale, $config['tax']);
+ }
+}
diff --git a/domokits/local/modules/CustomDelivery/EventListeners/ApiListener.php b/domokits/local/modules/CustomDelivery/EventListeners/ApiListener.php
new file mode 100644
index 0000000..52b7a84
--- /dev/null
+++ b/domokits/local/modules/CustomDelivery/EventListeners/ApiListener.php
@@ -0,0 +1,104 @@
+container = $container;
+ $this->request = $requestStack->getCurrentRequest();
+ }
+
+ public function getDeliveryModuleOptions(DeliveryModuleOptionEvent $deliveryModuleOptionEvent)
+ {
+ if ($deliveryModuleOptionEvent->getModule()->getId() !== CustomDelivery::getModuleId()) {
+ return ;
+ }
+ $isValid = true;
+ $postage = null;
+ $postageTax = null;
+
+ $locale = $this->request->getSession()->getLang()->getLocale();
+
+ $propelModule = ModuleQuery::create()
+ ->filterById(CustomDelivery::getModuleId())
+ ->findOne()
+ ->setLocale($locale);
+
+ try {
+ $module = $propelModule->getModuleInstance($this->container);
+ $country = $deliveryModuleOptionEvent->getCountry();
+ $state = $deliveryModuleOptionEvent->getState();
+
+ if (empty($module->isValidDelivery($country, $state))) {
+ throw new DeliveryException(Translator::getInstance()->trans("Custom delivery is not available"));
+ }
+
+ /** @var OrderPostage $orderPostage */
+ $orderPostage = $module->getPostage($country, $state);
+ $postage = $orderPostage->getAmount();
+ $postageTax = $orderPostage->getAmountTax();
+ } catch (\Exception $exception) {
+ $isValid = false;
+ }
+
+ $minimumDeliveryDate = ''; // TODO (calculate delivery date from day of order)
+ $maximumDeliveryDate = ''; // TODO (calculate delivery date from day of order
+
+ /** @var DeliveryModuleOption $deliveryModuleOption */
+ $deliveryModuleOption = ($this->container->get('open_api.model.factory'))->buildModel('DeliveryModuleOption');
+ $deliveryModuleOption
+ ->setCode(CustomDelivery::getModuleCode())
+ ->setValid($isValid)
+ ->setTitle($propelModule->getTitle())
+ ->setImage('')
+ ->setMinimumDeliveryDate($minimumDeliveryDate)
+ ->setMaximumDeliveryDate($maximumDeliveryDate)
+ ->setPostage($postage)
+ ->setPostageTax($postageTax)
+ ->setPostageUntaxed($postage - $postageTax)
+ ;
+
+ $deliveryModuleOptionEvent->appendDeliveryModuleOptions($deliveryModuleOption);
+ }
+
+ public static function getSubscribedEvents()
+ {
+ $listenedEvents = [];
+
+ /** Check for old versions of Thelia where the events used by the API didn't exists */
+ if (class_exists(DeliveryModuleOptionEvent::class)) {
+ $listenedEvents[OpenApiEvents::MODULE_DELIVERY_GET_OPTIONS] = array("getDeliveryModuleOptions", 129);
+ }
+
+ return $listenedEvents;
+ }
+}
diff --git a/domokits/local/modules/CustomDelivery/EventListeners/CustomDeliveryEvents.php b/domokits/local/modules/CustomDelivery/EventListeners/CustomDeliveryEvents.php
new file mode 100644
index 0000000..5f3c28d
--- /dev/null
+++ b/domokits/local/modules/CustomDelivery/EventListeners/CustomDeliveryEvents.php
@@ -0,0 +1,127 @@
+
+ */
+class CustomDeliveryEvents implements EventSubscriberInterface
+{
+ protected $parser;
+
+ protected $mailer;
+
+ public function __construct(ParserInterface $parser, MailerFactory $mailer)
+ {
+ $this->parser = $parser;
+ $this->mailer = $mailer;
+ }
+
+ /**
+ * Returns an array of event names this subscriber wants to listen to.
+ *
+ * The array keys are event names and the value can be:
+ *
+ * * The method name to call (priority defaults to 0)
+ * * An array composed of the method name to call and the priority
+ * * An array of arrays composed of the method names to call and respective
+ * priorities, or 0 if unset
+ *
+ * For instance:
+ *
+ * * array('eventName' => 'methodName')
+ * * array('eventName' => array('methodName', $priority))
+ * * array('eventName' => array(array('methodName1', $priority), array('methodName2'))
+ *
+ * @return array The event names to listen to
+ *
+ * @api
+ */
+ public static function getSubscribedEvents()
+ {
+ return [
+ TheliaEvents::ORDER_UPDATE_STATUS => ["updateStatus", 128]
+ ];
+ }
+
+ public function updateStatus(OrderEvent $event)
+ {
+ $order = $event->getOrder();
+ $customDelivery = new CustomDelivery();
+
+ if ($order->isSent() && $order->getDeliveryModuleId() == $customDelivery->getModuleModel()->getId()) {
+ $contactEmail = ConfigQuery::getStoreEmail();
+
+ if ($contactEmail) {
+
+ $message = MessageQuery::create()
+ ->filterByName('mail_custom_delivery')
+ ->findOne();
+
+ if (false === $message) {
+ throw new \Exception("Failed to load message 'mail_custom_delivery'.");
+ }
+
+ $order = $event->getOrder();
+ $customer = $order->getCustomer();
+ $package = $order->getDeliveryRef();
+ $trackingUrl = null;
+
+ if (!empty($package)) {
+ $config = CustomDelivery::getConfig();
+ $trackingUrl = $config['url'];
+ if (!empty($trackingUrl)) {
+ $trackingUrl = str_replace('%ID%', $package, $trackingUrl);
+ }
+ }
+
+ $this->mailer->sendEmailMessage(
+ 'mail_custom_delivery',
+ [$contactEmail => ConfigQuery::getStoreName()],
+ [$customer->getEmail() => $customer->getFirstname() . " " . $customer->getLastname()],
+ [
+ 'customer_id' => $customer->getId(),
+ 'order_id' => $order->getId(),
+ 'order_ref' => $order->getRef(),
+ 'order_date' => $order->getCreatedAt(),
+ 'update_date' => $order->getUpdatedAt(),
+ 'package' => $package,
+ 'tracking_url' => $trackingUrl
+ ]
+ );
+
+ Tlog::getInstance()->debug(
+ "Custom Delivery shipping message sent to customer " . $customer->getEmail()
+ );
+ } else {
+ $customer = $order->getCustomer();
+ Tlog::getInstance()->debug(
+ "Custom Delivery shipping message no contact email customer_id ".$customer->getId()
+ );
+ }
+ }
+ }
+}
diff --git a/domokits/local/modules/CustomDelivery/Form/ConfigurationForm.php b/domokits/local/modules/CustomDelivery/Form/ConfigurationForm.php
new file mode 100644
index 0000000..1a8ec86
--- /dev/null
+++ b/domokits/local/modules/CustomDelivery/Form/ConfigurationForm.php
@@ -0,0 +1,130 @@
+
+ */
+class ConfigurationForm extends BaseForm
+{
+ public function checkTaxRuleId($value, ExecutionContextInterface $context)
+ {
+ if (0 !== intval($value)) {
+ if (null === TaxRuleQuery::create()->findPk($value)) {
+ $context->addViolation(
+ $this->trans(
+ "The Tax Rule id '%id' doesn't exist",
+ [
+ "%id" => $value,
+ ]
+ )
+ );
+ }
+ }
+ }
+
+ /**
+ * @return string the name of you form. This name must be unique
+ */
+ public static function getName()
+ {
+ return "customdelivery-configuration-form";
+ }
+
+ protected function buildForm()
+ {
+ $form = $this->formBuilder;
+
+ $config = CustomDelivery::getConfig();
+
+ $form
+ ->add(
+ "url",
+ TextType::class,
+ [
+ 'constraints' => [
+ new NotBlank()
+ ],
+ 'data' => $config['url'],
+ 'label' => $this->trans("Tracking URL"),
+ 'label_attr' => [
+ 'for' => "url",
+ 'help' => $this->trans(
+ "The tracking URL. %ID% will be replaced by the tracking number entered in the order"
+ )
+ ],
+ ]
+ )
+ ->add(
+ "method",
+ ChoiceType::class,
+ [
+ 'constraints' => [
+ new NotBlank(),
+ new GreaterThanOrEqual(['value' => 0])
+ ],
+ "choices" => [
+ $this->trans("Price and weight") => CustomDelivery::METHOD_PRICE_WEIGHT,
+ $this->trans("Price") => CustomDelivery::METHOD_PRICE,
+ $this->trans("Weight") =>CustomDelivery::METHOD_WEIGHT
+ ],
+ 'data' => $config['method'],
+ 'label' => $this->trans("Method"),
+ 'label_attr' => [
+ 'for' => "method",
+ 'help' => $this->trans(
+ "The method used to select the right slice."
+ )
+ ],
+ ]
+ )
+ ->add(
+ "tax",
+ TaxRuleIdType::class,
+ [
+ "constraints" => [
+ new Callback(
+ [$this, 'checkTaxRuleId']
+ ),
+ ],
+ 'required' => false,
+ 'data' => $config['tax'],
+ 'label' => $this->trans("Tax rule"),
+ 'label_attr' => [
+ 'for' => "method",
+ 'help' => $this->trans(
+ "The tax rule used to calculate postage taxes."
+ )
+ ],
+ ]
+ );
+ }
+
+ protected function trans($id, array $parameters = [])
+ {
+ return $this->translator->trans($id, $parameters, CustomDelivery::MESSAGE_DOMAIN);
+ }
+}
diff --git a/domokits/local/modules/CustomDelivery/Form/SliceForm.php b/domokits/local/modules/CustomDelivery/Form/SliceForm.php
new file mode 100644
index 0000000..06c40c5
--- /dev/null
+++ b/domokits/local/modules/CustomDelivery/Form/SliceForm.php
@@ -0,0 +1,92 @@
+
+ */
+class SliceForm extends BaseForm
+{
+ /**
+ * @return string the name of you form. This name must be unique
+ */
+ public static function getName()
+ {
+ return "customdelivery-configuration-form";
+ }
+
+ protected function buildForm()
+ {
+ $form = $this->formBuilder;
+
+ $form
+ ->add(
+ "id",
+ NumberType::class,
+ [
+ 'constraints' => [
+ new NotBlank()
+ ],
+ 'label' => $this->trans("Id")
+ ]
+ )
+ ->add(
+ "area",
+ AreaIdType::class,
+ [
+ 'constraints' => [
+ new NotBlank(),
+ new GreaterThanOrEqual(['value' => 0])
+ ],
+ 'label' => $this->trans("Area"),
+ ]
+ )
+ ->add(
+ "priceMax",
+ FloatType::class,
+ [
+ 'constraints' => [
+ new NotBlank(),
+ new GreaterThanOrEqual(['value' => 0])
+ ],
+ 'label' => $this->trans("Area"),
+ ]
+ )
+ ->add(
+ "weightMax",
+ FloatType::class,
+ [
+ 'constraints' => [
+ new NotBlank(),
+ new GreaterThanOrEqual(['value' => 0])
+ ],
+ 'label' => $this->trans("Area"),
+ ]
+ );
+ }
+
+ protected function trans($id, array $parameters = [])
+ {
+ return $this->translator->trans($id, $parameters, CustomDelivery::MESSAGE_DOMAIN);
+ }
+}
diff --git a/domokits/local/modules/CustomDelivery/Hook/HookManager.php b/domokits/local/modules/CustomDelivery/Hook/HookManager.php
new file mode 100644
index 0000000..e82655a
--- /dev/null
+++ b/domokits/local/modules/CustomDelivery/Hook/HookManager.php
@@ -0,0 +1,67 @@
+
+ */
+class HookManager extends BaseHook
+{
+
+ public function onAccountOrderAfterProducts(HookRenderEvent $event)
+ {
+ $orderId = $event->getArgument('order');
+
+ if (null !== $orderId) {
+ $render = $this->render(
+ 'account-order-after-products.html',
+ [
+ "order_id" => $orderId
+ ]
+ );
+ $event->add($render);
+ }
+
+ $event->stopPropagation();
+ }
+
+ public function onModuleConfiguration(HookRenderEvent $event)
+ {
+ $moduleId = $this->getModule()->getModuleId();
+ $config = CustomDelivery::getConfig();
+
+ $event->add(
+ $this->render(
+ "module-configuration.html",
+ [
+ 'module_id' => $moduleId,
+ 'method' => $config['method']
+ ]
+ )
+ );
+ }
+
+ public function onModuleConfigJs(HookRenderEvent $event)
+ {
+ $event->add(
+ $this->render("module-config-js.html")
+ );
+ }
+}
diff --git a/domokits/local/modules/CustomDelivery/I18n/backOffice/default/en_US.php b/domokits/local/modules/CustomDelivery/I18n/backOffice/default/en_US.php
new file mode 100644
index 0000000..4c34c00
--- /dev/null
+++ b/domokits/local/modules/CustomDelivery/I18n/backOffice/default/en_US.php
@@ -0,0 +1,19 @@
+ 'Actions',
+ 'Add this price slice' => 'Add this price slice',
+ 'Area : ' => 'Area : ',
+ 'Configuration.' => 'Configuration.',
+ 'Delete this price slice' => 'Delete this price slice',
+ 'Message' => 'Message',
+ 'No taxes' => 'No taxes',
+ 'Price (%symbol)' => 'Price (%symbol)',
+ 'Save' => 'Save',
+ 'Save this price slice' => 'Save this price slice',
+ 'Slices.' => 'Slices.',
+ 'Untaxed Price up to ... %symbol' => 'Untaxed Price up to ... %symbol',
+ 'Weight up to ... kg' => 'Weight up to ... kg',
+ 'You should first attribute shipping zones to the modules: ' => 'You should first attribute shipping zones to the module: ',
+ 'manage shipping zones' => 'manage shipping zones',
+);
diff --git a/domokits/local/modules/CustomDelivery/I18n/backOffice/default/fr_FR.php b/domokits/local/modules/CustomDelivery/I18n/backOffice/default/fr_FR.php
new file mode 100644
index 0000000..6b6e2ef
--- /dev/null
+++ b/domokits/local/modules/CustomDelivery/I18n/backOffice/default/fr_FR.php
@@ -0,0 +1,19 @@
+ 'Actions',
+ 'Add this price slice' => 'Ajouter cette tranche',
+ 'Area : ' => 'Zone :',
+ 'Configuration.' => 'Configuration.',
+ 'Delete this price slice' => 'Supprimer cette tranche',
+ 'Message' => 'Message',
+ 'No taxes' => 'Pas de taxe',
+ 'Price (%symbol)' => 'Prix (%symbol)',
+ 'Save' => 'Enregistrer',
+ 'Save this price slice' => 'Enregistrer cette tranche',
+ 'Slices.' => 'Tranches.',
+ 'Untaxed Price up to ... %symbol' => 'Prix HT jusqu\'à ... %symbol',
+ 'Weight up to ... kg' => 'Poids jusqu\'à ... kg',
+ 'You should first attribute shipping zones to the modules: ' => 'Vous devez d\'abord attribuer des zones de livraisons au module :',
+ 'manage shipping zones' => 'gèrer les zones de livraisons',
+);
diff --git a/domokits/local/modules/CustomDelivery/I18n/email/default/en_US.php b/domokits/local/modules/CustomDelivery/I18n/email/default/en_US.php
new file mode 100644
index 0000000..865088d
--- /dev/null
+++ b/domokits/local/modules/CustomDelivery/I18n/email/default/en_US.php
@@ -0,0 +1,11 @@
+ 'Best Regards.',
+ 'Dear' => 'Dear',
+ 'Feel free to contact us for any further information' => 'Feel free to contact us for any further information',
+ 'Please check this URL to track your parcel : %tracking_url' => 'Please check this URL to track your parcel : %tracking_url',
+ 'Thank you for your order on our online store %store_name' => 'Thank you for your order on our online store %store_name',
+ 'The tracking number for this delivery is: %package' => 'The tracking number for this delivery is: %package',
+ 'Your order %order_ref dated %order_date has been shipped on %update_date' => 'Your order %order_ref dated %order_date has been shipped on %update_date',
+);
diff --git a/domokits/local/modules/CustomDelivery/I18n/email/default/fr_FR.php b/domokits/local/modules/CustomDelivery/I18n/email/default/fr_FR.php
new file mode 100644
index 0000000..f86e3cd
--- /dev/null
+++ b/domokits/local/modules/CustomDelivery/I18n/email/default/fr_FR.php
@@ -0,0 +1,11 @@
+ 'Cordialement.',
+ 'Dear' => 'Chère',
+ 'Feel free to contact us for any further information' => 'Vous pouvez nous contacter pour toutes informations complémentaires',
+ 'Please check this URL to track your parcel : %tracking_url' => 'Vous pouvez suivre votre colis en ligne à cette adresse : %tracking_url',
+ 'Thank you for your order on our online store %store_name' => 'Merci pour votre commande sur notre boutique en ligne %store_name',
+ 'The tracking number for this delivery is: %package' => 'Le numéro de suivi pour cette commande est: %package',
+ 'Your order %order_ref dated %order_date has been shipped on %update_date' => 'Votre commande %order_ref datée du %order_date a été expédié le %update_date',
+);
diff --git a/domokits/local/modules/CustomDelivery/I18n/en_US.php b/domokits/local/modules/CustomDelivery/I18n/en_US.php
new file mode 100644
index 0000000..79bfd28
--- /dev/null
+++ b/domokits/local/modules/CustomDelivery/I18n/en_US.php
@@ -0,0 +1,24 @@
+ 'Area',
+ 'Custom delivery shipping message' => 'Custom delivery shipping message',
+ 'Id' => 'Id',
+ 'Method' => 'Method',
+ 'Price' => 'Price',
+ 'Price and weight' => 'Price and weight',
+ 'Tax rule' => 'Tax rule',
+ 'The Tax Rule id \'%id\' doesn\'t exist' => 'The Tax Rule id \'%id\' doesn\'t exist',
+ 'The area is not valid' => 'The area is not valid',
+ 'The method used to select the right slice.' => 'The method used to select the right slice.',
+ 'The price max value is not valid' => 'The price max value is not valid',
+ 'The price value is not valid' => 'The price value is not valid',
+ 'The slice has not been deleted' => 'The slice has not been deleted',
+ 'The tax rule used to calculate postage taxes.' => 'The tax rule used to calculate postage taxes.',
+ 'The tracking URL. %ID% will be replaced by the tracking number entered in the order' => 'The tracking URL. %ID% will be replaced by the tracking number entered in the order',
+ 'The weight max value is not valid' => 'The weight max value is not valid',
+ 'Tracking URL' => 'Tracking URL',
+ 'Weight' => 'Weight',
+ 'Your order {$order_ref} has been shipped' => 'Your order {$order_ref} has been shipped',
+ 'Your slice has been saved' => 'Your slice has been saved',
+);
diff --git a/domokits/local/modules/CustomDelivery/I18n/fr_FR.php b/domokits/local/modules/CustomDelivery/I18n/fr_FR.php
new file mode 100644
index 0000000..5273164
--- /dev/null
+++ b/domokits/local/modules/CustomDelivery/I18n/fr_FR.php
@@ -0,0 +1,24 @@
+ 'Zone',
+ 'Custom delivery shipping message' => 'Message d\'envoi pour la livraison personnalisée',
+ 'Id' => 'Id',
+ 'Method' => 'Méthode',
+ 'Price' => 'Prix',
+ 'Price and weight' => 'Prix et poids',
+ 'Tax rule' => 'Règle de taxe',
+ 'The Tax Rule id \'%id\' doesn\'t exist' => 'La règle de taxe id \'%id\' n\'existe pas',
+ 'The area is not valid' => 'La zone n\'est pas valide',
+ 'The method used to select the right slice.' => 'La méthode utilisée pour sélectionner la bonne tranche.',
+ 'The price max value is not valid' => 'La valeur du prix max n\'est pas valide',
+ 'The price value is not valid' => 'La valeur du prix n\'est pas valide',
+ 'The slice has not been deleted' => 'Votre tranche n\'a pas été supprimé',
+ 'The tax rule used to calculate postage taxes.' => 'La règle de taxe utilisée pour calculer les taxes associés à la livraison.',
+ 'The tracking URL. %ID% will be replaced by the tracking number entered in the order' => 'L\'URL de suivi. %ID% sera remplacé par le numéro de suivi saisi dans la commande',
+ 'The weight max value is not valid' => 'La valeur du poids max n\'est pas valide',
+ 'Tracking URL' => 'URL de suivi',
+ 'Weight' => 'Poids',
+ 'Your order {$order_ref} has been shipped' => 'Votre commande {$order_ref} vient d\'être expédiée',
+ 'Your slice has been saved' => 'Votre tranche a été sauvegardé',
+);
diff --git a/domokits/local/modules/CustomDelivery/LICENSE b/domokits/local/modules/CustomDelivery/LICENSE
new file mode 100644
index 0000000..fb6d90b
--- /dev/null
+++ b/domokits/local/modules/CustomDelivery/LICENSE
@@ -0,0 +1,166 @@
+GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
+
diff --git a/domokits/local/modules/CustomDelivery/Loop/CustomDeliverySliceLoop.php b/domokits/local/modules/CustomDelivery/Loop/CustomDeliverySliceLoop.php
new file mode 100644
index 0000000..ff26d64
--- /dev/null
+++ b/domokits/local/modules/CustomDelivery/Loop/CustomDeliverySliceLoop.php
@@ -0,0 +1,168 @@
+
+ */
+class CustomDeliverySliceLoop extends BaseLoop implements PropelSearchLoopInterface
+{
+ protected $timestampable = false;
+
+ protected $versionable = false;
+
+ /**
+ * @param LoopResult $loopResult
+ *
+ * @return LoopResult
+ */
+ public function parseResults(LoopResult $loopResult)
+ {
+ /** @var CustomDeliverySlice $slice */
+ foreach ($loopResult->getResultDataCollection() as $slice) {
+
+ $loopResultRow = new LoopResultRow($slice);
+
+ $loopResultRow
+ ->set("ID", $slice->getId())
+ ->set("AREA_ID", $slice->getAreaId())
+ ->set("PRICE_MAX", $slice->getPriceMax())
+ ->set("WEIGHT_MAX", $slice->getWeightMax())
+ ->set("PRICE", $slice->getPrice());
+
+ $this->addOutputFields($loopResultRow, $slice);
+
+ $loopResult->addRow($loopResultRow);
+ }
+
+ return $loopResult;
+ }
+
+ /**
+ * this method returns a Propel ModelCriteria
+ *
+ * @return \Propel\Runtime\ActiveQuery\ModelCriteria
+ */
+ public function buildModelCriteria()
+ {
+ $query = CustomDeliverySliceQuery::create();
+
+ $id = $this->getArgValue('id');
+ if (null !== $id) {
+ $query->filterById($id, Criteria::IN);
+ }
+
+ $id = $this->getArgValue('area_id');
+ if (null !== $id) {
+ $query->filterByAreaId($id, Criteria::IN);
+ }
+
+ $orders = $this->getArgValue('order');
+
+ foreach ($orders as $order) {
+ switch ($order) {
+ case "id":
+ $query->orderById(Criteria::ASC);
+ break;
+ case "id_reverse":
+ $query->orderById(Criteria::DESC);
+ break;
+ case "weight_max":
+ $query->orderByWeightMax(Criteria::ASC);
+ break;
+ case "weight_max_reverse":
+ $query->orderByWeightMax(Criteria::DESC);
+ break;
+ case "price_max":
+ $query->orderByPriceMax(Criteria::ASC);
+ break;
+ case "price_max_reverse":
+ $query->orderByPriceMax(Criteria::DESC);
+ break;
+ case "price":
+ $query->orderByPrice(Criteria::ASC);
+ break;
+ case "price_reverse":
+ $query->orderByPrice(Criteria::DESC);
+ break;
+ }
+ }
+
+ return $query;
+ }
+
+ /**
+ * Definition of loop arguments
+ *
+ * example :
+ *
+ * public function getArgDefinitions()
+ * {
+ * return new ArgumentCollection(
+ *
+ * Argument::createIntListTypeArgument('id'),
+ * new Argument(
+ * 'ref',
+ * new TypeCollection(
+ * new Type\AlphaNumStringListType()
+ * )
+ * ),
+ * Argument::createIntListTypeArgument('category'),
+ * Argument::createBooleanTypeArgument('new'),
+ * ...
+ * );
+ * }
+ *
+ * @return \Thelia\Core\Template\Loop\Argument\ArgumentCollection
+ */
+ protected function getArgDefinitions()
+ {
+ return new ArgumentCollection(
+ Argument::createIntListTypeArgument('id'),
+ Argument::createIntListTypeArgument('area_id'),
+ new Argument(
+ 'order',
+ new TypeCollection(
+ new EnumListType(
+ [
+ 'id',
+ 'id_reverse',
+ 'weight_max',
+ 'weight_max_reverse',
+ 'price_max',
+ 'price_max_reverse',
+ 'price',
+ 'price_reverse',
+ ]
+ )
+ ),
+ 'id'
+ )
+ );
+ }
+}
diff --git a/domokits/local/modules/CustomDelivery/Model/CustomDeliverySlice.php b/domokits/local/modules/CustomDelivery/Model/CustomDeliverySlice.php
new file mode 100644
index 0000000..aa4d36f
--- /dev/null
+++ b/domokits/local/modules/CustomDelivery/Model/CustomDeliverySlice.php
@@ -0,0 +1,10 @@
+/local/modules/``` directory and be sure that the name of the module is CustomDelivery.
+* Activate it in your thelia administration panel
+
+### Composer
+
+Add it in your main thelia composer.json file
+
+```
+composer require thelia/custom-delivery-module:~1.0
+```
+
+## Usage
+
+Just enter the price you want for each area in the configuration page of the module.
+You can create as many slices you want. These slices are based on the amount price and/or the weight of an order. You
+can associate an optional taxe rule to the module to include taxes for the shipment.
+
+
+# customization
+
+You can customize the mails sent by the module in the **Mailing templates** configuration page in the back-office. The
+ template used is called `mail_custom_delivery`.
diff --git a/domokits/local/modules/CustomDelivery/composer.json b/domokits/local/modules/CustomDelivery/composer.json
new file mode 100644
index 0000000..277e415
--- /dev/null
+++ b/domokits/local/modules/CustomDelivery/composer.json
@@ -0,0 +1,11 @@
+{
+ "name": "thelia/custom-delivery-module",
+ "license": "LGPL-3.0+",
+ "type": "thelia-module",
+ "require": {
+ "thelia/installer": "~1.1"
+ },
+ "extra": {
+ "installer-name": "CustomDelivery"
+ }
+}
\ No newline at end of file
diff --git a/domokits/local/modules/CustomDelivery/templates/backOffice/default/module-config-js.html b/domokits/local/modules/CustomDelivery/templates/backOffice/default/module-config-js.html
new file mode 100644
index 0000000..f064982
--- /dev/null
+++ b/domokits/local/modules/CustomDelivery/templates/backOffice/default/module-config-js.html
@@ -0,0 +1,127 @@
+
+{javascripts file='assets/js/libs/underscore-min.js'}
+
+{/javascripts}
+
+
\ No newline at end of file
diff --git a/domokits/local/modules/CustomDelivery/templates/backOffice/default/module-configuration.html b/domokits/local/modules/CustomDelivery/templates/backOffice/default/module-configuration.html
new file mode 100644
index 0000000..1909641
--- /dev/null
+++ b/domokits/local/modules/CustomDelivery/templates/backOffice/default/module-configuration.html
@@ -0,0 +1,195 @@
+
+
{intl l="Thank you for your order on our online store %store_name" store_name={config key="store_name"}}
+
{intl l="Your order %order_ref dated %order_date has been shipped on %update_date" order_ref={$order_ref} order_date={format_date date=$order_date} update_date={format_date date=$update_date}}
+{if $package}
+
{intl l="The tracking number for this delivery is: %package" package={$package}}
+{if $tracking_url}
+
{intl l="Please check this URL to track your parcel : %tracking_url" tracking_url={$tracking_url}}
+{/if}
+{/if}
+
{intl l="Feel free to contact us for any further information"}
+
+
{intl l="Best Regards."}
\ No newline at end of file
diff --git a/domokits/local/modules/CustomDelivery/templates/email/default/custom-delivery-shipping.txt b/domokits/local/modules/CustomDelivery/templates/email/default/custom-delivery-shipping.txt
new file mode 100644
index 0000000..04f5026
--- /dev/null
+++ b/domokits/local/modules/CustomDelivery/templates/email/default/custom-delivery-shipping.txt
@@ -0,0 +1,18 @@
+{default_translation_domain domain="customdelivery.email.default"}
+
+{loop type="customer" name="customer.order" current="false" id="$customer_id" backend_context="1"}
+ {intl l="Dear" } {$LASTNAME} {$FIRSTNAME},
+{/loop}
+
+{intl l="Thank you for your order on our online store %store_name" store_name={config key="store_name"}}
+
+{intl l="Your order %order_ref dated %order_date has been shipped on %update_date" order_ref={$order_ref} order_date={format_date date=$order_date} update_date={format_date date=$update_date}}
+{if $package}
+{intl l="The tracking number for this delivery is: %package" package={$package}}
+{if $tracking_url}
+{intl l="Please check this URL to track your parcel : %tracking_url" tracking_url={$tracking_url}}
+{/if}
+{/if}
+{intl l="Feel free to contact us for any further information"}
+
+{intl l="Best Regards."}
\ No newline at end of file
diff --git a/domokits/local/modules/FreeOrder/Config/config.xml b/domokits/local/modules/FreeOrder/Config/config.xml
new file mode 100644
index 0000000..42d3733
--- /dev/null
+++ b/domokits/local/modules/FreeOrder/Config/config.xml
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/domokits/local/modules/FreeOrder/Config/module.xml b/domokits/local/modules/FreeOrder/Config/module.xml
new file mode 100644
index 0000000..955d422
--- /dev/null
+++ b/domokits/local/modules/FreeOrder/Config/module.xml
@@ -0,0 +1,27 @@
+
+
+ FreeOrder\FreeOrder
+
+ There's nothing to pay for this order
+ This is a pseudo-payment module for free orders.
+
+
+ Vous n'avez rien à payer pour cette commande
+ Un pseudo-module de paiement pour les commandes de montant nul
+
+
+ en_US
+ fr_FR
+
+ 2.5.4
+
+ Franck Allimant
+ CQFDev
+ franck@cqfdev.fr
+
+ payment
+ 2.5.4
+ alpha
+
diff --git a/domokits/local/modules/FreeOrder/FreeOrder.php b/domokits/local/modules/FreeOrder/FreeOrder.php
new file mode 100644
index 0000000..099ccb3
--- /dev/null
+++ b/domokits/local/modules/FreeOrder/FreeOrder.php
@@ -0,0 +1,45 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace FreeOrder;
+
+use Thelia\Core\Event\Order\OrderEvent;
+use Thelia\Core\Event\TheliaEvents;
+use Thelia\Model\Order;
+use Thelia\Model\OrderStatusQuery;
+use Thelia\Module\AbstractPaymentModule;
+
+class FreeOrder extends AbstractPaymentModule
+{
+ /**
+ * @return bool
+ */
+ public function isValidPayment()
+ {
+ return round($this->getCurrentOrderTotalAmount(), 4) == 0;
+ }
+
+ public function pay(Order $order): void
+ {
+ $event = new OrderEvent($order);
+ $event->setStatus(OrderStatusQuery::getPaidStatus()->getId());
+ $this->getDispatcher()->dispatch($event, TheliaEvents::ORDER_UPDATE_STATUS);
+ }
+
+ /**
+ * @return bool
+ */
+ public function manageStockOnCreation()
+ {
+ return false;
+ }
+}
diff --git a/domokits/local/modules/FreeOrder/LICENSE.txt b/domokits/local/modules/FreeOrder/LICENSE.txt
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/domokits/local/modules/FreeOrder/LICENSE.txt
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/domokits/local/modules/FreeOrder/Readme.md b/domokits/local/modules/FreeOrder/Readme.md
new file mode 100644
index 0000000..6333346
--- /dev/null
+++ b/domokits/local/modules/FreeOrder/Readme.md
@@ -0,0 +1,25 @@
+# Free Order
+
+This module is used to terminate the order process when the order amount is 0,00. In this case, none of the traditional
+payment modules applies.
+
+## Installation
+
+This module is bundled with Thelia standard distribution.
+
+### Manually
+
+* Copy the module into ```/local/modules/``` directory and be sure that the name of the module is FreeOrder.
+* Activate it in your thelia administration panel
+
+### Composer
+
+Add it in your main thelia composer.json file
+
+```
+composer require thelia/free-order-module:~1.0
+```
+
+## Usage
+
+The module is displayed as needed in the payment modules list of the order-invoice page.
\ No newline at end of file
diff --git a/domokits/local/modules/FreeOrder/composer.json b/domokits/local/modules/FreeOrder/composer.json
new file mode 100644
index 0000000..f32437e
--- /dev/null
+++ b/domokits/local/modules/FreeOrder/composer.json
@@ -0,0 +1,11 @@
+{
+ "name": "thelia/free-order-module",
+ "license": "LGPL-3.0+",
+ "type": "thelia-module",
+ "require": {
+ "thelia/installer": "~1.1"
+ },
+ "extra": {
+ "installer-name": "FreeOrder"
+ }
+}
\ No newline at end of file
diff --git a/domokits/local/modules/Front/Config/config.xml b/domokits/local/modules/Front/Config/config.xml
new file mode 100644
index 0000000..4e04106
--- /dev/null
+++ b/domokits/local/modules/Front/Config/config.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ Front/Config/front.xml
+
+ %kernel.cache_dir%
+ %kernel.debug%
+
+
+
+
+
+
diff --git a/domokits/local/modules/Front/Config/front.xml b/domokits/local/modules/Front/Config/front.xml
new file mode 100644
index 0000000..20bea5d
--- /dev/null
+++ b/domokits/local/modules/Front/Config/front.xml
@@ -0,0 +1,276 @@
+
+
+
+
+
+ Thelia\Controller\Front\DefaultController::noAction
+ includes/mini-cart
+
+
+
+ Thelia\Controller\Front\DefaultController::noAction
+ includes/addedToCart
+
+
+
+
+ Front\Controller\CustomerController::viewRegisterAction
+
+
+
+ Front\Controller\CustomerController::createAction
+ register
+
+
+
+
+ Front\Controller\CustomerController::viewLoginAction
+
+
+
+ Front\Controller\CustomerController::loginAction
+ login
+
+
+
+
+ Front\Controller\CustomerController::newPasswordAction
+ password
+
+
+
+ Front\Controller\CustomerController::newPasswordSentAction
+ password
+
+
+
+
+ Front\Controller\CustomerController::logoutAction
+
+
+
+
+ Front\Controller\CustomerController::confirmCustomerAction
+
+
+
+
+
+ Thelia\Controller\Front\DefaultController::noAction
+ account
+
+
+
+ Front\Controller\CustomerController::viewAction
+ account-update
+
+
+
+ Front\Controller\CustomerController::updateAction
+ account-update
+
+
+
+
+ Front\Controller\CustomerController::updatePasswordAction
+ account-password
+
+
+
+ Thelia\Controller\Front\DefaultController::noAction
+ account-password
+
+
+
+ Front\Controller\OrderController::viewAction
+ \d+
+
+
+
+ Front\Controller\OrderController::generateDeliveryPdf
+ \d+
+
+
+
+ Front\Controller\OrderController::generateInvoicePdf
+ \d+
+
+
+
+ Front\Controller\OrderController::downloadVirtualProduct
+ \d+
+
+
+
+
+
+ Thelia\Controller\Front\DefaultController::noAction
+ address
+
+
+
+ Front\Controller\AddressController::createAction
+ address
+
+
+
+ Front\Controller\AddressController::updateViewAction
+ address-update
+
+
+
+ Front\Controller\AddressController::processUpdateAction
+ address-update
+
+
+
+ Front\Controller\AddressController::deleteAction
+ account
+
+
+
+ Front\Controller\AddressController::generateModalAction
+ modal-address
+ \d+
+
+
+
+ Front:Address:makeAddressDefault
+ \d+
+
+
+
+
+
+
+ Thelia\Controller\Front\DefaultController::noAction
+ cart
+
+
+
+ Front\Controller\CartController::addItem
+
+
+
+ Front\Controller\CartController::deleteItem
+ cart
+
+
+
+ Front\Controller\CartController::changeItem
+ cart
+
+
+
+ Front\Controller\CartController::changeCountry
+ cart
+
+
+
+
+
+ Front\Controller\OrderController::deliver
+ order-delivery
+
+
+
+ Front\Controller\OrderController::deliverView
+ order-delivery
+
+
+
+ Front\Controller\OrderController::getDeliveryModuleListAjaxAction
+
+
+
+ Front\Controller\OrderController::invoice
+ order-invoice
+
+
+
+ Thelia\Controller\Front\DefaultController::noAction
+ order-invoice
+
+
+
+ Front\Controller\CouponController::consumeAction
+ order-invoice
+
+
+
+ Front\Controller\CouponController::clearAllCouponsAction
+ order-invoice
+
+
+
+ Front\Controller\OrderController::pay
+
+
+
+ Front\Controller\OrderController::orderPlaced
+ order-placed
+
+
+
+ Front\Controller\OrderController::orderFailed
+ order-failed
+
+
+
+
+
+ Front\Controller\ContactController::sendAction
+ contact
+
+
+
+ Thelia\Controller\Front\DefaultController::noAction
+ contact-success
+
+
+
+
+
+ Front\Controller\NewsletterController::subscribeAction
+ newsletter
+
+
+
+ Front\Controller\NewsletterController::unsubscribeAction
+ newsletter-unsubscribe
+
+
+
+
+
+
+ Front\Controller\SitemapController::generateAction
+
+
+ Front\Controller\SitemapController::generateAction
+
+
+
+
+
+ Front\Controller\FeedController::generateAction
+ catalog
+
+
+
+
+
+
+
+ Thelia\Controller\Front\DefaultController::emptyRoute
+
+
+
+
+ Thelia\Controller\Front\DefaultController::noAction
+ index
+ ^(?!admin|api)[^/]+
+
+
diff --git a/domokits/local/modules/Front/Config/module.xml b/domokits/local/modules/Front/Config/module.xml
new file mode 100644
index 0000000..1d4876f
--- /dev/null
+++ b/domokits/local/modules/Front/Config/module.xml
@@ -0,0 +1,29 @@
+
+
+ Front\Front
+
+ Front integration
+
+
+
+ Front office module
+
+
+
+ en_US
+ fr_FR
+
+ 2.5.4
+
+
+ Thelia team
+ info@thelia.net
+
+
+ classic
+ 2.5.4
+ alpha
+ 1
+
diff --git a/domokits/local/modules/Front/Controller/AddressController.php b/domokits/local/modules/Front/Controller/AddressController.php
new file mode 100644
index 0000000..81426a0
--- /dev/null
+++ b/domokits/local/modules/Front/Controller/AddressController.php
@@ -0,0 +1,257 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Front\Controller;
+
+use Front\Front;
+use Symfony\Component\Form\Form;
+use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
+use Thelia\Controller\Front\BaseFrontController;
+use Thelia\Core\Event\Address\AddressCreateOrUpdateEvent;
+use Thelia\Core\Event\TheliaEvents;
+use Thelia\Form\Definition\FrontForm;
+use Thelia\Form\Exception\FormValidationException;
+use Thelia\Log\Tlog;
+use Thelia\Model\AddressQuery;
+use Thelia\Model\Customer;
+use Thelia\Model\Event\AddressEvent;
+
+/**
+ * Class AddressController.
+ *
+ * @author Manuel Raynaud
+ */
+class AddressController extends BaseFrontController
+{
+ /**
+ * Controller for generate modal containing update form
+ * Check if request is a XmlHttpRequest and address owner is the current customer.
+ */
+ public function generateModalAction($address_id): void
+ {
+ $this->checkAuth();
+ $this->checkXmlHttpRequest();
+ }
+
+ /**
+ * Create controller.
+ * Check if customer is logged in.
+ *
+ * Dispatch TheliaEvents::ADDRESS_CREATE event
+ */
+ public function createAction(EventDispatcherInterface $eventDispatcher)
+ {
+ $this->checkAuth();
+
+ $addressCreate = $this->createForm(FrontForm::ADDRESS_CREATE);
+
+ try {
+ /** @var Customer $customer */
+ $customer = $this->getSecurityContext()->getCustomerUser();
+
+ $form = $this->validateForm($addressCreate, 'post');
+ $event = $this->createAddressEvent($form);
+ $event->setCustomer($customer);
+
+ $eventDispatcher->dispatch($event, TheliaEvents::ADDRESS_CREATE);
+
+ return $this->generateSuccessRedirect($addressCreate);
+ } catch (FormValidationException $e) {
+ $message = $this->getTranslator()->trans('Please check your input: %s', ['%s' => $e->getMessage()], Front::MESSAGE_DOMAIN);
+ } catch (\Exception $e) {
+ $message = $this->getTranslator()->trans('Sorry, an error occured: %s', ['%s' => $e->getMessage()], Front::MESSAGE_DOMAIN);
+ }
+
+ Tlog::getInstance()->error(sprintf('Error during address creation process : %s', $message));
+
+ $addressCreate->setErrorMessage($message);
+
+ $this->getParserContext()
+ ->addForm($addressCreate)
+ ->setGeneralError($message)
+ ;
+
+ // Redirect to error URL if defined
+ if ($addressCreate->hasErrorUrl()) {
+ return $this->generateErrorRedirect($addressCreate);
+ }
+ }
+
+ protected function createAddressEvent(Form $form)
+ {
+ return new AddressCreateOrUpdateEvent(
+ $form->get('label')->getData(),
+ $form->get('title')->getData(),
+ $form->get('firstname')->getData(),
+ $form->get('lastname')->getData(),
+ $form->get('address1')->getData(),
+ $form->get('address2')->getData(),
+ $form->get('address3')->getData(),
+ $form->get('zipcode')->getData(),
+ $form->get('city')->getData(),
+ $form->get('country')->getData(),
+ $form->get('cellphone')->getData(),
+ $form->get('phone')->getData(),
+ $form->get('company')->getData(),
+ $form->get('is_default')->getData(),
+ $form->get('state')->getData()
+ );
+ }
+
+ public function updateViewAction($address_id)
+ {
+ $this->checkAuth();
+
+ $customer = $this->getSecurityContext()->getCustomerUser();
+ $address = AddressQuery::create()->findPk($address_id);
+
+ if (!$address || $customer->getId() != $address->getCustomerId()) {
+ return $this->generateRedirectFromRoute('default');
+ }
+
+ $this->getParserContext()->set('address_id', $address_id);
+ }
+
+ public function processUpdateAction($address_id, EventDispatcherInterface $eventDispatcher)
+ {
+ $this->checkAuth();
+
+ $addressUpdate = $this->createForm(FrontForm::ADDRESS_UPDATE);
+
+ try {
+ $customer = $this->getSecurityContext()->getCustomerUser();
+
+ $form = $this->validateForm($addressUpdate);
+
+ $address = AddressQuery::create()->findPk($address_id);
+
+ if (null === $address) {
+ return $this->generateRedirectFromRoute('default');
+ }
+
+ if ($address->getCustomer()->getId() != $customer->getId()) {
+ return $this->generateRedirectFromRoute('default');
+ }
+
+ $event = $this->createAddressEvent($form);
+ $event->setAddress($address);
+
+ $eventDispatcher->dispatch($event, TheliaEvents::ADDRESS_UPDATE);
+
+ return $this->generateSuccessRedirect($addressUpdate);
+ } catch (FormValidationException $e) {
+ $message = $this->getTranslator()->trans('Please check your input: %s', ['%s' => $e->getMessage()], Front::MESSAGE_DOMAIN);
+ } catch (\Exception $e) {
+ $message = $this->getTranslator()->trans('Sorry, an error occured: %s', ['%s' => $e->getMessage()], Front::MESSAGE_DOMAIN);
+ }
+
+ $this->getParserContext()->set('address_id', $address_id);
+
+ Tlog::getInstance()->error(sprintf('Error during address creation process : %s', $message));
+
+ $addressUpdate->setErrorMessage($message);
+
+ $this->getParserContext()
+ ->addForm($addressUpdate)
+ ->setGeneralError($message)
+ ;
+
+ if ($addressUpdate->hasErrorUrl()) {
+ return $this->generateErrorRedirect($addressUpdate);
+ }
+ }
+
+ public function deleteAction(EventDispatcherInterface $eventDispatcher, $address_id)
+ {
+ $this->checkAuth();
+ $error_message = false;
+
+ $customer = $this->getSecurityContext()->getCustomerUser();
+ $address = AddressQuery::create()->findPk($address_id);
+
+ if (!$address || $customer->getId() != $address->getCustomerId()) {
+ // If Ajax Request
+ if ($this->getRequest()->isXmlHttpRequest()) {
+ return $this->jsonResponse(
+ json_encode(
+ [
+ 'success' => false,
+ 'message' => $this->getTranslator()->trans(
+ 'Error during address deletion process',
+ [],
+ Front::MESSAGE_DOMAIN
+ ),
+ ]
+ )
+ );
+ }
+
+ return $this->generateRedirectFromRoute('default');
+ }
+
+ try {
+ $eventDispatcher->dispatch(new AddressEvent($address), TheliaEvents::ADDRESS_DELETE);
+ } catch (\Exception $e) {
+ $error_message = $e->getMessage();
+ }
+
+ Tlog::getInstance()->error(sprintf('Error during address deletion : %s', $error_message));
+
+ // If Ajax Request
+ if ($this->getRequest()->isXmlHttpRequest()) {
+ if ($error_message) {
+ $response = $this->jsonResponse(json_encode([
+ 'success' => false,
+ 'message' => $error_message,
+ ]));
+ } else {
+ $response = $this->jsonResponse(
+ json_encode([
+ 'success' => true,
+ 'message' => '',
+ ])
+ );
+ }
+
+ return $response;
+ }
+
+ return $this->generateRedirectFromRoute('default', ['view' => 'account']);
+ }
+
+ public function makeAddressDefaultAction(EventDispatcherInterface $eventDispatcher, $addressId)
+ {
+ $this->checkAuth();
+
+ $address = AddressQuery::create()
+ ->filterByCustomerId($this->getSecurityContext()->getCustomerUser()->getId())
+ ->findPk($addressId)
+ ;
+
+ if (null === $address) {
+ $this->pageNotFound();
+ }
+
+ try {
+ $event = new AddressEvent($address);
+ $eventDispatcher->dispatch($event, TheliaEvents::ADDRESS_DEFAULT);
+ } catch (\Exception $e) {
+ $this->getParserContext()
+ ->setGeneralError($e->getMessage())
+ ;
+
+ return $this->render('account');
+ }
+
+ return $this->generateRedirectFromRoute('default', ['view' => 'account']);
+ }
+}
diff --git a/domokits/local/modules/Front/Controller/CartController.php b/domokits/local/modules/Front/Controller/CartController.php
new file mode 100644
index 0000000..edc022b
--- /dev/null
+++ b/domokits/local/modules/Front/Controller/CartController.php
@@ -0,0 +1,241 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Front\Controller;
+
+use Front\Front;
+use Propel\Runtime\Exception\PropelException;
+use Symfony\Component\Form\Extension\Core\Type\FormType;
+use Symfony\Component\HttpFoundation\Cookie;
+use Symfony\Component\HttpFoundation\Request;
+use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
+use Thelia\Controller\Front\BaseFrontController;
+use Thelia\Core\Event\Cart\CartEvent;
+use Thelia\Core\Event\Delivery\DeliveryPostageEvent;
+use Thelia\Core\Event\Order\OrderEvent;
+use Thelia\Core\Event\TheliaEvents;
+use Thelia\Form\CartAdd;
+use Thelia\Form\Definition\FrontForm;
+use Thelia\Form\Exception\FormValidationException;
+use Thelia\Log\Tlog;
+use Thelia\Model\AddressQuery;
+use Thelia\Model\ConfigQuery;
+use Thelia\Tools\URL;
+
+class CartController extends BaseFrontController
+{
+ public function addItem(EventDispatcherInterface $eventDispatcher)
+ {
+ $request = $this->getRequest();
+
+ $cartAdd = $this->getAddCartForm($request);
+ $message = null;
+
+ try {
+ $form = $this->validateForm($cartAdd);
+
+ $cartEvent = $this->getCartEvent($eventDispatcher);
+
+ $cartEvent->bindForm($form);
+
+ $eventDispatcher->dispatch($cartEvent, TheliaEvents::CART_ADDITEM);
+
+ $this->afterModifyCart($eventDispatcher);
+
+ if (!$this->changeViewForAjax()) {
+ if (null !== $response = $this->generateSuccessRedirect($cartAdd)) {
+ return $response;
+ }
+ }
+ } catch (PropelException $e) {
+ Tlog::getInstance()->error(sprintf('Failed to add item to cart with message : %s', $e->getMessage()));
+ $message = $this->getTranslator()->trans(
+ 'Failed to add this article to your cart, please try again',
+ [],
+ Front::MESSAGE_DOMAIN
+ );
+ } catch (FormValidationException $e) {
+ $message = $e->getMessage();
+ }
+
+ if ($message) {
+ $cartAdd->setErrorMessage($message);
+ $this->getParserContext()->addForm($cartAdd);
+ }
+ }
+
+ public function changeItem(EventDispatcherInterface $eventDispatcher)
+ {
+ $cartEvent = $this->getCartEvent($eventDispatcher);
+ $cartEvent->setCartItemId($this->getRequest()->get('cart_item'));
+ $cartEvent->setQuantity($this->getRequest()->get('quantity'));
+
+ try {
+ $this->getTokenProvider()->checkToken(
+ $this->getRequest()->query->get('_token')
+ );
+
+ $eventDispatcher->dispatch($cartEvent, TheliaEvents::CART_UPDATEITEM);
+
+ $this->afterModifyCart($eventDispatcher);
+
+ if (!$this->changeViewForAjax()) {
+ if (null !== $successUrl = $this->getRequest()->get('success_url')) {
+ return $this->generateRedirect(URL::getInstance()->absoluteUrl($successUrl));
+ }
+ }
+ } catch (\Exception $e) {
+ Tlog::getInstance()->error(sprintf('Failed to change cart item quantity: %s', $e->getMessage()));
+
+ $this->getParserContext()->setGeneralError($e->getMessage());
+ }
+ }
+
+ public function deleteItem(EventDispatcherInterface $eventDispatcher)
+ {
+ $cartEvent = $this->getCartEvent($eventDispatcher);
+ $cartEvent->setCartItemId($this->getRequest()->get('cart_item'));
+
+ try {
+ $this->getTokenProvider()->checkToken(
+ $this->getRequest()->query->get('_token')
+ );
+
+ $eventDispatcher->dispatch($cartEvent, TheliaEvents::CART_DELETEITEM);
+
+ $this->afterModifyCart($eventDispatcher);
+ } catch (\Exception $e) {
+ Tlog::getInstance()->error(sprintf('error during deleting cartItem with message : %s', $e->getMessage()));
+ $this->getParserContext()->setGeneralError($e->getMessage());
+ }
+
+ if (!$this->changeViewForAjax()) {
+ if (null !== $successUrl = $this->getRequest()->get('success_url')) {
+ return $this->generateRedirect(URL::getInstance()->absoluteUrl($successUrl));
+ }
+ }
+ }
+
+ protected function changeViewForAjax()
+ {
+ // If this is an ajax request, and if the template allow us to return an ajax result
+ if ($this->getRequest()->isXmlHttpRequest() && (0 === (int) $this->getRequest()->get('no_ajax_check', 0))) {
+ $request = $this->getRequest();
+
+ $view = $request->get('ajax-view', 'includes/mini-cart');
+
+ $request->attributes->set('_view', $view);
+
+ return true;
+ }
+
+ return false;
+ }
+
+ public function changeCountry()
+ {
+ $redirectUrl = URL::getInstance()->absoluteUrl('/cart');
+ $deliveryId = $this->getRequest()->get('country');
+ $cookieName = ConfigQuery::read('front_cart_country_cookie_name', 'fcccn');
+ $cookieExpires = ConfigQuery::read('front_cart_country_cookie_expires', 2592000);
+ $cookieExpires = (int) $cookieExpires ?: 2592000;
+
+ $cookie = new Cookie($cookieName, $deliveryId, time() + $cookieExpires, '/');
+
+ $response = $this->generateRedirect($redirectUrl);
+ $response->headers->setCookie($cookie);
+
+ return $response;
+ }
+
+ /**
+ * @return \Thelia\Core\Event\Cart\CartEvent
+ */
+ protected function getCartEvent(EventDispatcherInterface $eventDispatcher)
+ {
+ $cart = $this->getSession()->getSessionCart($eventDispatcher);
+
+ return new CartEvent($cart);
+ }
+
+ /**
+ * Find the good way to construct the cart form.
+ *
+ * @return CartAdd
+ */
+ private function getAddCartForm(Request $request)
+ {
+ /* @var CartAdd $cartAdd */
+ if ($request->isMethod('post')) {
+ $cartAdd = $this->createForm(FrontForm::CART_ADD);
+ } else {
+ $cartAdd = $this->createForm(
+ FrontForm::CART_ADD,
+ FormType::class,
+ [],
+ [
+ 'csrf_protection' => false,
+ ]
+ );
+ }
+
+ return $cartAdd;
+ }
+
+ /**
+ * @throws PropelException
+ */
+ protected function afterModifyCart(EventDispatcherInterface $eventDispatcher): void
+ {
+ /* recalculate postage amount */
+ $order = $this->getSession()->getOrder();
+ if (null !== $order) {
+ $deliveryModule = $order->getModuleRelatedByDeliveryModuleId();
+ $deliveryAddress = AddressQuery::create()->findPk($order->getChoosenDeliveryAddress());
+
+ if (null !== $deliveryModule && null !== $deliveryAddress) {
+ $moduleInstance = $deliveryModule->getDeliveryModuleInstance($this->container);
+
+ $orderEvent = new OrderEvent($order);
+
+ try {
+ $deliveryPostageEvent = new DeliveryPostageEvent(
+ $moduleInstance,
+ $this->getSession()->getSessionCart($eventDispatcher),
+ $deliveryAddress
+ );
+
+ $eventDispatcher->dispatch(
+ $deliveryPostageEvent,
+ TheliaEvents::MODULE_DELIVERY_GET_POSTAGE,
+ );
+
+ $postage = $deliveryPostageEvent->getPostage();
+
+ if (null !== $postage) {
+ $orderEvent->setPostage($postage->getAmount());
+ $orderEvent->setPostageTax($postage->getAmountTax());
+ $orderEvent->setPostageTaxRuleTitle($postage->getTaxRuleTitle());
+ }
+
+ $eventDispatcher->dispatch($orderEvent, TheliaEvents::ORDER_SET_POSTAGE);
+ } catch (\Exception $ex) {
+ // The postage has been chosen, but changes in the cart causes an exception.
+ // Reset the postage data in the order
+ $orderEvent->setDeliveryModule(0);
+
+ $eventDispatcher->dispatch($orderEvent, TheliaEvents::ORDER_SET_DELIVERY_MODULE);
+ }
+ }
+ }
+ }
+}
diff --git a/domokits/local/modules/Front/Controller/ContactController.php b/domokits/local/modules/Front/Controller/ContactController.php
new file mode 100644
index 0000000..1717f21
--- /dev/null
+++ b/domokits/local/modules/Front/Controller/ContactController.php
@@ -0,0 +1,91 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Front\Controller;
+
+use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
+use Thelia\Controller\Front\BaseFrontController;
+use Thelia\Core\Event\Contact\ContactEvent;
+use Thelia\Core\Event\TheliaEvents;
+use Thelia\Core\Template\ParserContext;
+use Thelia\Core\Translation\Translator;
+use Thelia\Form\Definition\FrontForm;
+use Thelia\Form\Exception\FormValidationException;
+use Thelia\Log\Tlog;
+use Thelia\Mailer\MailerFactory;
+use Thelia\Model\ConfigQuery;
+
+/**
+ * Class ContactController.
+ *
+ * @author Manuel Raynaud
+ * @author Loïc Mo
+ */
+class ContactController extends BaseFrontController
+{
+ /**
+ * Send contact message.
+ */
+ public function sendAction(EventDispatcherInterface $eventDispatcher, MailerFactory $mailer, ParserContext $parserContext)
+ {
+ $translator = Translator::getInstance();
+ $contactForm = $this->createForm(FrontForm::CONTACT);
+
+ try {
+ $form = $this->validateForm($contactForm);
+ $event = new ContactEvent($form);
+ $eventDispatcher->dispatch($event, TheliaEvents::CONTACT_SUBMIT);
+
+ $name = $translator?->trans('Sender name: %name%', ['%name%' => $event->getName()]);
+ $email = $translator?->trans('Sender\'s e-mail address: %email%', ['%email%' => $event->getEmail()]);
+ $message = $translator?->trans('Message content: %message%', ['%message%' => $event->getMessage()]);
+
+ $messageContent =
+ "
$name
\n".
+ "
$email
\n".
+ "
$message
";
+
+ $mailer->sendSimpleEmailMessage(
+ [ConfigQuery::getStoreEmail() => $event->getName()],
+ [ConfigQuery::getStoreEmail() => ConfigQuery::getStoreName()],
+ $event->getSubject(),
+ $messageContent,
+ strip_tags($messageContent),
+ [],
+ [],
+ [$event->getEmail() => $event->getName()]
+ );
+
+ if ($contactForm->hasSuccessUrl()) {
+ return $this->generateSuccessRedirect($contactForm);
+ }
+
+ return $this->generateRedirectFromRoute('contact.success');
+ } catch (FormValidationException $e) {
+ $error_message = $e->getMessage();
+ }
+
+ Tlog::getInstance()->error(sprintf('Error during sending contact mail : %s', $error_message));
+
+ $contactForm->setErrorMessage($error_message);
+
+ $parserContext
+ ->addForm($contactForm)
+ ->setGeneralError($error_message)
+ ;
+
+ // Redirect to error URL if defined
+ if ($contactForm->hasErrorUrl()) {
+ return $this->generateErrorRedirect($contactForm);
+ }
+ }
+}
diff --git a/domokits/local/modules/Front/Controller/CouponController.php b/domokits/local/modules/Front/Controller/CouponController.php
new file mode 100644
index 0000000..3ddb749
--- /dev/null
+++ b/domokits/local/modules/Front/Controller/CouponController.php
@@ -0,0 +1,158 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Front\Controller;
+
+use Front\Front;
+use Propel\Runtime\Exception\PropelException;
+use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
+use Thelia\Controller\Front\BaseFrontController;
+use Thelia\Core\Event\Coupon\CouponConsumeEvent;
+use Thelia\Core\Event\DefaultActionEvent;
+use Thelia\Core\Event\Delivery\DeliveryPostageEvent;
+use Thelia\Core\Event\Order\OrderEvent;
+use Thelia\Core\Event\TheliaEvents;
+use Thelia\Exception\UnmatchableConditionException;
+use Thelia\Form\Definition\FrontForm;
+use Thelia\Form\Exception\FormValidationException;
+use Thelia\Log\Tlog;
+use Thelia\Model\AddressQuery;
+
+/**
+ * Class CouponController.
+ *
+ * @author Guillaume MOREL
+ */
+class CouponController extends BaseFrontController
+{
+ /**
+ * Clear all coupons.
+ */
+ public function clearAllCouponsAction(EventDispatcherInterface $eventDispatcher): void
+ {
+ // Dispatch Event to the Action
+ $eventDispatcher->dispatch(new DefaultActionEvent(), TheliaEvents::COUPON_CLEAR_ALL);
+ }
+
+ /**
+ * Coupon consuming.
+ */
+ public function consumeAction(EventDispatcherInterface $eventDispatcher)
+ {
+ $this->checkCartNotEmpty($eventDispatcher);
+
+ $message = false;
+ $couponCodeForm = $this->createForm(FrontForm::COUPON_CONSUME);
+
+ try {
+ $form = $this->validateForm($couponCodeForm, 'post');
+
+ $couponCode = $form->get('coupon-code')->getData();
+
+ if (null === $couponCode || empty($couponCode)) {
+ $message = true;
+ throw new \Exception(
+ $this->getTranslator()->trans(
+ 'Coupon code can\'t be empty',
+ [],
+ Front::MESSAGE_DOMAIN
+ )
+ );
+ }
+
+ $couponConsumeEvent = new CouponConsumeEvent($couponCode);
+
+ // Dispatch Event to the Action
+ $eventDispatcher->dispatch($couponConsumeEvent, TheliaEvents::COUPON_CONSUME);
+
+ /* recalculate postage amount */
+ $order = $this->getSession()->getOrder();
+
+ if (null !== $order) {
+ $deliveryModule = $order->getModuleRelatedByDeliveryModuleId();
+ $deliveryAddress = AddressQuery::create()->findPk($order->getChoosenDeliveryAddress());
+
+ if (null !== $deliveryModule && null !== $deliveryAddress) {
+ $moduleInstance = $deliveryModule->getDeliveryModuleInstance($this->container);
+
+ $orderEvent = new OrderEvent($order);
+
+ try {
+ $deliveryPostageEvent = new DeliveryPostageEvent(
+ $moduleInstance,
+ $this->getSession()->getSessionCart($eventDispatcher),
+ $deliveryAddress
+ );
+
+ $eventDispatcher->dispatch(
+ $deliveryPostageEvent,
+ TheliaEvents::MODULE_DELIVERY_GET_POSTAGE
+ );
+
+ $postage = $deliveryPostageEvent->getPostage();
+
+ $orderEvent->setPostage($postage->getAmount());
+ $orderEvent->setPostageTax($postage->getAmountTax());
+ $orderEvent->setPostageTaxRuleTitle($postage->getTaxRuleTitle());
+
+ $eventDispatcher->dispatch($orderEvent, TheliaEvents::ORDER_SET_POSTAGE);
+ } catch (\Exception $ex) {
+ // The postage has been chosen, but changes dues to coupon causes an exception.
+ // Reset the postage data in the order
+ $orderEvent->setDeliveryModule(0);
+
+ $eventDispatcher->dispatch($orderEvent, TheliaEvents::ORDER_SET_DELIVERY_MODULE);
+ }
+ }
+ }
+
+ return $this->generateSuccessRedirect($couponCodeForm);
+ } catch (FormValidationException $e) {
+ $message = $this->getTranslator()->trans(
+ 'Please check your coupon code: %message',
+ ['%message' => $e->getMessage()],
+ Front::MESSAGE_DOMAIN
+ );
+ } catch (UnmatchableConditionException $e) {
+ $message = $this->getTranslator()->trans(
+ 'You should sign in or register to use this coupon',
+ [
+ '%sign' => $this->retrieveUrlFromRouteId('customer.login.view'),
+ '%register' => $this->retrieveUrlFromRouteId('customer.create.view'),
+ ],
+ Front::MESSAGE_DOMAIN
+ );
+ } catch (PropelException $e) {
+ $this->getParserContext()->setGeneralError($e->getMessage());
+ } catch (\Exception $e) {
+ $message = $this->getTranslator()->trans(
+ 'Sorry, an error occurred: %message',
+ ['%message' => $e->getMessage()],
+ Front::MESSAGE_DOMAIN
+ );
+ }
+
+ if ($message !== false) {
+ Tlog::getInstance()->error(
+ sprintf('Error during order delivery process : %s. Exception was %s', $message, $e->getMessage())
+ );
+
+ $couponCodeForm->setErrorMessage($message);
+
+ $this->getParserContext()
+ ->addForm($couponCodeForm)
+ ->setGeneralError($message);
+ }
+
+ return $this->generateErrorRedirect($couponCodeForm);
+ }
+}
diff --git a/domokits/local/modules/Front/Controller/CustomerController.php b/domokits/local/modules/Front/Controller/CustomerController.php
new file mode 100644
index 0000000..e64a8f5
--- /dev/null
+++ b/domokits/local/modules/Front/Controller/CustomerController.php
@@ -0,0 +1,595 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Front\Controller;
+
+use Front\Front;
+use Symfony\Component\Form\Extension\Core\Type\FormType;
+use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
+use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
+use Thelia\Controller\Front\BaseFrontController;
+use Thelia\Core\Event\Customer\CustomerCreateOrUpdateEvent;
+use Thelia\Core\Event\Customer\CustomerLoginEvent;
+use Thelia\Core\Event\DefaultActionEvent;
+use Thelia\Core\Event\LostPasswordEvent;
+use Thelia\Core\Event\Newsletter\NewsletterEvent;
+use Thelia\Core\Event\TheliaEvents;
+use Thelia\Core\Security\Authentication\CustomerUsernamePasswordFormAuthenticator;
+use Thelia\Core\Security\Exception\AuthenticationException;
+use Thelia\Core\Security\Exception\CustomerNotConfirmedException;
+use Thelia\Core\Security\Exception\UsernameNotFoundException;
+use Thelia\Core\Security\Exception\WrongPasswordException;
+use Thelia\Form\CustomerLogin;
+use Thelia\Form\Definition\FrontForm;
+use Thelia\Form\Exception\FormValidationException;
+use Thelia\Log\Tlog;
+use Thelia\Model\ConfigQuery;
+use Thelia\Model\Customer;
+use Thelia\Model\CustomerQuery;
+use Thelia\Model\Event\CustomerEvent;
+use Thelia\Model\Newsletter;
+use Thelia\Model\NewsletterQuery;
+use Thelia\Tools\RememberMeTrait;
+use Thelia\Tools\URL;
+
+/**
+ * Class CustomerController.
+ *
+ * @author Manuel Raynaud
+ */
+class CustomerController extends BaseFrontController
+{
+ use RememberMeTrait;
+
+ /**
+ * Display the register template if no customer logged.
+ */
+ public function viewLoginAction()
+ {
+ if ($this->getSecurityContext()->hasCustomerUser()) {
+ // Redirect to home page
+ return $this->generateRedirect(URL::getInstance()->getIndexPage());
+ }
+
+ return $this->render('login');
+ }
+
+ /**
+ * Display the register template if no customer logged.
+ */
+ public function viewRegisterAction()
+ {
+ if ($this->getSecurityContext()->hasCustomerUser()) {
+ // Redirect to home page
+ return $this->generateRedirect(URL::getInstance()->getIndexPage());
+ }
+
+ return $this->render('register');
+ }
+
+ public function newPasswordAction(EventDispatcherInterface $eventDispatcher)
+ {
+ $passwordLost = $this->createForm(FrontForm::CUSTOMER_LOST_PASSWORD);
+
+ if (!$this->getSecurityContext()->hasCustomerUser()) {
+ try {
+ $form = $this->validateForm($passwordLost);
+
+ $event = new LostPasswordEvent($form->get('email')->getData());
+
+ $eventDispatcher->dispatch($event, TheliaEvents::LOST_PASSWORD);
+
+ return $this->generateSuccessRedirect($passwordLost);
+ } catch (FormValidationException $e) {
+ $message = $this->getTranslator()->trans(
+ 'Please check your input: %s',
+ [
+ '%s' => $e->getMessage(),
+ ],
+ Front::MESSAGE_DOMAIN
+ );
+ } catch (\Exception $e) {
+ $message = $this->getTranslator()->trans(
+ 'Sorry, an error occurred: %s',
+ [
+ '%s' => $e->getMessage(),
+ ],
+ Front::MESSAGE_DOMAIN
+ );
+ }
+
+ if ($message !== false) {
+ Tlog::getInstance()->error(
+ sprintf(
+ 'Error during customer creation process : %s. Exception was %s',
+ $message,
+ $e->getMessage()
+ )
+ );
+ }
+ } else {
+ $message = $this->getTranslator()->trans(
+ "You're currently logged in. Please log out before requesting a new password.",
+ [],
+ Front::MESSAGE_DOMAIN
+ );
+ }
+
+ $passwordLost->setErrorMessage($message);
+
+ $this->getParserContext()
+ ->addForm($passwordLost)
+ ->setGeneralError($message)
+ ;
+
+ // Redirect to error URL if defined
+ if ($passwordLost->hasErrorUrl()) {
+ return $this->generateErrorRedirect($passwordLost);
+ }
+ }
+
+ public function newPasswordSentAction(): void
+ {
+ $this->getParser()->assign('password_sent', true);
+ }
+
+ /**
+ * Create a new customer.
+ * On success, redirect to success_url if exists, otherwise, display the same view again.
+ */
+ public function createAction(EventDispatcherInterface $eventDispatcher)
+ {
+ if (!$this->getSecurityContext()->hasCustomerUser()) {
+ $customerCreation = $this->createForm(FrontForm::CUSTOMER_CREATE);
+
+ try {
+ $form = $this->validateForm($customerCreation, 'post');
+
+ $customerCreateEvent = $this->createEventInstance($form->getData());
+
+ $eventDispatcher->dispatch($customerCreateEvent, TheliaEvents::CUSTOMER_CREATEACCOUNT);
+
+ $newCustomer = $customerCreateEvent->getCustomer();
+
+ // Newsletter
+ if (true === $form->get('newsletter')->getData()) {
+ $newsletterEmail = $newCustomer->getEmail();
+ $nlEvent = new NewsletterEvent(
+ $newsletterEmail,
+ $this->getRequest()->getSession()->getLang()->getLocale()
+ );
+ $nlEvent->setFirstname($newCustomer->getFirstname());
+ $nlEvent->setLastname($newCustomer->getLastname());
+
+ // Security : Check if this new Email address already exist
+ if (null !== $newsletter = NewsletterQuery::create()->findOneByEmail($newsletterEmail)) {
+ $nlEvent->setId($newsletter->getId());
+ $eventDispatcher->dispatch($nlEvent, TheliaEvents::NEWSLETTER_UPDATE);
+ } else {
+ $eventDispatcher->dispatch($nlEvent, TheliaEvents::NEWSLETTER_SUBSCRIBE);
+ }
+ }
+
+ if (ConfigQuery::isCustomerEmailConfirmationEnable() && !$newCustomer->getEnable()) {
+ $response = $this->generateRedirectFromRoute('customer.login.view');
+ } else {
+ $this->processLogin($eventDispatcher, $customerCreateEvent->getCustomer());
+
+ $cart = $this->getSession()->getSessionCart($eventDispatcher);
+ if ($cart->getCartItems()->count() > 0) {
+ $response = $this->generateRedirectFromRoute('cart.view');
+ } else {
+ $response = $this->generateSuccessRedirect($customerCreation);
+ }
+ }
+
+ return $response;
+ } catch (FormValidationException $e) {
+ $message = $this->getTranslator()->trans(
+ 'Please check your input: %s',
+ [
+ '%s' => $e->getMessage(),
+ ],
+ Front::MESSAGE_DOMAIN
+ );
+ } catch (\Exception $e) {
+ $message = $this->getTranslator()->trans(
+ 'Sorry, an error occured: %s',
+ [
+ '%s' => $e->getMessage(),
+ ],
+ Front::MESSAGE_DOMAIN
+ );
+ }
+
+ Tlog::getInstance()->error(
+ sprintf(
+ 'Error during customer creation process : %s. Exception was %s',
+ $message,
+ $e->getMessage()
+ )
+ );
+
+ $customerCreation->setErrorMessage($message);
+
+ $this->getParserContext()
+ ->addForm($customerCreation)
+ ->setGeneralError($message)
+ ;
+
+ // Redirect to error URL if defined
+ if ($customerCreation->hasErrorUrl()) {
+ return $this->generateErrorRedirect($customerCreation);
+ }
+ }
+ }
+
+ /**
+ * Prepare customer data update.
+ */
+ public function viewAction(): void
+ {
+ $this->checkAuth();
+
+ /** @var Customer $customer */
+ $customer = $this->getSecurityContext()->getCustomerUser();
+ $newsletter = NewsletterQuery::create()->findOneByEmail($customer->getEmail());
+ $data = [
+ 'id' => $customer->getId(),
+ 'title' => $customer->getTitleId(),
+ 'firstname' => $customer->getFirstName(),
+ 'lastname' => $customer->getLastName(),
+ 'email' => $customer->getEmail(),
+ 'email_confirm' => $customer->getEmail(),
+ 'lang_id' => $customer->getLangId(),
+ 'newsletter' => $newsletter instanceof Newsletter ? !$newsletter->getUnsubscribed() : false,
+ ];
+
+ $customerProfileUpdateForm = $this->createForm(FrontForm::CUSTOMER_PROFILE_UPDATE, FormType::class, $data);
+
+ // Pass it to the parser
+ $this->getParserContext()->addForm($customerProfileUpdateForm);
+ }
+
+ public function updatePasswordAction(EventDispatcherInterface $eventDispatcher)
+ {
+ if ($this->getSecurityContext()->hasCustomerUser()) {
+ $customerPasswordUpdateForm = $this->createForm(FrontForm::CUSTOMER_PASSWORD_UPDATE);
+
+ try {
+ /** @var Customer $customer */
+ $customer = $this->getSecurityContext()->getCustomerUser();
+
+ $form = $this->validateForm($customerPasswordUpdateForm, 'post');
+
+ $customerChangeEvent = $this->createEventInstance($form->getData());
+ $customerChangeEvent->setCustomer($customer);
+ $eventDispatcher->dispatch($customerChangeEvent, TheliaEvents::CUSTOMER_UPDATEPROFILE);
+
+ return $this->generateSuccessRedirect($customerPasswordUpdateForm);
+ } catch (FormValidationException $e) {
+ $message = $this->getTranslator()->trans(
+ 'Please check your input: %s',
+ [
+ '%s' => $e->getMessage(),
+ ],
+ Front::MESSAGE_DOMAIN
+ );
+ } catch (\Exception $e) {
+ $message = $this->getTranslator()->trans(
+ 'Sorry, an error occured: %s',
+ [
+ '%s' => $e->getMessage(),
+ ],
+ Front::MESSAGE_DOMAIN
+ );
+ }
+
+ Tlog::getInstance()->error(
+ sprintf(
+ 'Error during customer password modification process : %s.',
+ $message
+ )
+ );
+
+ $customerPasswordUpdateForm->setErrorMessage($message);
+
+ $this->getParserContext()
+ ->addForm($customerPasswordUpdateForm)
+ ->setGeneralError($message)
+ ;
+
+ // Redirect to error URL if defined
+ if ($customerPasswordUpdateForm->hasErrorUrl()) {
+ return $this->generateErrorRedirect($customerPasswordUpdateForm);
+ }
+ }
+ }
+
+ public function updateAction(EventDispatcherInterface $eventDispatcher)
+ {
+ if ($this->getSecurityContext()->hasCustomerUser()) {
+ $customerProfileUpdateForm = $this->createForm(FrontForm::CUSTOMER_PROFILE_UPDATE);
+
+ try {
+ /** @var Customer $customer */
+ $customer = $this->getSecurityContext()->getCustomerUser();
+ $newsletterOldEmail = $customer->getEmail();
+
+ $form = $this->validateForm($customerProfileUpdateForm, 'post');
+
+ $customerChangeEvent = $this->createEventInstance($form->getData());
+ $customerChangeEvent->setCustomer($customer);
+
+ $customerChangeEvent->setEmailUpdateAllowed(
+ ((int) ConfigQuery::read('customer_change_email', 0)) ? true : false
+ );
+
+ $eventDispatcher->dispatch($customerChangeEvent, TheliaEvents::CUSTOMER_UPDATEPROFILE);
+
+ $updatedCustomer = $customerChangeEvent->getCustomer();
+
+ // Newsletter
+ if (true === $form->get('newsletter')->getData()) {
+ $nlEvent = new NewsletterEvent(
+ $updatedCustomer->getEmail(),
+ $this->getRequest()->getSession()->getLang()->getLocale()
+ );
+ $nlEvent->setFirstname($updatedCustomer->getFirstname());
+ $nlEvent->setLastname($updatedCustomer->getLastname());
+
+ if (null !== $newsletter = NewsletterQuery::create()->findOneByEmail($newsletterOldEmail)) {
+ $nlEvent->setId($newsletter->getId());
+ $eventDispatcher->dispatch($nlEvent, TheliaEvents::NEWSLETTER_UPDATE);
+ } else {
+ $eventDispatcher->dispatch($nlEvent, TheliaEvents::NEWSLETTER_SUBSCRIBE);
+ }
+ } else {
+ if (null !== $newsletter = NewsletterQuery::create()->findOneByEmail($newsletterOldEmail)) {
+ $nlEvent = new NewsletterEvent(
+ $updatedCustomer->getEmail(),
+ $this->getRequest()->getSession()->getLang()->getLocale()
+ );
+ $nlEvent->setId($newsletter->getId());
+ $eventDispatcher->dispatch($nlEvent, TheliaEvents::NEWSLETTER_UNSUBSCRIBE);
+ }
+ }
+
+ $this->processLogin($eventDispatcher, $updatedCustomer);
+
+ return $this->generateSuccessRedirect($customerProfileUpdateForm);
+ } catch (FormValidationException $e) {
+ $message = $this->getTranslator()->trans(
+ 'Please check your input: %s',
+ [
+ '%s' => $e->getMessage(),
+ ],
+ Front::MESSAGE_DOMAIN
+ );
+ } catch (\Exception $e) {
+ $message = $this->getTranslator()->trans(
+ 'Sorry, an error occured: %s',
+ [
+ '%s' => $e->getMessage(),
+ ],
+ Front::MESSAGE_DOMAIN
+ );
+ }
+
+ Tlog::getInstance()->error(sprintf('Error during customer modification process : %s.', $message));
+
+ $customerProfileUpdateForm->setErrorMessage($message);
+
+ $this->getParserContext()
+ ->addForm($customerProfileUpdateForm)
+ ->setGeneralError($message)
+ ;
+
+ // Redirect to error URL if defined
+ if ($customerProfileUpdateForm->hasErrorUrl()) {
+ return $this->generateErrorRedirect($customerProfileUpdateForm);
+ }
+ }
+ }
+
+ /**
+ * Perform user login. On a successful login, the user is redirected to the URL
+ * found in the success_url form parameter, or / if none was found.
+ *
+ * If login is not successfull, the same view is displayed again.
+ */
+ public function loginAction(EventDispatcherInterface $eventDispatcher)
+ {
+ if (!$this->getSecurityContext()->hasCustomerUser()) {
+ $request = $this->getRequest();
+ $customerLoginForm = $this->createForm(CustomerLogin::class);
+
+ try {
+ $form = $this->validateForm($customerLoginForm, 'post');
+
+ // If User is a new customer
+ if ($form->get('account')->getData() == 0 && $form->get('email')->getErrors()->count() == 0) {
+ return $this->generateRedirectFromRoute(
+ 'customer.create.process',
+ ['email' => $form->get('email')->getData()]
+ );
+ }
+ try {
+ $authenticator = new CustomerUsernamePasswordFormAuthenticator($request, $customerLoginForm);
+
+ /** @var Customer $customer */
+ $customer = $authenticator->getAuthentifiedUser();
+
+ $this->processLogin($eventDispatcher, $customer);
+
+ if ((int) $form->get('remember_me')->getData() > 0) {
+ // If a remember me field if present and set in the form, create
+ // the cookie thant store "remember me" information
+ $this->createRememberMeCookie(
+ $customer,
+ $this->getRememberMeCookieName(),
+ $this->getRememberMeCookieExpiration()
+ );
+ }
+
+ return $this->generateSuccessRedirect($customerLoginForm);
+ } catch (UsernameNotFoundException $e) {
+ $message = $this->getTranslator()->trans(
+ 'Wrong email or password. Please try again',
+ [],
+ Front::MESSAGE_DOMAIN
+ );
+ } catch (WrongPasswordException $e) {
+ $message = $this->getTranslator()->trans(
+ 'Wrong email or password. Please try again',
+ [],
+ Front::MESSAGE_DOMAIN
+ );
+ } catch (CustomerNotConfirmedException $e) {
+ if ($e->getUser() !== null) {
+ // Send the confirmation email again
+ $eventDispatcher->dispatch(
+ new CustomerEvent($e->getUser()),
+ TheliaEvents::SEND_ACCOUNT_CONFIRMATION_EMAIL
+ );
+ }
+ $message = $this->getTranslator()->trans(
+ 'Your account is not yet confirmed. A confirmation email has been sent to your email address, please check your mailbox',
+ [],
+ Front::MESSAGE_DOMAIN
+ );
+ } catch (AuthenticationException $e) {
+ $message = $this->getTranslator()->trans(
+ 'Wrong email or password. Please try again',
+ [],
+ Front::MESSAGE_DOMAIN
+ );
+ }
+ } catch (FormValidationException $e) {
+ $message = $this->getTranslator()->trans(
+ 'Please check your input: %s',
+ ['%s' => $e->getMessage()],
+ Front::MESSAGE_DOMAIN
+ );
+ } catch (\Exception $e) {
+ $message = $this->getTranslator()->trans(
+ 'Sorry, an error occured: %s',
+ ['%s' => $e->getMessage()],
+ Front::MESSAGE_DOMAIN
+ );
+ }
+
+ Tlog::getInstance()->error(
+ sprintf(
+ 'Error during customer login process : %s. Exception was %s',
+ $message,
+ $e->getMessage()
+ )
+ );
+
+ $customerLoginForm->setErrorMessage($message);
+
+ $this->getParserContext()->addForm($customerLoginForm);
+
+ if ($customerLoginForm->hasErrorUrl()) {
+ return $this->generateErrorRedirect($customerLoginForm);
+ }
+ }
+ }
+
+ /**
+ * Perform customer logout.
+ */
+ public function logoutAction(EventDispatcherInterface $eventDispatcher)
+ {
+ if ($this->getSecurityContext()->hasCustomerUser()) {
+ $eventDispatcher->dispatch(new DefaultActionEvent(), TheliaEvents::CUSTOMER_LOGOUT);
+ }
+
+ $this->clearRememberMeCookie($this->getRememberMeCookieName());
+
+ // Redirect to home page
+ return $this->generateRedirect(URL::getInstance()->getIndexPage());
+ }
+
+ /**
+ * @throws \Exception
+ * @throws \Propel\Runtime\Exception\PropelException
+ *
+ * @return \Symfony\Component\HttpFoundation\Response
+ */
+ public function confirmCustomerAction($token)
+ {
+ /** @var Customer $customer */
+ if (null === $customer = CustomerQuery::create()->findOneByConfirmationToken($token)) {
+ throw new NotFoundHttpException();
+ }
+
+ $customer
+ ->setEnable(true)
+ ->save()
+ ;
+
+ // Clear form error context
+
+ return $this->generateRedirectFromRoute('customer.login.view', ['validation_done' => 1]);
+ }
+
+ /**
+ * Dispatch event for customer login action.
+ */
+ protected function processLogin(EventDispatcherInterface $eventDispatcher, Customer $customer): void
+ {
+ $eventDispatcher->dispatch(new CustomerLoginEvent($customer), TheliaEvents::CUSTOMER_LOGIN);
+ }
+
+ /**
+ * @return \Thelia\Core\Event\Customer\CustomerCreateOrUpdateEvent
+ */
+ private function createEventInstance($data)
+ {
+ $customerCreateEvent = new CustomerCreateOrUpdateEvent(
+ $data['title'] ?? null,
+ $data['firstname'] ?? null,
+ $data['lastname'] ?? null,
+ $data['address1'] ?? null,
+ $data['address2'] ?? null,
+ $data['address3'] ?? null,
+ $data['phone'] ?? null,
+ $data['cellphone'] ?? null,
+ $data['zipcode'] ?? null,
+ $data['city'] ?? null,
+ $data['country'] ?? null,
+ $data['email'] ?? null,
+ $data['password'] ?? null,
+ $data['lang_id'] ?? $this->getSession()->getLang()->getId(),
+ $data['reseller'] ?? null,
+ $data['sponsor'] ?? null,
+ $data['discount'] ?? null,
+ $data['company'] ?? null,
+ null,
+ $data['state'] ?? null
+ );
+
+ return $customerCreateEvent;
+ }
+
+ protected function getRememberMeCookieName()
+ {
+ return ConfigQuery::read('customer_remember_me_cookie_name', 'crmcn');
+ }
+
+ protected function getRememberMeCookieExpiration()
+ {
+ return ConfigQuery::read('customer_remember_me_cookie_expiration', 2592000 /* 1 month */);
+ }
+}
diff --git a/domokits/local/modules/Front/Controller/FeedController.php b/domokits/local/modules/Front/Controller/FeedController.php
new file mode 100644
index 0000000..86e48b2
--- /dev/null
+++ b/domokits/local/modules/Front/Controller/FeedController.php
@@ -0,0 +1,196 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Front\Controller;
+
+use Symfony\Component\Cache\Adapter\AdapterInterface;
+use Thelia\Controller\Front\BaseFrontController;
+use Thelia\Core\HttpFoundation\Request;
+use Thelia\Core\HttpFoundation\Response;
+use Thelia\Model\BrandQuery;
+use Thelia\Model\CategoryQuery;
+use Thelia\Model\ConfigQuery;
+use Thelia\Model\FolderQuery;
+use Thelia\Model\Lang;
+use Thelia\Model\LangQuery;
+
+/**
+ * Controller uses to generate RSS Feeds.
+ *
+ * A default cache of 2 hours is used to avoid attack. You can flush cache if you have `ADMIN` role and pass flush=1 in
+ * query string parameter.
+ *
+ * @author Julien Chanséaume
+ */
+class FeedController extends BaseFrontController
+{
+ /**
+ * Folder name for feeds cache.
+ */
+ public const FEED_CACHE_DIR = 'feeds';
+
+ /**
+ * Key prefix for feed cache.
+ */
+ public const FEED_CACHE_KEY = 'feed';
+
+ /**
+ * render the RSS feed.
+ *
+ * @param $context string The context of the feed : catalog, content. default: catalog
+ * @param $lang string The lang of the feed : fr_FR, en_US, ... default: default language of the site
+ * @param $id string The id of the parent element. The id of the main parent category for catalog context.
+ * The id of the content folder for content context
+ *
+ * @throws \RuntimeException
+ *
+ * @return Response
+ */
+ public function generateAction($context, $lang, $id)
+ {
+ /** @var Request $request */
+ $request = $this->getRequest();
+
+ // context
+ if ('' === $context) {
+ $context = 'catalog';
+ } elseif (!\in_array($context, ['catalog', 'content', 'brand'])) {
+ $this->pageNotFound();
+ }
+
+ // the locale : fr_FR, en_US,
+ if ('' !== $lang) {
+ if (!$this->checkLang($lang)) {
+ $this->pageNotFound();
+ }
+ } else {
+ try {
+ $lang = Lang::getDefaultLanguage();
+ $lang = $lang->getLocale();
+ } catch (\RuntimeException $ex) {
+ // @todo generate error page
+ throw new \RuntimeException('No default language is defined. Please define one.');
+ }
+ }
+ if (null === $lang = LangQuery::create()->findOneByLocale($lang)) {
+ $this->pageNotFound();
+ }
+ $lang = $lang->getId();
+
+ // check if element exists and is visible
+ if ('' !== $id) {
+ if (false === $this->checkId($context, $id)) {
+ $this->pageNotFound();
+ }
+ }
+
+ $flush = $request->query->get('flush', '');
+
+ /** @var AdapterInterface $cacheAdapter */
+ $cacheAdapter = $this->container->get('thelia.cache');
+
+ $cacheKey = self::FEED_CACHE_KEY.$lang.$context;
+
+ $cacheItem = $cacheAdapter->getItem($cacheKey);
+
+ if (!$cacheItem->isHit() || $flush) {
+ $cacheExpire = (int) (ConfigQuery::read('feed_ttl', '7200')) ?: 7200;
+
+ // render the view
+ $cacheContent = $this->renderRaw(
+ 'feed',
+ [
+ '_context_' => $context,
+ '_lang_' => $lang,
+ '_id_' => $id,
+ ]
+ );
+
+ $cacheItem->expiresAfter($cacheExpire);
+ $cacheItem->set($cacheContent);
+ $cacheAdapter->save($cacheItem);
+ }
+
+ $response = new Response();
+ $response->setContent($cacheItem->get());
+ $response->headers->set('Content-Type', 'application/rss+xml');
+
+ return $response;
+ }
+
+ /**
+ * get the cache directory for feeds.
+ *
+ * @return mixed|string
+ */
+ protected function getCacheDir()
+ {
+ $cacheDir = $this->container->getParameter('kernel.cache_dir');
+ $cacheDir = rtrim($cacheDir, '/');
+ $cacheDir .= '/'.self::FEED_CACHE_DIR.'/';
+
+ return $cacheDir;
+ }
+
+ /**
+ * Check if current user has ADMIN role.
+ *
+ * @return bool
+ */
+ protected function checkAdmin()
+ {
+ return $this->getSecurityContext()->hasAdminUser();
+ }
+
+ /**
+ * Check if a lang is used.
+ *
+ * @param $lang string The lang code. e.g.: fr
+ *
+ * @return bool true if the language is used, otherwise false
+ */
+ private function checkLang($lang)
+ {
+ // load locals
+ $lang = LangQuery::create()
+ ->findOneByLocale($lang);
+
+ return null !== $lang;
+ }
+
+ /**
+ * Check if the element exists and is visible.
+ *
+ * @param $context string catalog or content
+ * @param $id string id of the element
+ *
+ * @return bool
+ */
+ private function checkId($context, $id)
+ {
+ $ret = false;
+ if (is_numeric($id)) {
+ if ('catalog' === $context) {
+ $cat = CategoryQuery::create()->findPk($id);
+ $ret = (null !== $cat && $cat->getVisible());
+ } elseif ('brand' === $context) {
+ $brand = BrandQuery::create()->findPk($id);
+ $ret = (null !== $brand && $brand->getVisible());
+ } else {
+ $folder = FolderQuery::create()->findPk($id);
+ $ret = (null !== $folder && $folder->getVisible());
+ }
+ }
+
+ return $ret;
+ }
+}
diff --git a/domokits/local/modules/Front/Controller/NewsletterController.php b/domokits/local/modules/Front/Controller/NewsletterController.php
new file mode 100644
index 0000000..1d998e8
--- /dev/null
+++ b/domokits/local/modules/Front/Controller/NewsletterController.php
@@ -0,0 +1,154 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Front\Controller;
+
+use Front\Front;
+use Symfony\Component\HttpFoundation\JsonResponse;
+use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
+use Thelia\Controller\Front\BaseFrontController;
+use Thelia\Core\Event\Newsletter\NewsletterEvent;
+use Thelia\Core\Event\TheliaEvents;
+use Thelia\Form\Definition\FrontForm;
+use Thelia\Log\Tlog;
+use Thelia\Model\Customer;
+use Thelia\Model\NewsletterQuery;
+
+/**
+ * Class NewsletterController.
+ *
+ * @author Manuel Raynaud , Franck Allimant
+ */
+class NewsletterController extends BaseFrontController
+{
+ /**
+ * @since 2.3.0-alpha2
+ */
+ public function unsubscribeAction(EventDispatcherInterface $eventDispatcher)
+ {
+ $errorMessage = false;
+
+ $newsletterForm = $this->createForm(FrontForm::NEWSLETTER_UNSUBSCRIBE);
+
+ try {
+ $form = $this->validateForm($newsletterForm);
+
+ $email = $form->get('email')->getData();
+
+ if (null !== $newsletter = NewsletterQuery::create()->findOneByEmail($email)) {
+ $event = new NewsletterEvent(
+ $email,
+ $this->getRequest()->getSession()->getLang()->getLocale()
+ );
+
+ $event->setId($newsletter->getId());
+
+ $eventDispatcher->dispatch($event, TheliaEvents::NEWSLETTER_UNSUBSCRIBE);
+
+ // If a success URL is defined in the form, redirect to it, otherwise use the defaut view
+ if ($newsletterForm->hasSuccessUrl() && !$this->getRequest()->isXmlHttpRequest()) {
+ return $this->generateSuccessRedirect($newsletterForm);
+ }
+ }
+ } catch (\Exception $e) {
+ $errorMessage = $e->getMessage();
+
+ Tlog::getInstance()->error(sprintf('Error during newsletter unsubscription : %s', $errorMessage));
+
+ $newsletterForm->setErrorMessage($errorMessage);
+ }
+
+ // If Ajax Request
+ if ($this->getRequest()->isXmlHttpRequest()) {
+ return new JsonResponse([
+ 'success' => ($errorMessage) ? false : true,
+ 'message' => ($errorMessage) ? $errorMessage : $this->getTranslator()->trans(
+ 'Your subscription to our newsletter has been canceled.',
+ [],
+ Front::MESSAGE_DOMAIN
+ ),
+ ], ($errorMessage) ? 500 : 200);
+ }
+
+ $this->getParserContext()
+ ->setGeneralError($errorMessage)
+ ->addForm($newsletterForm);
+
+ // If an error URL is defined in the form, redirect to it, otherwise use the defaut view
+ if ($errorMessage && $newsletterForm->hasErrorUrl()) {
+ return $this->generateErrorRedirect($newsletterForm);
+ }
+ }
+
+ public function subscribeAction(EventDispatcherInterface $eventDispatcher)
+ {
+ $errorMessage = false;
+
+ $newsletterForm = $this->createForm(FrontForm::NEWSLETTER);
+
+ try {
+ $form = $this->validateForm($newsletterForm);
+
+ $event = new NewsletterEvent(
+ $form->get('email')->getData(),
+ $this->getRequest()->getSession()->getLang()->getLocale()
+ );
+
+ /** @var Customer $customer */
+ if (null !== $customer = $this->getSecurityContext()->getCustomerUser()) {
+ $event
+ ->setFirstname($customer->getFirstname())
+ ->setLastname($customer->getLastname())
+ ;
+ } else {
+ $event
+ ->setFirstname($form->get('firstname')->getData())
+ ->setLastname($form->get('lastname')->getData())
+ ;
+ }
+
+ $eventDispatcher->dispatch($event, TheliaEvents::NEWSLETTER_SUBSCRIBE);
+
+ // If a success URL is defined in the form, redirect to it, otherwise use the defaut view
+ if ($newsletterForm->hasSuccessUrl() && !$this->getRequest()->isXmlHttpRequest()) {
+ return $this->generateSuccessRedirect($newsletterForm);
+ }
+ } catch (\Exception $e) {
+ $errorMessage = $e->getMessage();
+
+ Tlog::getInstance()->error(sprintf('Error during newsletter subscription : %s', $errorMessage));
+
+ $newsletterForm->setErrorMessage($errorMessage);
+ }
+
+ // If Ajax Request
+ if ($this->getRequest()->isXmlHttpRequest()) {
+ return new JsonResponse([
+ 'success' => ($errorMessage) ? false : true,
+ 'message' => ($errorMessage) ? $errorMessage : $this->getTranslator()->trans(
+ "Thanks for signing up! We'll keep you posted whenever we have any new updates.",
+ [],
+ Front::MESSAGE_DOMAIN
+ ),
+ ], ($errorMessage) ? 500 : 200);
+ }
+
+ $this->getParserContext()
+ ->setGeneralError($errorMessage)
+ ->addForm($newsletterForm);
+
+ // If an error URL is defined in the form, redirect to it, otherwise use the defaut view
+ if ($errorMessage && $newsletterForm->hasErrorUrl()) {
+ return $this->generateErrorRedirect($newsletterForm);
+ }
+ }
+}
diff --git a/domokits/local/modules/Front/Controller/OrderController.php b/domokits/local/modules/Front/Controller/OrderController.php
new file mode 100644
index 0000000..35967bd
--- /dev/null
+++ b/domokits/local/modules/Front/Controller/OrderController.php
@@ -0,0 +1,591 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Front\Controller;
+
+use Front\Front;
+use Propel\Runtime\ActiveQuery\Criteria;
+use Propel\Runtime\Exception\PropelException;
+use Symfony\Component\HttpFoundation\Response as BaseResponse;
+use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
+use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
+use Thelia\Controller\Front\BaseFrontController;
+use Thelia\Core\Event\Delivery\DeliveryPostageEvent;
+use Thelia\Core\Event\Order\OrderEvent;
+use Thelia\Core\Event\Product\VirtualProductOrderDownloadResponseEvent;
+use Thelia\Core\Event\TheliaEvents;
+use Thelia\Core\HttpFoundation\Request;
+use Thelia\Exception\TheliaProcessException;
+use Thelia\Form\Definition\FrontForm;
+use Thelia\Form\Exception\FormValidationException;
+use Thelia\Log\Tlog;
+use Thelia\Model\Address;
+use Thelia\Model\AddressQuery;
+use Thelia\Model\AreaDeliveryModuleQuery;
+use Thelia\Model\ConfigQuery;
+use Thelia\Model\ModuleQuery;
+use Thelia\Model\Order;
+use Thelia\Model\OrderProductQuery;
+use Thelia\Model\OrderQuery;
+use Thelia\Module\AbstractDeliveryModule;
+use Thelia\Module\Exception\DeliveryException;
+
+/**
+ * Class OrderController.
+ *
+ * @author Etienne Roudeix
+ */
+class OrderController extends BaseFrontController
+{
+ /**
+ * Check if the cart contains only virtual products.
+ */
+ public function deliverView(EventDispatcherInterface $eventDispatcher)
+ {
+ $this->checkAuth();
+ $this->checkCartNotEmpty($eventDispatcher);
+
+ // check if the cart contains only virtual products
+ $cart = $this->getSession()->getSessionCart($eventDispatcher);
+
+ $deliveryAddress = $this->getCustomerAddress();
+
+ if ($cart->isVirtual()) {
+ if (null !== $deliveryAddress) {
+ $deliveryModule = ModuleQuery::create()->retrieveVirtualProductDelivery($this->container);
+
+ if (false === $deliveryModule) {
+ Tlog::getInstance()->error(
+ $this->getTranslator()->trans(
+ 'To enable the virtual product feature, the VirtualProductDelivery module should be activated',
+ [],
+ Front::MESSAGE_DOMAIN
+ )
+ );
+ } elseif (\count($deliveryModule) == 1) {
+ return $this->registerVirtualProductDelivery($eventDispatcher, $deliveryModule[0], $deliveryAddress);
+ }
+ }
+ }
+
+ return $this->render(
+ 'order-delivery',
+ [
+ 'delivery_address_id' => (null !== $deliveryAddress) ? $deliveryAddress->getId() : null,
+ ]
+ );
+ }
+
+ /**
+ * @param AbstractDeliveryModule $moduleInstance
+ * @param Address $deliveryAddress
+ *
+ * @return \Symfony\Component\HttpFoundation\Response
+ */
+ private function registerVirtualProductDelivery(EventDispatcherInterface $eventDispatcher, $moduleInstance, $deliveryAddress)
+ {
+ /* get postage amount */
+ $deliveryModule = $moduleInstance->getModuleModel();
+ $cart = $this->getSession()->getSessionCart($eventDispatcher);
+ $deliveryPostageEvent = new DeliveryPostageEvent($moduleInstance, $cart, $deliveryAddress);
+
+ $eventDispatcher->dispatch(
+ $deliveryPostageEvent,
+ TheliaEvents::MODULE_DELIVERY_GET_POSTAGE
+ );
+
+ $postage = $deliveryPostageEvent->getPostage();
+
+ $orderEvent = $this->getOrderEvent();
+ $orderEvent->setDeliveryAddress($deliveryAddress->getId());
+ $orderEvent->setDeliveryModule($deliveryModule->getId());
+ $orderEvent->setPostage($postage->getAmount());
+ $orderEvent->setPostageTax($postage->getAmountTax());
+ $orderEvent->setPostageTaxRuleTitle($postage->getTaxRuleTitle());
+
+ $eventDispatcher->dispatch($orderEvent, TheliaEvents::ORDER_SET_DELIVERY_ADDRESS);
+ $eventDispatcher->dispatch($orderEvent, TheliaEvents::ORDER_SET_DELIVERY_MODULE);
+ $eventDispatcher->dispatch($orderEvent, TheliaEvents::ORDER_SET_POSTAGE);
+
+ return $this->generateRedirectFromRoute('order.invoice');
+ }
+
+ /**
+ * set delivery address
+ * set delivery module.
+ */
+ public function deliver(EventDispatcherInterface $eventDispatcher)
+ {
+ $this->checkAuth();
+ $this->checkCartNotEmpty($eventDispatcher);
+
+ $message = false;
+
+ $orderDelivery = $this->createForm(FrontForm::ORDER_DELIVER);
+
+ try {
+ $form = $this->validateForm($orderDelivery, 'post');
+
+ $deliveryAddressId = $form->get('delivery-address')->getData();
+ $deliveryModuleId = $form->get('delivery-module')->getData();
+ $deliveryAddress = AddressQuery::create()->findPk($deliveryAddressId);
+ $deliveryModule = ModuleQuery::create()->findPk($deliveryModuleId);
+
+ /* check that the delivery address belongs to the current customer */
+ if ($deliveryAddress->getCustomerId() !== $this->getSecurityContext()->getCustomerUser()->getId()) {
+ throw new \Exception(
+ $this->getTranslator()->trans(
+ 'Delivery address does not belong to the current customer',
+ [],
+ Front::MESSAGE_DOMAIN
+ )
+ );
+ }
+
+ /* check that the delivery module fetches the delivery address area */
+ if (null === AreaDeliveryModuleQuery::create()->findByCountryAndModule(
+ $deliveryAddress->getCountry(),
+ $deliveryModule,
+ $deliveryAddress->getState()
+ )) {
+ throw new \Exception(
+ $this->getTranslator()->trans(
+ 'Delivery module cannot be use with selected delivery address',
+ [],
+ Front::MESSAGE_DOMAIN
+ )
+ );
+ }
+
+ /* get postage amount */
+ $moduleInstance = $deliveryModule->getDeliveryModuleInstance($this->container);
+
+ $cart = $this->getSession()->getSessionCart($eventDispatcher);
+ $deliveryPostageEvent = new DeliveryPostageEvent($moduleInstance, $cart, $deliveryAddress);
+
+ $eventDispatcher->dispatch(
+ $deliveryPostageEvent,
+ TheliaEvents::MODULE_DELIVERY_GET_POSTAGE
+ );
+
+ if (!$deliveryPostageEvent->isValidModule() || null === $deliveryPostageEvent->getPostage()) {
+ throw new DeliveryException(
+ $this->getTranslator()->trans('The delivery module is not valid.', [], Front::MESSAGE_DOMAIN)
+ );
+ }
+
+ $postage = $deliveryPostageEvent->getPostage();
+
+ $orderEvent = $this->getOrderEvent();
+ $orderEvent->setDeliveryAddress($deliveryAddressId);
+ $orderEvent->setDeliveryModule($deliveryModuleId);
+ $orderEvent->setPostage($postage->getAmount());
+ $orderEvent->setPostageTax($postage->getAmountTax());
+ $orderEvent->setPostageTaxRuleTitle($postage->getTaxRuleTitle());
+
+ $eventDispatcher->dispatch($orderEvent, TheliaEvents::ORDER_SET_DELIVERY_ADDRESS);
+ $eventDispatcher->dispatch($orderEvent, TheliaEvents::ORDER_SET_DELIVERY_MODULE);
+ $eventDispatcher->dispatch($orderEvent, TheliaEvents::ORDER_SET_POSTAGE);
+
+ return $this->generateRedirectFromRoute('order.invoice');
+ } catch (FormValidationException $e) {
+ $message = $this->getTranslator()->trans(
+ 'Please check your input: %s',
+ ['%s' => $e->getMessage()],
+ Front::MESSAGE_DOMAIN
+ );
+ } catch (PropelException $e) {
+ $this->getParserContext()->setGeneralError($e->getMessage());
+ } catch (\Exception $e) {
+ $message = $this->getTranslator()->trans(
+ 'Sorry, an error occured: %s',
+ ['%s' => $e->getMessage()],
+ Front::MESSAGE_DOMAIN
+ );
+ }
+
+ if ($message !== false) {
+ Tlog::getInstance()->error(
+ sprintf('Error during order delivery process : %s. Exception was %s', $message, $e->getMessage())
+ );
+
+ $orderDelivery->setErrorMessage($message);
+
+ $this->getParserContext()
+ ->addForm($orderDelivery)
+ ->setGeneralError($message)
+ ;
+ }
+ }
+
+ /**
+ * set invoice address
+ * set payment module.
+ */
+ public function invoice(EventDispatcherInterface $eventDispatcher)
+ {
+ $this->checkAuth();
+ $this->checkCartNotEmpty($eventDispatcher);
+ $this->checkValidDelivery();
+
+ $message = false;
+
+ $orderPayment = $this->createForm(FrontForm::ORDER_PAYMENT);
+
+ try {
+ $form = $this->validateForm($orderPayment, 'post');
+
+ $invoiceAddressId = $form->get('invoice-address')->getData();
+ $paymentModuleId = $form->get('payment-module')->getData();
+
+ /* check that the invoice address belongs to the current customer */
+ $invoiceAddress = AddressQuery::create()->findPk($invoiceAddressId);
+ if ($invoiceAddress->getCustomerId() !== $this->getSecurityContext()->getCustomerUser()->getId()) {
+ throw new \Exception(
+ $this->getTranslator()->trans(
+ 'Invoice address does not belong to the current customer',
+ [],
+ Front::MESSAGE_DOMAIN
+ )
+ );
+ }
+
+ $orderEvent = $this->getOrderEvent();
+ $orderEvent->setInvoiceAddress($invoiceAddressId);
+ $orderEvent->setPaymentModule($paymentModuleId);
+
+ $eventDispatcher->dispatch($orderEvent, TheliaEvents::ORDER_SET_INVOICE_ADDRESS);
+ $eventDispatcher->dispatch($orderEvent, TheliaEvents::ORDER_SET_PAYMENT_MODULE);
+
+ return $this->generateRedirectFromRoute('order.payment.process');
+ } catch (FormValidationException $e) {
+ $message = $this->getTranslator()->trans(
+ 'Please check your input: %s',
+ ['%s' => $e->getMessage()],
+ Front::MESSAGE_DOMAIN
+ );
+ } catch (PropelException $e) {
+ $this->getParserContext()->setGeneralError($e->getMessage());
+ } catch (\Exception $e) {
+ $message = $this->getTranslator()->trans(
+ 'Sorry, an error occured: %s',
+ ['%s' => $e->getMessage()],
+ Front::MESSAGE_DOMAIN
+ );
+ }
+
+ if ($message !== false) {
+ Tlog::getInstance()->error(
+ sprintf('Error during order payment process : %s. Exception was %s', $message, $e->getMessage())
+ );
+
+ $orderPayment->setErrorMessage($message);
+
+ $this->getParserContext()
+ ->addForm($orderPayment)
+ ->setGeneralError($message)
+ ;
+ }
+
+ return $this->generateErrorRedirect($orderPayment);
+ }
+
+ public function pay(EventDispatcherInterface $eventDispatcher)
+ {
+ /* check customer */
+ $this->checkAuth();
+
+ /* check cart count */
+ $this->checkCartNotEmpty($eventDispatcher);
+
+ /* check stock not empty */
+ if (true === ConfigQuery::checkAvailableStock()) {
+ if (null !== $response = $this->checkStockNotEmpty($eventDispatcher)) {
+ return $response;
+ }
+ }
+
+ /* check delivery address and module */
+ $this->checkValidDelivery();
+
+ /* check invoice address and payment module */
+ $this->checkValidInvoice();
+
+ $orderEvent = $this->getOrderEvent();
+
+ $eventDispatcher->dispatch($orderEvent, TheliaEvents::ORDER_PAY);
+
+ $placedOrder = $orderEvent->getPlacedOrder();
+
+ if (null !== $placedOrder && null !== $placedOrder->getId()) {
+ /* order has been placed */
+ if ($orderEvent->hasResponse()) {
+ return $orderEvent->getResponse();
+ }
+
+ return $this->generateRedirectFromRoute(
+ 'order.placed',
+ [],
+ ['order_id' => $orderEvent->getPlacedOrder()->getId()]
+ );
+ }
+
+ /* order has not been placed */
+ return $this->generateRedirectFromRoute('cart.view');
+ }
+
+ public function orderPlaced(EventDispatcherInterface $eventDispatcher, $order_id): void
+ {
+ /* check if the placed order matched the customer */
+ $placedOrder = OrderQuery::create()->findPk(
+ $this->getRequest()->attributes->get('order_id')
+ );
+
+ if (null === $placedOrder) {
+ throw new TheliaProcessException(
+ $this->getTranslator()->trans(
+ 'No placed order',
+ [],
+ Front::MESSAGE_DOMAIN
+ ),
+ TheliaProcessException::NO_PLACED_ORDER,
+ $placedOrder
+ );
+ }
+
+ $customer = $this->getSecurityContext()->getCustomerUser();
+
+ if (null === $customer || $placedOrder->getCustomerId() !== $customer->getId()) {
+ throw new TheliaProcessException(
+ $this->getTranslator()->trans(
+ 'Received placed order id does not belong to the current customer',
+ [],
+ Front::MESSAGE_DOMAIN
+ ),
+ TheliaProcessException::PLACED_ORDER_ID_BAD_CURRENT_CUSTOMER,
+ $placedOrder
+ );
+ }
+
+ $eventDispatcher->dispatch($this->getOrderEvent(), TheliaEvents::ORDER_CART_CLEAR);
+
+ $this->getParserContext()->set('placed_order_id', $placedOrder->getId());
+ }
+
+ public function orderFailed($order_id, $message): void
+ {
+ if (empty($order_id)) {
+ // Fallback to request parameter if the method parameter is empty.
+ $order_id = $this->getRequest()->get('order_id');
+ }
+
+ $failedOrder = OrderQuery::create()->findPk($order_id);
+
+ if (null !== $failedOrder) {
+ $customer = $this->getSecurityContext()->getCustomerUser();
+
+ if (null === $customer || $failedOrder->getCustomerId() !== $customer->getId()) {
+ throw new TheliaProcessException(
+ $this->getTranslator()->trans(
+ 'Received failed order id does not belong to the current customer',
+ [],
+ Front::MESSAGE_DOMAIN
+ ),
+ TheliaProcessException::PLACED_ORDER_ID_BAD_CURRENT_CUSTOMER,
+ $failedOrder
+ );
+ }
+ } else {
+ Tlog::getInstance()->warning("Failed order ID '$order_id' not found.");
+ }
+
+ $this->getParserContext()
+ ->set('failed_order_id', $order_id)
+ ->set('failed_order_message', $message)
+ ;
+ }
+
+ protected function getOrderEvent()
+ {
+ $order = $this->getOrder($this->getRequest());
+
+ return new OrderEvent($order);
+ }
+
+ public function getOrder(Request $request)
+ {
+ $session = $request->getSession();
+
+ if (null !== $order = $session->getOrder()) {
+ return $order;
+ }
+
+ $order = new Order();
+
+ $session->setOrder($order);
+
+ return $order;
+ }
+
+ public function viewAction($order_id)
+ {
+ $this->checkOrderCustomer($order_id);
+
+ return $this->render('account-order', ['order_id' => $order_id]);
+ }
+
+ public function generateInvoicePdf(EventDispatcherInterface $eventDispatcher, $order_id)
+ {
+ $this->checkOrderCustomer($order_id);
+
+ return $this->generateOrderPdf($eventDispatcher, $order_id, ConfigQuery::read('pdf_invoice_file', 'invoice'));
+ }
+
+ public function generateDeliveryPdf(EventDispatcherInterface $eventDispatcher, $order_id)
+ {
+ $this->checkOrderCustomer($order_id);
+
+ return $this->generateOrderPdf($eventDispatcher, $order_id, ConfigQuery::read('pdf_delivery_file', 'delivery'));
+ }
+
+ public function downloadVirtualProduct(EventDispatcherInterface $eventDispatcher, $order_product_id)
+ {
+ if (null !== $orderProduct = OrderProductQuery::create()->findPk($order_product_id)) {
+ $order = $orderProduct->getOrder();
+
+ if ($order->isPaid(false)) {
+ // check customer
+ $this->checkOrderCustomer($order->getId());
+
+ $virtualProductEvent = new VirtualProductOrderDownloadResponseEvent($orderProduct);
+ $eventDispatcher->dispatch(
+ $virtualProductEvent,
+ TheliaEvents::VIRTUAL_PRODUCT_ORDER_DOWNLOAD_RESPONSE
+ );
+
+ $response = $virtualProductEvent->getResponse();
+
+ if (!$response instanceof BaseResponse) {
+ throw new \RuntimeException('A Response must be added in the event TheliaEvents::VIRTUAL_PRODUCT_ORDER_DOWNLOAD_RESPONSE');
+ }
+
+ return $response;
+ }
+ }
+
+ throw new AccessDeniedHttpException();
+ }
+
+ private function checkOrderCustomer($order_id): void
+ {
+ $this->checkAuth();
+
+ $order = OrderQuery::create()->findPk($order_id);
+ $valid = true;
+ if ($order) {
+ $customerOrder = $order->getCustomer();
+ $customer = $this->getSecurityContext()->getCustomerUser();
+
+ if ($customerOrder->getId() != $customer->getId()) {
+ $valid = false;
+ }
+ } else {
+ $valid = false;
+ }
+
+ if (false === $valid) {
+ throw new AccessDeniedHttpException();
+ }
+ }
+
+ public function getDeliveryModuleListAjaxAction()
+ {
+ $this->checkXmlHttpRequest();
+
+ // Change the delivery address if customer has changed it
+ $address = null;
+ $session = $this->getSession();
+ $addressId = $this->getRequest()->get('address_id', null);
+ if (null !== $addressId && $addressId !== $session->getOrder()->getChoosenDeliveryAddress()) {
+ $address = AddressQuery::create()->findPk($addressId);
+ if (null !== $address && $address->getCustomerId() === $session->getCustomerUser()->getId()) {
+ $session->getOrder()->setChoosenDeliveryAddress($addressId);
+ }
+ }
+
+ $address = AddressQuery::create()->findPk($session->getOrder()->getChoosenDeliveryAddress());
+
+ $countryId = $address->getCountryId();
+ $stateId = $address->getStateId();
+
+ $args = [
+ 'country' => $countryId,
+ 'state' => $stateId,
+ 'address' => $session->getOrder()->getChoosenDeliveryAddress(),
+ ];
+
+ return $this->render('ajax/order-delivery-module-list', $args);
+ }
+
+ /**
+ * Redirect to cart view if at least one non product is out of stock.
+ *
+ * @return BaseResponse|null
+ */
+ private function checkStockNotEmpty(EventDispatcherInterface $eventDispatcher)
+ {
+ $cart = $this->getSession()->getSessionCart($eventDispatcher);
+
+ $cartItems = $cart->getCartItems();
+
+ foreach ($cartItems as $cartItem) {
+ $pse = $cartItem->getProductSaleElements();
+
+ $product = $cartItem->getProduct();
+
+ if ($pse->getQuantity() <= 0 && $product->getVirtual() !== 1) {
+ return $this->generateRedirectFromRoute('cart.view');
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Retrieve the chosen delivery address for a cart or the default customer address if not exists.
+ *
+ * @return Address|null
+ */
+ protected function getCustomerAddress()
+ {
+ $deliveryAddress = null;
+ $addressId = $this->getSession()->getOrder()->getChoosenDeliveryAddress();
+ if (null === $addressId) {
+ $customer = $this->getSecurityContext()->getCustomerUser();
+
+ $deliveryAddress = AddressQuery::create()
+ ->filterByCustomerId($customer->getId())
+ ->orderByIsDefault(Criteria::DESC)
+ ->findOne();
+
+ if (null !== $deliveryAddress) {
+ $this->getSession()->getOrder()->setChoosenDeliveryAddress(
+ $deliveryAddress->getId()
+ );
+ }
+ } else {
+ $deliveryAddress = AddressQuery::create()->findPk($addressId);
+ }
+
+ return $deliveryAddress;
+ }
+}
diff --git a/domokits/local/modules/Front/Controller/SitemapController.php b/domokits/local/modules/Front/Controller/SitemapController.php
new file mode 100644
index 0000000..5c18554
--- /dev/null
+++ b/domokits/local/modules/Front/Controller/SitemapController.php
@@ -0,0 +1,144 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Front\Controller;
+
+use Symfony\Component\Cache\Adapter\AdapterInterface;
+use Thelia\Controller\Front\BaseFrontController;
+use Thelia\Core\HttpFoundation\Request;
+use Thelia\Core\HttpFoundation\Response;
+use Thelia\Model\ConfigQuery;
+use Thelia\Model\LangQuery;
+
+/**
+ * Controller uses to generate sitemap.xml.
+ *
+ * A default cache of 2 hours is used to avoid attack. You can flush cache if you have `ADMIN` role and pass flush=1 in
+ * query string parameter.
+ *
+ * You can generate sitemap according to specific language and/or specific context (catalog/content). You have to
+ * use ```lang``` and ```context``` query string parameters to do so. If a language is not used in website or if the
+ * context is not supported the page not found is displayed.
+ *
+ * {url}/sitemap?lang=fr&context=catalog will generate a sitemap for catalog (categories and products)
+ * for french language.
+ *
+ * @author Julien Chanséaume
+ */
+class SitemapController extends BaseFrontController
+{
+ /**
+ * Folder name for sitemap cache.
+ */
+ public const SITEMAP_CACHE_DIR = 'sitemap';
+
+ /**
+ * Key prefix for sitemap cache.
+ */
+ public const SITEMAP_CACHE_KEY = 'sitemap';
+
+ /**
+ * @return Response
+ */
+ public function generateAction()
+ {
+ /** @var Request $request */
+ $request = $this->getRequest();
+
+ // the locale : fr, en,
+ $lang = $request->query->get('lang', '');
+ if ('' !== $lang) {
+ if (!$this->checkLang($lang)) {
+ $this->pageNotFound();
+ }
+ }
+
+ // specific content : product, category, cms
+ $context = $request->query->get('context', '');
+ if (!\in_array($context, ['', 'catalog', 'content'])) {
+ $this->pageNotFound();
+ }
+
+ $flush = $request->query->get('flush', '');
+
+ /** @var AdapterInterface $cacheAdapter */
+ $cacheAdapter = $this->container->get('thelia.cache');
+
+ $cacheKey = self::SITEMAP_CACHE_KEY.$lang.$context;
+
+ $cacheItem = $cacheAdapter->getItem($cacheKey);
+
+ if (!$cacheItem->isHit() || $flush) {
+ $cacheExpire = (int) (ConfigQuery::read('sitemap_ttl', '7200')) ?: 7200;
+
+ // Render the view. Compression causes problems and is deactivated.
+ $cacheContent = $this->getParser(null)->render(
+ 'sitemap.html',
+ [
+ '_lang_' => $lang,
+ '_context_' => $context,
+ ],
+ false
+ );
+
+ $cacheItem->expiresAfter($cacheExpire);
+ $cacheItem->set($cacheContent);
+ $cacheAdapter->save($cacheItem);
+ }
+
+ $response = new Response();
+ $response->setContent($cacheItem->get());
+ $response->headers->set('Content-Type', 'application/xml');
+
+ return $response;
+ }
+
+ /**
+ * get the cache directory for sitemap.
+ *
+ * @return mixed|string
+ */
+ protected function getCacheDir()
+ {
+ $cacheDir = $this->container->getParameter('kernel.cache_dir');
+ $cacheDir = rtrim($cacheDir, '/');
+ $cacheDir .= '/'.self::SITEMAP_CACHE_DIR.'/';
+
+ return $cacheDir;
+ }
+
+ /**
+ * Check if current user has ADMIN role.
+ *
+ * @return bool
+ */
+ protected function checkAdmin()
+ {
+ return $this->getSecurityContext()->hasAdminUser();
+ }
+
+ /**
+ * Check if a lang is used.
+ *
+ * @param $lang The lang code. e.g.: fr
+ *
+ * @return bool true if the language is used, otherwise false
+ */
+ private function checkLang($lang)
+ {
+ // load locals
+ $lang = LangQuery::create()
+ ->findOneByCode($lang);
+
+ return null !== $lang;
+ }
+}
diff --git a/domokits/local/modules/Front/Front.php b/domokits/local/modules/Front/Front.php
new file mode 100644
index 0000000..f58c4f7
--- /dev/null
+++ b/domokits/local/modules/Front/Front.php
@@ -0,0 +1,32 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Front;
+
+use Symfony\Component\DependencyInjection\Loader\Configurator\ServicesConfigurator;
+use Thelia\Module\BaseModule;
+
+class Front extends BaseModule
+{
+ public const MESSAGE_DOMAIN = 'front';
+
+ /**
+ * Defines how services are loaded in your modules.
+ */
+ public static function configureServices(ServicesConfigurator $servicesConfigurator): void
+ {
+ $servicesConfigurator->load(self::getModuleCode().'\\', __DIR__)
+ ->exclude([THELIA_MODULE_DIR.ucfirst(self::getModuleCode()).'/I18n/*'])
+ ->autowire(true)
+ ->autoconfigure(true);
+ }
+}
diff --git a/domokits/local/modules/Front/I18n/de_DE.php b/domokits/local/modules/Front/I18n/de_DE.php
new file mode 100644
index 0000000..d32e2b4
--- /dev/null
+++ b/domokits/local/modules/Front/I18n/de_DE.php
@@ -0,0 +1,32 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Coupon code can\'t be empty' => 'Gutschein-Code darf nicht leer sein',
+ 'Delivery address does not belong to the current customer' => 'Lieferadresse gehört nicht zum aktuellen Kunden',
+ 'Delivery module cannot be use with selected delivery address' => 'Lieferung-Modul kann nicht mit ausgewählten Lieferadresse verwendet werden',
+ 'Error during address deletion process' => 'Fehler beim Löschen der Adresse',
+ 'Failed to add this article to your cart, please try again' => 'Der Artikel konnte nicht zum Warenkorb hinzugefügt werden, bitte versuchen Sie es erneut',
+ 'Invoice address does not belong to the current customer' => 'Rechnungsadresse gehört nicht zum aktuellen Kunden',
+ 'No placed order' => 'Keine Bestellungen',
+ 'Please check your coupon code: %message' => 'Bitte überprüfen Sie Ihren Gutschein-Code: %message',
+ 'Please check your input: %s' => 'Bitte überprüfen Sie Ihre Eingabe: %s',
+ 'Received failed order id does not belong to the current customer' => 'Empfangene Id einer fehlgeschlagenen Bestellung gehört nicht zum aktuellen Kunden',
+ 'Received placed order id does not belong to the current customer' => 'Empfangene Bestellungs-Id gehört nicht zum aktuellen Kunden',
+ 'Sorry, an error occured: %s' => 'Leider ist ein Fehler aufgetreten: %s',
+ 'Sorry, an error occurred: %message' => 'Leider ist ein Fehler aufgetreten: %message',
+ 'Sorry, an error occurred: %s' => 'Es tut uns Leid, aber ein Fehler ist aufgetreten: %s',
+ 'Thanks for signing up! We\'ll keep you posted whenever we have any new updates.' => 'Vielen Dank für Ihre Anmeldung! Wir halten Ihnen auf dem Laufenden über neuen Updates.',
+ 'To enable the virtual product feature, the VirtualProductDelivery module should be activated' => 'Um das virtuelle Produkt-Feature zu aktivieren, sollte das VirtualProductDelivery-Modul aktiviert werden',
+ 'Wrong email or password. Please try again' => 'E-Mail oder Passwort falsch. Bitte erneut versuchen',
+ 'You\'re currently logged in. Please log out before requesting a new password.' => 'Sie sind derzeit angemeldet. Bitte melden Sie sich ab, bevor Sie ein neues Passwort anfordern.',
+];
diff --git a/domokits/local/modules/Front/I18n/en_US.php b/domokits/local/modules/Front/I18n/en_US.php
new file mode 100644
index 0000000..086864d
--- /dev/null
+++ b/domokits/local/modules/Front/I18n/en_US.php
@@ -0,0 +1,34 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Coupon code can\'t be empty' => 'Coupon code can\'t be empty',
+ 'Delivery address does not belong to the current customer' => 'Delivery address does not belong to the current customer',
+ 'Delivery module cannot be use with selected delivery address' => 'Delivery module cannot be use with selected delivery address',
+ 'Error during address deletion process' => 'Error during address deletion process',
+ 'Failed to add this article to your cart, please try again' => 'Failed to add this article to your cart, please try again',
+ 'Invoice address does not belong to the current customer' => 'Invoice address does not belong to the current customer',
+ 'No placed order' => 'No placed order',
+ 'Please check your coupon code: %message' => 'Please check your coupon code: %message',
+ 'Please check your input: %s' => 'Please check your input: %s',
+ 'Received failed order id does not belong to the current customer' => 'Received failed order id does not belong to the current customer',
+ 'Received placed order id does not belong to the current customer' => 'Received placed order id does not belong to the current customer',
+ 'Sorry, an error occured: %s' => 'Sorry, an error occured: %s',
+ 'Sorry, an error occurred: %message' => 'Sorry, an error occurred: %message',
+ 'Sorry, an error occurred: %s' => 'Sorry, an error occurred: %s',
+ 'Thanks for signing up! We\'ll keep you posted whenever we have any new updates.' => 'Thanks for signing up! We\'ll keep you posted whenever we have any new updates.',
+ 'To enable the virtual product feature, the VirtualProductDelivery module should be activated' => 'To enable the virtual product feature, the VirtualProductDelivery module should be activated',
+ 'Wrong email or password. Please try again' => 'Wrong email or password. Please try again',
+ 'You should sign in or register to use this coupon' => 'You should sign in or register to use this coupon',
+ 'You\'re currently logged in. Please log out before requesting a new password.' => 'You\'re currently logged in. Please log out before requesting a new password.',
+ 'Your account is not yet confirmed check out your mailbox' => 'Your account is not yet confirmed check out your mailbox',
+];
diff --git a/domokits/local/modules/Front/I18n/fr_FR.php b/domokits/local/modules/Front/I18n/fr_FR.php
new file mode 100644
index 0000000..45e3faa
--- /dev/null
+++ b/domokits/local/modules/Front/I18n/fr_FR.php
@@ -0,0 +1,33 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Coupon code can\'t be empty' => 'Le code promo ne peut être vide',
+ 'Delivery address does not belong to the current customer' => 'L\'adresse de livraison n\'appartient pas au client en cours',
+ 'Delivery module cannot be use with selected delivery address' => 'Le module de livraison ne peut pas être utilisé avec cette adresse de livraison',
+ 'Error during address deletion process' => 'Désolé. Une erreur s\'est produite lors de la suppression de l\'adresse',
+ 'Failed to add this article to your cart, please try again' => 'Impossible d\'ajouter cet article à votre panier. Merci de ré-essayer.',
+ 'Invoice address does not belong to the current customer' => 'L\'adresse de facturation n\'appartient pas au client en cours',
+ 'No placed order' => 'Aucune commande passée',
+ 'Please check your coupon code: %message' => 'Merci de vérifier votre code promo : %message',
+ 'Please check your input: %s' => 'Merci de vérifier les informations indiquées : %s',
+ 'Received failed order id does not belong to the current customer' => 'L\'id de commande refusée n\'appartient pas au client en cours',
+ 'Received placed order id does not belong to the current customer' => 'L\'id de commande passée n\'appartient pas au client en cours',
+ 'Sorry, an error occured: %s' => 'Désolé. Une erreur s\'est produite : %s',
+ 'Sorry, an error occurred: %message' => 'Désolé. Une erreur s\'est produite : %message',
+ 'Sorry, an error occurred: %s' => 'Désolé, une erreur est survenue : %s',
+ 'Thanks for signing up! We\'ll keep you posted whenever we have any new updates.' => 'Merci de votre inscription ! Nous vous tiendrons informé dès qu\'il y aura des nouveautés.',
+ 'To enable the virtual product feature, the VirtualProductDelivery module should be activated' => 'Pour activer les produits virtuels, le module VirtualProductDelivery doit être activé',
+ 'Wrong email or password. Please try again' => 'Adresse email ou mot de passe incorrect. Merci de ré-essayer.',
+ 'You should sign in or register to use this coupon' => 'Vous devez vous connecter ou vous inscrire pour utiliser ce coupon',
+ 'You\'re currently logged in. Please log out before requesting a new password.' => 'Vous être actuellement connecté au site. Vous devez vous déconnecter pour demander un nouveau mot de passe.',
+];
diff --git a/domokits/local/modules/Front/I18n/it_IT.php b/domokits/local/modules/Front/I18n/it_IT.php
new file mode 100644
index 0000000..56afb70
--- /dev/null
+++ b/domokits/local/modules/Front/I18n/it_IT.php
@@ -0,0 +1,17 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Coupon code can\'t be empty' => 'Il codice di sconto non può essere vuoto',
+ 'Thanks for signing up! We\'ll keep you posted whenever we have any new updates.' => 'Grazie per l\'inscrizione! Ti terremo aggiornato ogni volta che abbiamo eventuali nuovi aggiornamenti.',
+ 'You should sign in or register to use this coupon' => 'Dovresti accedere o registrarti per utilizzare questo coupon',
+];
diff --git a/domokits/local/modules/Front/I18n/ru_RU.php b/domokits/local/modules/Front/I18n/ru_RU.php
new file mode 100644
index 0000000..3427a9d
--- /dev/null
+++ b/domokits/local/modules/Front/I18n/ru_RU.php
@@ -0,0 +1,35 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Coupon code can\'t be empty' => 'Код купона не может быть пустым',
+ 'Delivery address does not belong to the current customer' => 'Адрес доставки не пренадлежит текущему клиенту',
+ 'Delivery module cannot be use with selected delivery address' => 'Модуль доставки не может быть использован с текущим адресом доставки',
+ 'Error during address deletion process' => 'Ошибка удаления адреса',
+ 'Failed to add this article to your cart, please try again' => 'Ошибка при добавлении статьи в вашу корзину, попробуйте еще раз',
+ 'Invoice address does not belong to the current customer' => 'Адрес выставления счета не пренадлежит текущему клиенту',
+ 'No placed order' => 'Нет размещенного заказа',
+ 'Please check your coupon code: %message' => 'Пожалуйста, проверьте код купона: %message',
+ 'Please check your input: %s' => 'Пожалуйста, проверьте ваш ввод: %s',
+ 'Received failed order id does not belong to the current customer' => 'Полученный ошибочный заказ не пренадлежит текущему клиенту',
+ 'Received placed order id does not belong to the current customer' => 'Полученный размещенный заказ не пренадлежит текущему клиенту',
+ 'Sorry, an error occured: %s' => 'К сожалению произшла ошибка: %s',
+ 'Sorry, an error occurred: %message' => 'К сожалению произошла ошибка: %message ',
+ 'Sorry, an error occurred: %s' => 'К сожалению произошла ошибка: %s ',
+ 'Thanks for signing up! We\'ll keep you posted whenever we have any new updates.' => 'Спасибо за подписку! Мы будем держать вас в курсе обновлений.',
+ 'The delivery module is not valid.' => 'Некоректный модуль доставки',
+ 'To enable the virtual product feature, the VirtualProductDelivery module should be activated' => 'Для включения функции виртуальных продуктов, модуль VirtualProductDelivery должен быть включен',
+ 'Wrong email or password. Please try again' => 'Некоректный email или пароль. Пожалуйста, попробуйте еще раз',
+ 'You should sign in or register to use this coupon' => 'Вы должны войти или зарегистрироваться что использовать этот купон',
+ 'You\'re currently logged in. Please log out before requesting a new password.' => 'Вы сейчас авторизированы. Пожалуйста выйдите перед запросом нового пароля.',
+ 'Your subscription to our newsletter has been canceled.' => 'Ваша подписка на рассылку была отменена',
+];
diff --git a/domokits/local/modules/Front/I18n/tr_TR.php b/domokits/local/modules/Front/I18n/tr_TR.php
new file mode 100644
index 0000000..a709243
--- /dev/null
+++ b/domokits/local/modules/Front/I18n/tr_TR.php
@@ -0,0 +1,32 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Coupon code can\'t be empty' => 'Kupon şifre boş olamaz',
+ 'Delivery address does not belong to the current customer' => 'Teslimat adresi geçerli müşteriye ait değil',
+ 'Delivery module cannot be use with selected delivery address' => 'Teslim modülü seçili teslimat adresi kullanılamaz',
+ 'Error during address deletion process' => 'Adres silme işlemi sırasında bir hata oluştu',
+ 'Failed to add this article to your cart, please try again' => 'Sepetinize Bu ürün eklenemedi, lütfen tekrar deneyin',
+ 'Invoice address does not belong to the current customer' => 'Fatura adresi geçerli müşteriye ait değil',
+ 'No placed order' => 'Yerleştirilen hiçbir sipariş',
+ 'Please check your coupon code: %message' => 'Kupon kodunuzu gözden geçirin: %message',
+ 'Please check your input: %s' => 'Lütfen girişinizi denetleyin: %s',
+ 'Received failed order id does not belong to the current customer' => 'Alınan başarısız sipariş kimliği geçerli müşteriye ait değil',
+ 'Received placed order id does not belong to the current customer' => 'Alınmış yerleştirilmiş sipariş kimliği geçerli müşteriye ait değil',
+ 'Sorry, an error occured: %s' => 'Üzgünüz, bir hata oluştu: %s',
+ 'Sorry, an error occurred: %message' => 'Üzgünüz, bir hata oluştu: %message',
+ 'Sorry, an error occurred: %s' => 'Üzgünüz, bir hata oluştu: %s',
+ 'Thanks for signing up! We\'ll keep you posted whenever we have any new updates.' => 'Teşekkürler. Yeni güncelleştirmeler olduğunda sizi haberdar edeceğiz.',
+ 'To enable the virtual product feature, the VirtualProductDelivery module should be activated' => 'Sanal ürün özelliği etkinleştirmek için VirtualProductDelivery modülü etkinleştirilmesi',
+ 'Wrong email or password. Please try again' => 'Email adresi veya şifre hatalı. Lütfen tekrar deneyiniz',
+ 'You\'re currently logged in. Please log out before requesting a new password.' => 'Şu anda logged içinde. Lütfen yeni bir parola istemeden önce çıkış.',
+];
diff --git a/domokits/local/modules/Front/LICENSE.txt b/domokits/local/modules/Front/LICENSE.txt
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/domokits/local/modules/Front/LICENSE.txt
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/domokits/local/modules/Front/composer.json b/domokits/local/modules/Front/composer.json
new file mode 100644
index 0000000..b916b7b
--- /dev/null
+++ b/domokits/local/modules/Front/composer.json
@@ -0,0 +1,11 @@
+{
+ "name": "thelia/front-module",
+ "license": "LGPL-3.0+",
+ "type": "thelia-module",
+ "require": {
+ "thelia/installer": "~1.1"
+ },
+ "extra": {
+ "installer-name": "Front"
+ }
+}
diff --git a/domokits/local/modules/HookAdminHome/Config/config.xml b/domokits/local/modules/HookAdminHome/Config/config.xml
new file mode 100644
index 0000000..895247b
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/Config/config.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/domokits/local/modules/HookAdminHome/Config/module.xml b/domokits/local/modules/HookAdminHome/Config/module.xml
new file mode 100644
index 0000000..a19b9af
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/Config/module.xml
@@ -0,0 +1,32 @@
+
+
+ HookAdminHome\HookAdminHome
+
+ Displays the default blocks on the homepage of the administration
+
+
+ Affiche les blocs par défaut sur la page d'accueil de l'administration
+
+
+ en_US
+ fr_FR
+
+ 2.5.4
+
+
+ Gilles Bourgeat
+ gilles@thelia.net
+
+
+ Franck Allimant
+ CQFDev
+ franck@cqfdev.fr
+ www.cqfdev.fr
+
+
+ classic
+ 2.5.4
+ prod
+
diff --git a/domokits/local/modules/HookAdminHome/Config/routing.xml b/domokits/local/modules/HookAdminHome/Config/routing.xml
new file mode 100644
index 0000000..a1dd0d6
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/Config/routing.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+ HookAdminHome\Controller\HomeController::processTemplateAction
+ ajax/thelia_news_feed
+ 1
+
+
diff --git a/domokits/local/modules/HookAdminHome/Controller/ConfigurationController.php b/domokits/local/modules/HookAdminHome/Controller/ConfigurationController.php
new file mode 100644
index 0000000..174a22d
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/Controller/ConfigurationController.php
@@ -0,0 +1,83 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookAdminHome\Controller;
+
+use HookAdminHome\HookAdminHome;
+use Symfony\Component\HttpFoundation\RedirectResponse;
+use Symfony\Component\Routing\Annotation\Route;
+use Thelia\Controller\Admin\BaseAdminController;
+use Thelia\Core\Security\AccessManager;
+use Thelia\Core\Security\Resource\AdminResources;
+use Thelia\Form\Exception\FormValidationException;
+use Thelia\Tools\URL;
+
+class ConfigurationController extends BaseAdminController
+{
+ /**
+ * @Route("/admin/module/HookAdminHome/configure", name="admin.home.config", methods={"POST"})
+ */
+ public function editConfiguration()
+ {
+ if (null !== $response = $this->checkAuth(
+ AdminResources::MODULE,
+ [HookAdminHome::DOMAIN_NAME],
+ AccessManager::UPDATE
+ )) {
+ return $response;
+ }
+
+ $form = $this->createForm('hookadminhome.config.form');
+ $error_message = null;
+
+ try {
+ $validateForm = $this->validateForm($form);
+ $data = $validateForm->getData();
+
+ HookAdminHome::setConfigValue(HookAdminHome::ACTIVATE_NEWS, 0);
+ HookAdminHome::setConfigValue(HookAdminHome::ACTIVATE_SALES, 0);
+ HookAdminHome::setConfigValue(HookAdminHome::ACTIVATE_INFO, 0);
+ HookAdminHome::setConfigValue(HookAdminHome::ACTIVATE_STATS, 0);
+
+ if ($data['enabled-news']) {
+ HookAdminHome::setConfigValue(HookAdminHome::ACTIVATE_NEWS, 1);
+ }
+
+ if ($data['enabled-sales']) {
+ HookAdminHome::setConfigValue(HookAdminHome::ACTIVATE_SALES, 1);
+ }
+
+ if ($data['enabled-info']) {
+ HookAdminHome::setConfigValue(HookAdminHome::ACTIVATE_INFO, 1);
+ }
+
+ if ($data['enabled-stats']) {
+ HookAdminHome::setConfigValue(HookAdminHome::ACTIVATE_STATS, 1);
+ }
+
+ return new RedirectResponse(URL::getInstance()->absoluteUrl('/admin/module/HookAdminHome'));
+ } catch (FormValidationException $e) {
+ $error_message = $this->createStandardFormValidationErrorMessage($e);
+ }
+
+ if (null !== $error_message) {
+ $this->setupFormErrorContext(
+ 'configuration',
+ $error_message,
+ $form
+ );
+ $response = $this->render('module-configure', ['module_code' => 'HookAdminHome']);
+ }
+
+ return $response;
+ }
+}
diff --git a/domokits/local/modules/HookAdminHome/Controller/HomeController.php b/domokits/local/modules/HookAdminHome/Controller/HomeController.php
new file mode 100644
index 0000000..abadc37
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/Controller/HomeController.php
@@ -0,0 +1,164 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookAdminHome\Controller;
+
+use HookAdminHome\HookAdminHome;
+use Symfony\Component\Cache\Adapter\AdapterInterface;
+use Symfony\Component\Routing\Annotation\Route;
+use Thelia\Controller\Admin\BaseAdminController;
+use Thelia\Core\Security\AccessManager;
+use Thelia\Model\ConfigQuery;
+use Thelia\Model\Currency;
+use Thelia\Model\CustomerQuery;
+use Thelia\Model\OrderQuery;
+
+/**
+ * Class HomeController.
+ *
+ * @author Gilles Bourgeat
+ */
+class HomeController extends BaseAdminController
+{
+ /**
+ * Key prefix for stats cache.
+ */
+ public const STATS_CACHE_KEY = 'stats';
+
+ public const RESOURCE_CODE = 'admin.home';
+
+ /**
+ * @Route("/admin/home/stats", name="admin.home.stats")
+ */
+ public function loadStatsAjaxAction(AdapterInterface $cacheAdapter)
+ {
+ if (null !== $response = $this->checkAuth(self::RESOURCE_CODE, [], AccessManager::VIEW)) {
+ return $response;
+ }
+
+ $cacheExpire = ConfigQuery::getAdminCacheHomeStatsTTL();
+
+ $month = (int) $this->getRequest()->query->get('month', date('m'));
+ $year = (int) $this->getRequest()->query->get('year', date('Y'));
+
+ $cacheKey = self::STATS_CACHE_KEY.'_'.$month.'_'.$year;
+
+ $cacheItem = $cacheAdapter->getItem($cacheKey);
+
+ // force flush
+ if ($this->getRequest()->query->get('flush', '0')) {
+ $cacheAdapter->deleteItem($cacheKey);
+ }
+
+ if (!$cacheItem->isHit()) {
+ $data = $this->getStatus($month, $year);
+
+ $cacheItem->set(json_encode($data));
+ $cacheItem->expiresAfter($cacheExpire);
+
+ if ($cacheExpire) {
+ $cacheAdapter->save($cacheItem);
+ }
+ }
+
+ return $this->jsonResponse($cacheItem->get());
+ }
+
+ /**
+ * @Route(
+ * "/admin/home/month-sales-block/{month}/{year}",
+ * name="admin.home.month.sales.block",
+ * requirements={"month"="\d+", "year"="\d+"}
+ * )
+ */
+ public function blockMonthSalesStatistics($month, $year)
+ {
+ $baseDate = sprintf('%04d-%02d', $year, $month);
+
+ $startDate = "$baseDate-01";
+ $endDate = date('Y-m-t', strtotime($startDate));
+
+ $prevMonthStartDate = date('Y-m-01', strtotime("$baseDate -1 month"));
+ $prevMonthEndDate = date('Y-m-t', strtotime($prevMonthStartDate));
+
+ return $this->render('block-month-sales-statistics', [
+ 'startDate' => $startDate,
+ 'endDate' => $endDate,
+ 'prevMonthStartDate' => $prevMonthStartDate,
+ 'prevMonthEndDate' => $prevMonthEndDate,
+ ]);
+ }
+
+ /**
+ * @param int $month
+ * @param int $year
+ *
+ * @return \stdClass
+ */
+ protected function getStatus($month, $year)
+ {
+ $data = new \stdClass();
+
+ $data->title = $this->getTranslator()->trans(
+ 'Stats on %month/%year',
+ ['%month' => $month, '%year' => $year],
+ HookAdminHome::DOMAIN_NAME
+ );
+
+ $data->series = [];
+
+ /* sales */
+ $data->series[] = $saleSeries = new \stdClass();
+ $saleSeries->color = self::testHexColor('sales_color', '#adadad');
+ $saleSeries->data = OrderQuery::getMonthlySaleStats($month, $year);
+ $saleSeries->valueFormat = '%1.2f '.Currency::getDefaultCurrency()->getSymbol();
+
+ /* new customers */
+ $data->series[] = $newCustomerSeries = new \stdClass();
+ $newCustomerSeries->color = self::testHexColor('customers_color', '#f39922');
+ $newCustomerSeries->data = CustomerQuery::getMonthlyNewCustomersStats($month, $year);
+ $newCustomerSeries->valueFormat = '%d';
+
+ /* orders */
+ $data->series[] = $orderSeries = new \stdClass();
+ $orderSeries->color = self::testHexColor('orders_color', '#5cb85c');
+ $orderSeries->data = OrderQuery::getMonthlyOrdersStats($month, $year);
+ $orderSeries->valueFormat = '%d';
+
+ /* first order */
+ $data->series[] = $firstOrderSeries = new \stdClass();
+ $firstOrderSeries->color = self::testHexColor('first_orders_color', '#5bc0de');
+ $firstOrderSeries->data = OrderQuery::getFirstOrdersStats($month, $year);
+ $firstOrderSeries->valueFormat = '%d';
+
+ /* cancelled orders */
+ $data->series[] = $cancelledOrderSeries = new \stdClass();
+ $cancelledOrderSeries->color = self::testHexColor('cancelled_orders_color', '#d9534f');
+ $cancelledOrderSeries->data = OrderQuery::getMonthlyOrdersStats($month, $year, [5]);
+ $cancelledOrderSeries->valueFormat = '%d';
+
+ return $data;
+ }
+
+ /**
+ * @param string $key
+ * @param string $default
+ *
+ * @return string hexadecimal color or default argument
+ */
+ protected function testHexColor($key, $default)
+ {
+ $hexColor = $this->getRequest()->query->get($key, $default);
+
+ return preg_match('/^#[a-f0-9]{6}$/i', $hexColor) ? $hexColor : $default;
+ }
+}
diff --git a/domokits/local/modules/HookAdminHome/Form/Configuration.php b/domokits/local/modules/HookAdminHome/Form/Configuration.php
new file mode 100644
index 0000000..87591ca
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/Form/Configuration.php
@@ -0,0 +1,101 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookAdminHome\Form;
+
+use HookAdminHome\HookAdminHome;
+use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
+use Thelia\Core\Translation\Translator;
+use Thelia\Form\BaseForm;
+
+class Configuration extends BaseForm
+{
+ protected function buildForm(): void
+ {
+ $this->formBuilder->add(
+ 'enabled-news',
+ CheckboxType::class,
+ [
+ 'label' => 'Enabled News',
+ 'label_attr' => [
+ 'for' => 'enabled-news',
+ 'help' => Translator::getInstance()->trans(
+ 'Check if you want show news',
+ [],
+ HookAdminHome::DOMAIN_NAME
+ ),
+ ],
+ 'required' => false,
+ 'value' => HookAdminHome::getConfigValue(HookAdminHome::ACTIVATE_NEWS, 0),
+ ]
+ );
+
+ $this->formBuilder->add(
+ 'enabled-info',
+ CheckboxType::class,
+ [
+ 'label' => 'Enabled Info',
+ 'label_attr' => [
+ 'for' => 'enabled-info',
+ 'help' => Translator::getInstance()->trans(
+ 'Check if you want show info',
+ [],
+ HookAdminHome::DOMAIN_NAME
+ ),
+ ],
+ 'required' => false,
+ 'value' => HookAdminHome::getConfigValue(HookAdminHome::ACTIVATE_INFO, 0),
+ ]
+ );
+
+ $this->formBuilder->add(
+ 'enabled-stats',
+ CheckboxType::class,
+ [
+ 'label' => 'Enabled default Home Stats',
+ 'label_attr' => [
+ 'for' => 'enabled-stats',
+ 'help' => Translator::getInstance()->trans(
+ 'Check if you want show default Home Stats',
+ [],
+ HookAdminHome::DOMAIN_NAME
+ ),
+ ],
+ 'required' => false,
+ 'value' => HookAdminHome::getConfigValue(HookAdminHome::ACTIVATE_STATS, 0),
+ ]
+ );
+
+ $this->formBuilder->add(
+ 'enabled-sales',
+ CheckboxType::class,
+ [
+ 'label' => 'Enabled Sales Statistics',
+ 'label_attr' => [
+ 'for' => 'enabled-sales',
+ 'help' => Translator::getInstance()->trans(
+ 'Check if you want show sales stats',
+ [],
+ HookAdminHome::DOMAIN_NAME
+ ),
+ ],
+ 'required' => false,
+ 'value' => HookAdminHome::getConfigValue(HookAdminHome::ACTIVATE_SALES, 0),
+ ]
+ );
+ }
+
+ public static function getName()
+ {
+ return 'hookadminhomeconfigform';
+ }
+}
diff --git a/domokits/local/modules/HookAdminHome/Hook/AdminHook.php b/domokits/local/modules/HookAdminHome/Hook/AdminHook.php
new file mode 100644
index 0000000..c451460
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/Hook/AdminHook.php
@@ -0,0 +1,151 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookAdminHome\Hook;
+
+use HookAdminHome\HookAdminHome;
+use Symfony\Component\Cache\Adapter\AdapterInterface;
+use Thelia\Core\Event\Hook\HookRenderBlockEvent;
+use Thelia\Core\Event\Hook\HookRenderEvent;
+use Thelia\Core\Hook\BaseHook;
+
+/**
+ * Class AdminHook.
+ *
+ * @author Gilles Bourgeat
+ */
+class AdminHook extends BaseHook
+{
+ protected $theliaCache;
+
+ public function __construct(AdapterInterface $theliaCache = null)
+ {
+ $this->theliaCache = $theliaCache;
+ }
+
+ public function blockStatistics(HookRenderEvent $event): void
+ {
+ if (1 == HookAdminHome::getConfigValue(HookAdminHome::ACTIVATE_STATS, 1)) {
+ $event->add($this->render('block-statistics.html'));
+ }
+
+ $event->add($this->render('hook-admin-home-config.html'));
+ }
+
+ public function blockStatisticsJs(HookRenderEvent $event): void
+ {
+ if (1 == HookAdminHome::getConfigValue(HookAdminHome::ACTIVATE_STATS, 1)) {
+ $event->add($this->render('block-statistics-js.html'));
+ }
+ }
+
+ public function blockSalesStatistics(HookRenderBlockEvent $event): void
+ {
+ if (1 == HookAdminHome::getConfigValue(HookAdminHome::ACTIVATE_SALES, 1)) {
+ $content = trim($this->render('block-sales-statistics.html'));
+ if (!empty($content)) {
+ $event->add([
+ 'id' => 'block-sales-statistics',
+ 'title' => $this->trans('Sales statistics', [], HookAdminHome::DOMAIN_NAME),
+ 'content' => $content,
+ ]);
+ }
+ }
+ }
+
+ public function blockNews(HookRenderBlockEvent $event): void
+ {
+ if (1 == HookAdminHome::getConfigValue(HookAdminHome::ACTIVATE_NEWS, 1)) {
+ $content = trim($this->render('block-news.html'));
+ if (!empty($content)) {
+ $event->add([
+ 'id' => 'block-news',
+ 'title' => $this->trans('Thelia Github activity', [], HookAdminHome::DOMAIN_NAME),
+ 'content' => $content,
+ ]);
+ }
+ }
+ }
+
+ public function blockTheliaInformation(HookRenderBlockEvent $event): void
+ {
+ $releases = $this->getGithubReleases();
+ if (1 == HookAdminHome::getConfigValue(HookAdminHome::ACTIVATE_INFO, 1)) {
+ $content = trim(
+ $this->render(
+ 'block-thelia-information.html',
+ [
+ 'latestStableRelease' => $releases['latestStableRelease'],
+ 'latestPreRelease' => $releases['latestPreRelease'],
+ ]
+ )
+ );
+ if (!empty($content)) {
+ $event->add([
+ 'id' => 'block-thelia-information',
+ 'title' => $this->trans('Thelia news', [], HookAdminHome::DOMAIN_NAME),
+ 'content' => $content,
+ ]);
+ }
+ }
+ }
+
+ private function getGithubReleases(): array
+ {
+ $cachedReleases = $this->theliaCache->getItem('thelia_github_releases');
+ if (!$cachedReleases->isHit()) {
+ try {
+ $resource = curl_init();
+
+ curl_setopt($resource, \CURLOPT_URL, 'https://api.github.com/repos/thelia/thelia/releases');
+ curl_setopt($resource, \CURLOPT_RETURNTRANSFER, 1);
+ curl_setopt($resource, \CURLOPT_HTTPHEADER, ['accept: application/vnd.github.v3+json']);
+ curl_setopt($resource, \CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13');
+
+ $results = curl_exec($resource);
+
+ curl_close($resource);
+
+ $theliaReleases = json_decode($results, true);
+
+ $publishedAtSort = function ($a, $b) {return (new \DateTime($a['published_at'])) < (new \DateTime($b['published_at'])); };
+
+ $stableReleases = array_filter($theliaReleases, function ($theliaRelease) { return !$theliaRelease['prerelease']; });
+ usort($stableReleases, $publishedAtSort);
+ $latestStableRelease = $stableReleases[0] ?? null;
+
+ $preReleases = array_filter($theliaReleases, function ($theliaRelease) { return $theliaRelease['prerelease']; });
+ usort($preReleases, $publishedAtSort);
+ $latestPreRelease = $preReleases[0] ?? null;
+
+ // Don't display pre-release if they are < than stable release
+ if (version_compare($latestPreRelease['tag_name'], $latestStableRelease['tag_name'], '<')) {
+ $latestPreRelease = null;
+ }
+ } catch (\Exception $exception) {
+ $latestPreRelease = null;
+ $latestStableRelease = null;
+ }
+
+ $cachedReleases->expiresAfter(3600);
+ $cachedReleases->set(
+ [
+ 'latestStableRelease' => $latestStableRelease,
+ 'latestPreRelease' => $latestPreRelease,
+ ]
+ );
+ $this->theliaCache->save($cachedReleases);
+ }
+
+ return $cachedReleases->get();
+ }
+}
diff --git a/domokits/local/modules/HookAdminHome/Hook/HookAdminManager.php b/domokits/local/modules/HookAdminHome/Hook/HookAdminManager.php
new file mode 100644
index 0000000..64dbfcf
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/Hook/HookAdminManager.php
@@ -0,0 +1,26 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookAdminHome\Hook;
+
+use Thelia\Core\Event\Hook\HookRenderEvent;
+use Thelia\Core\Hook\BaseHook;
+
+class HookAdminManager extends BaseHook
+{
+ public function onModuleConfiguration(HookRenderEvent $event): void
+ {
+ $event->add(
+ $this->render('admin-home-config.html')
+ );
+ }
+}
diff --git a/domokits/local/modules/HookAdminHome/HookAdminHome.php b/domokits/local/modules/HookAdminHome/HookAdminHome.php
new file mode 100644
index 0000000..409b218
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/HookAdminHome.php
@@ -0,0 +1,61 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookAdminHome;
+
+use Symfony\Component\DependencyInjection\Loader\Configurator\ServicesConfigurator;
+use Thelia\Core\Template\TemplateDefinition;
+use Thelia\Module\BaseModule;
+
+class HookAdminHome extends BaseModule
+{
+ /** @var string */
+ public const DOMAIN_NAME = 'hookadminhome';
+
+ /** @var string */
+ public const ACTIVATE_NEWS = 'activate_home_news';
+
+ /** @var string */
+ public const ACTIVATE_SALES = 'activate_home_sales';
+
+ /** @var string */
+ public const ACTIVATE_INFO = 'activate_home_info';
+
+ /** @var string */
+ public const ACTIVATE_STATS = 'activate_stats';
+
+ /**
+ * @return array
+ */
+ public function getHooks()
+ {
+ return [
+ [
+ 'type' => TemplateDefinition::BACK_OFFICE,
+ 'code' => 'hook_home_stats',
+ 'title' => 'Hook Home Stats',
+ 'description' => 'Hook to change default stats',
+ ],
+ ];
+ }
+
+ /**
+ * Defines how services are loaded in your modules.
+ */
+ public static function configureServices(ServicesConfigurator $servicesConfigurator): void
+ {
+ $servicesConfigurator->load(self::getModuleCode().'\\', __DIR__)
+ ->exclude([THELIA_MODULE_DIR.ucfirst(self::getModuleCode()).'/I18n/*'])
+ ->autowire(true)
+ ->autoconfigure(true);
+ }
+}
diff --git a/domokits/local/modules/HookAdminHome/I18n/ar_SA.php b/domokits/local/modules/HookAdminHome/I18n/ar_SA.php
new file mode 100644
index 0000000..537ee04
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/I18n/ar_SA.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Stats on %month/%year' => 'إحصائيات عن الشهر و السنة %month/%year',
+];
diff --git a/domokits/local/modules/HookAdminHome/I18n/backOffice/default/ar_SA.php b/domokits/local/modules/HookAdminHome/I18n/backOffice/default/ar_SA.php
new file mode 100644
index 0000000..a91b16c
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/I18n/backOffice/default/ar_SA.php
@@ -0,0 +1,21 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Aborted orders' => 'تم إحباط الطلبات',
+ 'Average cart' => 'متوسط العربة',
+ 'Categories' => 'الفئات',
+ 'Click here' => 'انقر هنا',
+ 'Current version' => 'النسخة الحالية',
+ 'Customers' => 'العملاء',
+ 'Dashboard' => 'لوحة المعلومات',
+];
diff --git a/domokits/local/modules/HookAdminHome/I18n/backOffice/default/cs_CZ.php b/domokits/local/modules/HookAdminHome/I18n/backOffice/default/cs_CZ.php
new file mode 100644
index 0000000..12aae3c
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/I18n/backOffice/default/cs_CZ.php
@@ -0,0 +1,41 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Aborted orders' => 'Aborted orders',
+ 'Average cart' => 'Average cart',
+ 'Categories' => 'Categories',
+ 'Click here' => 'Click here',
+ 'Current version' => 'Current version',
+ 'Customers' => 'Customers',
+ 'Dashboard' => 'Dashboard',
+ 'First orders' => 'First orders',
+ 'Latest version available' => 'Latest version available',
+ 'Lire la suite' => 'Lire la suite',
+ 'Loading Thelia lastest news...' => 'Loading Thelia lastest news...',
+ 'Loading...' => 'Loading...',
+ 'New customers' => 'New customers',
+ 'News' => 'News',
+ 'Offline products' => 'Offline products',
+ 'Online products' => 'Online products',
+ 'Orders' => 'Orders',
+ 'Overall sales' => 'Overall sales',
+ 'Previous month sales' => 'Previous month sales',
+ 'Previous year sales' => 'Previous year sales',
+ 'Products' => 'Products',
+ 'Sales' => 'Sales',
+ 'Sales excluding shipping' => 'Sales excluding shipping',
+ 'This month' => 'This month',
+ 'This year' => 'This year',
+ 'Today' => 'Today',
+ 'Yesterday sales' => 'Yesterday sales',
+];
diff --git a/domokits/local/modules/HookAdminHome/I18n/backOffice/default/de_DE.php b/domokits/local/modules/HookAdminHome/I18n/backOffice/default/de_DE.php
new file mode 100644
index 0000000..4b3fac2
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/I18n/backOffice/default/de_DE.php
@@ -0,0 +1,40 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Aborted orders' => 'Abgebrochene Bestellungen',
+ 'Average cart' => 'Durchschnittlichen Warenkorb',
+ 'Categories' => 'Kategorien',
+ 'Click here' => 'Hier Klicken',
+ 'Current version' => 'Aktuelle Version',
+ 'Customers' => 'Kunden',
+ 'Dashboard' => 'Dashboard',
+ 'First orders' => 'Erste Bestellungen',
+ 'Latest version available' => 'Neueste Version verfügbar',
+ 'Lire la suite' => 'Weiterlesen',
+ 'Loading Thelia lastest news...' => 'THELIAs neuesten Nachrichten Laden ...',
+ 'Loading...' => 'Laden...',
+ 'New customers' => 'Neue Kunde',
+ 'Offline products' => 'Offline Produkte',
+ 'Online products' => 'Online Produkte',
+ 'Orders' => 'Bestellungen',
+ 'Overall sales' => 'Gesamtverkäufe',
+ 'Previous month sales' => 'Vorheriger Monat Verkäufe',
+ 'Previous year sales' => 'Vorheriges Jahr Verkäufe',
+ 'Products' => 'Produkte',
+ 'Sales' => 'Verkäufe',
+ 'Sales excluding shipping' => 'Verkäufe ohne Lieferung',
+ 'This month' => 'Diesen Monat',
+ 'This year' => 'Dieses Jahr',
+ 'Today' => 'Heute',
+ 'Yesterday sales' => 'Verkäufe von Gestern',
+];
diff --git a/domokits/local/modules/HookAdminHome/I18n/backOffice/default/en_US.php b/domokits/local/modules/HookAdminHome/I18n/backOffice/default/en_US.php
new file mode 100644
index 0000000..b212ca5
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/I18n/backOffice/default/en_US.php
@@ -0,0 +1,43 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Aborted orders' => 'Aborted orders',
+ 'An error occurred while reading from JSON file' => 'An error occurred while reading from JSON file',
+ 'Average cart' => 'Average cart',
+ 'Categories' => 'Categories',
+ 'Click here' => 'Click here',
+ 'Current version' => 'Current version',
+ 'Customers' => 'Customers',
+ 'Dashboard' => 'Dashboard',
+ 'First orders' => 'First orders',
+ 'Latest version available' => 'Latest version available',
+ 'Loading Thelia lastest news...' => 'Loading Thelia lastest news...',
+ 'Loading...' => 'Loading...',
+ 'New customers' => 'New customers',
+ 'News' => 'News',
+ 'Offline products' => 'Offline products',
+ 'Online products' => 'Online products',
+ 'Orders' => 'Orders',
+ 'Overall sales' => 'Overall sales',
+ 'Previous month sales' => 'Previous month sales',
+ 'Previous year sales' => 'Previous year sales',
+ 'Products' => 'Products',
+ 'Read more' => 'Read more',
+ 'Sales' => 'Sales',
+ 'Sales excluding shipping' => 'Sales excluding shipping',
+ 'This month' => 'This month',
+ 'This year' => 'This year',
+ 'Today' => 'Today',
+ 'YYYY-MM' => 'YYYY-MM',
+ 'Yesterday sales' => 'Yesterday sales',
+];
diff --git a/domokits/local/modules/HookAdminHome/I18n/backOffice/default/es_ES.php b/domokits/local/modules/HookAdminHome/I18n/backOffice/default/es_ES.php
new file mode 100644
index 0000000..3454efe
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/I18n/backOffice/default/es_ES.php
@@ -0,0 +1,41 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Aborted orders' => 'Pedidos abandonados',
+ 'Average cart' => 'Carrito medio',
+ 'Categories' => 'Categorías',
+ 'Click here' => 'Haz clic aquí',
+ 'Current version' => 'Versión actual',
+ 'Customers' => 'Clientes',
+ 'Dashboard' => 'Panel de Control',
+ 'First orders' => 'Primeros pedidos',
+ 'Latest version available' => 'Última versión disponible',
+ 'Lire la suite' => 'Leer más',
+ 'Loading Thelia lastest news...' => 'Carregant Thelia últimes notícies ...',
+ 'Loading...' => 'Carregant ...',
+ 'New customers' => 'Nuevos clientes',
+ 'News' => 'Noticias',
+ 'Offline products' => 'Productos fuera de línea',
+ 'Online products' => 'Productos en línea',
+ 'Orders' => 'Pedidos',
+ 'Overall sales' => 'Ventas totales',
+ 'Previous month sales' => 'Ventas del mes anterior',
+ 'Previous year sales' => 'Ventas del año anterior',
+ 'Products' => 'Productos',
+ 'Sales' => 'Ventas',
+ 'Sales excluding shipping' => 'Ventas sin el envio',
+ 'This month' => 'Este mes',
+ 'This year' => 'Este año',
+ 'Today' => 'Hoy',
+ 'Yesterday sales' => 'Ventas de ayer',
+];
diff --git a/domokits/local/modules/HookAdminHome/I18n/backOffice/default/fr_FR.php b/domokits/local/modules/HookAdminHome/I18n/backOffice/default/fr_FR.php
new file mode 100644
index 0000000..b0693b6
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/I18n/backOffice/default/fr_FR.php
@@ -0,0 +1,42 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Aborted orders' => 'Paniers abandonnés',
+ 'An error occurred while reading from JSON file' => 'Désolé, une erreur s\'est produite pendant la récupération des données.',
+ 'Average cart' => 'Panier moyen',
+ 'Categories' => 'Rubriques',
+ 'Customers' => 'Clients',
+ 'Dashboard' => 'Tableau de bord',
+ 'First orders' => 'Premières commandes',
+ 'Latest pre-release' => 'Derniére pré-version',
+ 'Latest stable version' => 'Derniére version stable',
+ 'Loading Thelia lastest news...' => 'Chargement des dernières information Thelia...',
+ 'Loading Tweeter feed...' => 'Chargement du fil Tweeter...',
+ 'New customers' => 'Nouveaux clients',
+ 'Offline products' => 'Produits hors ligne',
+ 'Online products' => 'Produits en ligne',
+ 'Orders' => 'Commandes',
+ 'Overall sales' => 'Total des ventes',
+ 'Previous month sales' => 'Ventes du mois précédent',
+ 'Previous year sales' => 'Ventes de l\'année précédente',
+ 'Products' => 'Produits',
+ 'Read more' => 'Lire la suite',
+ 'Sales' => 'Ventes',
+ 'Sales excluding shipping' => 'Ventes hors frais de port',
+ 'This month' => 'Ce mois',
+ 'This year' => 'Cette année',
+ 'Today' => 'Aujourd\'hui',
+ 'YYYY-MM' => 'MM/YYYY',
+ 'Yesterday sales' => 'Ventes de la veille',
+ 'Your version' => 'Votre version',
+];
diff --git a/domokits/local/modules/HookAdminHome/I18n/backOffice/default/it_IT.php b/domokits/local/modules/HookAdminHome/I18n/backOffice/default/it_IT.php
new file mode 100644
index 0000000..a8d73b8
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/I18n/backOffice/default/it_IT.php
@@ -0,0 +1,42 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Aborted orders' => 'Ordini annullati',
+ 'Average cart' => 'Carrello medio',
+ 'Categories' => 'Categorie',
+ 'Click here' => 'Clicca qui',
+ 'Current version' => 'Versione attuale',
+ 'Customers' => 'Clienti',
+ 'Dashboard' => 'Dashboard',
+ 'First orders' => 'Primi ordini',
+ 'Latest version available' => 'Ultima versione disponibile',
+ 'Lire la suite' => 'Per saperne di più',
+ 'Loading Thelia lastest news...' => 'Caricamento delle ultime notizie su Thelia...',
+ 'Loading...' => 'Caricamento...',
+ 'New customers' => 'Nuovi clienti',
+ 'News' => 'Notizie',
+ 'Offline products' => 'Prodotti non in linea',
+ 'Online products' => 'Prodotti online',
+ 'Orders' => 'Ordini',
+ 'Overall sales' => 'Vendite complessive',
+ 'Previous month sales' => 'Vendite del mese precedente',
+ 'Previous year sales' => 'Vendite dell\'anno precedente',
+ 'Products' => 'Prodotti',
+ 'Read more' => 'Per saperne di più',
+ 'Sales' => 'Vendite',
+ 'Sales excluding shipping' => 'Vendite escluse spese di spedizione',
+ 'This month' => 'Questo mese',
+ 'This year' => 'Quest\'anno',
+ 'Today' => 'Oggi',
+ 'Yesterday sales' => 'Vendite di ieri',
+];
diff --git a/domokits/local/modules/HookAdminHome/I18n/backOffice/default/pt_BR.php b/domokits/local/modules/HookAdminHome/I18n/backOffice/default/pt_BR.php
new file mode 100644
index 0000000..7bd02a1
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/I18n/backOffice/default/pt_BR.php
@@ -0,0 +1,16 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Aborted orders' => 'Ordens abortadas',
+ 'Click here' => 'Clique aqui',
+];
diff --git a/domokits/local/modules/HookAdminHome/I18n/backOffice/default/ru_RU.php b/domokits/local/modules/HookAdminHome/I18n/backOffice/default/ru_RU.php
new file mode 100644
index 0000000..6e05f0f
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/I18n/backOffice/default/ru_RU.php
@@ -0,0 +1,41 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Aborted orders' => 'Отмененные заказы',
+ 'Average cart' => 'Средняя корзина',
+ 'Categories' => 'Категории',
+ 'Click here' => 'Нажмите здесь',
+ 'Current version' => 'Текущая версия',
+ 'Customers' => 'Клиенты',
+ 'Dashboard' => 'Приборная панель',
+ 'First orders' => 'Первые заказы',
+ 'Latest version available' => 'Последняя доступная версия',
+ 'Loading Thelia lastest news...' => 'Загрузка последних новостей Thelia...',
+ 'Loading...' => 'Загрузка...',
+ 'New customers' => 'Новые клиенты',
+ 'News' => 'Новости',
+ 'Offline products' => 'Товары выкл.',
+ 'Online products' => 'Товары вкл.',
+ 'Orders' => 'Заказы',
+ 'Overall sales' => 'Всего продаж',
+ 'Previous month sales' => 'Продажи в предыдущем месяце',
+ 'Previous year sales' => 'Продажи в предыдущем году',
+ 'Products' => 'Товары',
+ 'Read more' => 'Читать далее',
+ 'Sales' => 'Продажи',
+ 'Sales excluding shipping' => 'Продаж без доставки',
+ 'This month' => 'В этом месяце',
+ 'This year' => 'В этом году',
+ 'Today' => 'Сегодня',
+ 'Yesterday sales' => 'Вчерашние продажи',
+];
diff --git a/domokits/local/modules/HookAdminHome/I18n/backOffice/default/tr_TR.php b/domokits/local/modules/HookAdminHome/I18n/backOffice/default/tr_TR.php
new file mode 100644
index 0000000..9de1b15
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/I18n/backOffice/default/tr_TR.php
@@ -0,0 +1,41 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Aborted orders' => 'İptal edilen siparişler',
+ 'Average cart' => 'Sepet Ortalaması',
+ 'Categories' => 'Katogoriler',
+ 'Click here' => 'Buraya tıklayın',
+ 'Current version' => 'Güncel Sürüm',
+ 'Customers' => 'müşteriler',
+ 'Dashboard' => 'Kontrol paneli',
+ 'First orders' => 'İlk emir',
+ 'Latest version available' => 'En son yorum elde edilebilir',
+ 'Lire la suite' => 'Devamını okuyun',
+ 'Loading Thelia lastest news...' => 'Thelia yükleme son haberler...',
+ 'Loading...' => 'Yükleneniyor…...',
+ 'New customers' => 'Yeni Müşteriler',
+ 'News' => 'Yeni Haberler',
+ 'Offline products' => 'Çevrimdışı ürünler',
+ 'Online products' => 'Online Ürünler',
+ 'Orders' => 'siparişler',
+ 'Overall sales' => 'Genel satış',
+ 'Previous month sales' => 'Önceki ay satış',
+ 'Previous year sales' => 'Önceki yılın satış',
+ 'Products' => 'ürün',
+ 'Sales' => 'Satış',
+ 'Sales excluding shipping' => 'Nakliye hariç satış',
+ 'This month' => 'Bu Ay',
+ 'This year' => 'Bu yıl',
+ 'Today' => 'bugün',
+ 'Yesterday sales' => 'Dün satış',
+];
diff --git a/domokits/local/modules/HookAdminHome/I18n/cs_CZ.php b/domokits/local/modules/HookAdminHome/I18n/cs_CZ.php
new file mode 100644
index 0000000..ada6cbb
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/I18n/cs_CZ.php
@@ -0,0 +1,17 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Sales statistics' => 'Sales statistics',
+ 'Stats on %month/%year' => 'Stats on %month/%year',
+ 'Thelia informations' => 'Thelia information',
+];
diff --git a/domokits/local/modules/HookAdminHome/I18n/de_DE.php b/domokits/local/modules/HookAdminHome/I18n/de_DE.php
new file mode 100644
index 0000000..3f14186
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/I18n/de_DE.php
@@ -0,0 +1,17 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Sales statistics' => 'Verkaufsstatistiken',
+ 'Stats on %month/%year' => 'Statistiken für %month/%year',
+ 'Thelia informations' => 'Thelias Informationen',
+];
diff --git a/domokits/local/modules/HookAdminHome/I18n/en_US.php b/domokits/local/modules/HookAdminHome/I18n/en_US.php
new file mode 100644
index 0000000..aa42b6d
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/I18n/en_US.php
@@ -0,0 +1,17 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Stats on %month/%year' => 'Stats on %month/%year',
+ 'Thelia informations' => 'Thelia information',
+ 'Sales statistics' => 'Sales statistics',
+];
diff --git a/domokits/local/modules/HookAdminHome/I18n/es_ES.php b/domokits/local/modules/HookAdminHome/I18n/es_ES.php
new file mode 100644
index 0000000..588ad89
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/I18n/es_ES.php
@@ -0,0 +1,16 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Sales statistics' => 'Estadísticas de ventas',
+ 'Thelia informations' => 'información sobre Thelia',
+];
diff --git a/domokits/local/modules/HookAdminHome/I18n/fr_FR.php b/domokits/local/modules/HookAdminHome/I18n/fr_FR.php
new file mode 100644
index 0000000..880bd48
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/I18n/fr_FR.php
@@ -0,0 +1,18 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Sales statistics' => 'Statistiques de vente',
+ 'Stats on %month/%year' => 'Statistiques pour %month/%year',
+ 'Thelia Github activity' => 'Thelia sur Github',
+ 'Thelia news' => 'Actualité Thelia',
+];
diff --git a/domokits/local/modules/HookAdminHome/I18n/id_ID.php b/domokits/local/modules/HookAdminHome/I18n/id_ID.php
new file mode 100644
index 0000000..daa0f18
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/I18n/id_ID.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Stats on %month/%year' => 'Stats on %month/%year',
+];
diff --git a/domokits/local/modules/HookAdminHome/I18n/it_IT.php b/domokits/local/modules/HookAdminHome/I18n/it_IT.php
new file mode 100644
index 0000000..c02246c
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/I18n/it_IT.php
@@ -0,0 +1,16 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Sales statistics' => 'Statistiche di vendita',
+ 'Thelia informations' => 'Thelia informazioni',
+];
diff --git a/domokits/local/modules/HookAdminHome/I18n/ru_RU.php b/domokits/local/modules/HookAdminHome/I18n/ru_RU.php
new file mode 100644
index 0000000..5d5de3f
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/I18n/ru_RU.php
@@ -0,0 +1,17 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Sales statistics' => 'Статистика продаж',
+ 'Stats on %month/%year' => 'Статистика за %month/%year',
+ 'Thelia informations' => 'Информация о Thelia',
+];
diff --git a/domokits/local/modules/HookAdminHome/I18n/tr_TR.php b/domokits/local/modules/HookAdminHome/I18n/tr_TR.php
new file mode 100644
index 0000000..0c5b6b7
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/I18n/tr_TR.php
@@ -0,0 +1,17 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Sales statistics' => 'Satış istatistikleri',
+ 'Stats on %month/%year' => '%month/%year istatistikleri',
+ 'Thelia informations' => 'Thelia bilgi',
+];
diff --git a/domokits/local/modules/HookAdminHome/LICENSE.txt b/domokits/local/modules/HookAdminHome/LICENSE.txt
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/LICENSE.txt
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/domokits/local/modules/HookAdminHome/composer.json b/domokits/local/modules/HookAdminHome/composer.json
new file mode 100644
index 0000000..d5921a2
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/composer.json
@@ -0,0 +1,11 @@
+{
+ "name": "thelia/hook-admin-home-module",
+ "license": "LGPL-3.0+",
+ "type": "thelia-module",
+ "require": {
+ "thelia/installer": "~1.1"
+ },
+ "extra": {
+ "installer-name": "HookAdminHome"
+ }
+}
\ No newline at end of file
diff --git a/domokits/local/modules/HookAdminHome/templates/backOffice/default/admin-home-config.html b/domokits/local/modules/HookAdminHome/templates/backOffice/default/admin-home-config.html
new file mode 100644
index 0000000..7517623
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/templates/backOffice/default/admin-home-config.html
@@ -0,0 +1,87 @@
+
+
+
diff --git a/domokits/local/modules/HookAdminHome/templates/backOffice/default/ajax/thelia_news_feed.html b/domokits/local/modules/HookAdminHome/templates/backOffice/default/ajax/thelia_news_feed.html
new file mode 100644
index 0000000..f5c1aa7
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/templates/backOffice/default/ajax/thelia_news_feed.html
@@ -0,0 +1,29 @@
+{* this template is loaded via Ajax in the login page, to prevent login page slowdown *}
+
+{* Set the default translation domain, that will be used by intl when the 'd' parameter is not set *}
+{default_translation_domain domain='hookadminhome.bo.default'}
+
+
+{/loop}
diff --git a/domokits/local/modules/HookAdminHome/templates/backOffice/default/hook-admin-home-config.html b/domokits/local/modules/HookAdminHome/templates/backOffice/default/hook-admin-home-config.html
new file mode 100644
index 0000000..2ce7e24
--- /dev/null
+++ b/domokits/local/modules/HookAdminHome/templates/backOffice/default/hook-admin-home-config.html
@@ -0,0 +1 @@
+{hook name="hook_home_stats" location="hook_home_stats"}
\ No newline at end of file
diff --git a/domokits/local/modules/HookAnalytics/Config/config.xml b/domokits/local/modules/HookAnalytics/Config/config.xml
new file mode 100644
index 0000000..57a6cb0
--- /dev/null
+++ b/domokits/local/modules/HookAnalytics/Config/config.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/domokits/local/modules/HookAnalytics/Config/module.xml b/domokits/local/modules/HookAnalytics/Config/module.xml
new file mode 100644
index 0000000..99d80c1
--- /dev/null
+++ b/domokits/local/modules/HookAnalytics/Config/module.xml
@@ -0,0 +1,24 @@
+
+
+ HookAnalytics\HookAnalytics
+
+ Analytics (Google)
+
+
+ Statistiques (Google)
+
+
+ en_US
+ fr_FR
+
+ 2.5.4
+
+ Julien Chanséaume
+ jchanseaume@openstudio.fr
+
+ classic
+ 2.5.4
+ alpha
+
diff --git a/domokits/local/modules/HookAnalytics/Config/routing.xml b/domokits/local/modules/HookAnalytics/Config/routing.xml
new file mode 100644
index 0000000..269697d
--- /dev/null
+++ b/domokits/local/modules/HookAnalytics/Config/routing.xml
@@ -0,0 +1,10 @@
+
+
+
+
+ HookAnalytics\Controller\Configuration::saveAction
+
+
+
diff --git a/domokits/local/modules/HookAnalytics/Controller/Configuration.php b/domokits/local/modules/HookAnalytics/Controller/Configuration.php
new file mode 100644
index 0000000..ef62762
--- /dev/null
+++ b/domokits/local/modules/HookAnalytics/Controller/Configuration.php
@@ -0,0 +1,54 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookAnalytics\Controller;
+
+use HookAnalytics\HookAnalytics;
+use Symfony\Component\HttpFoundation\JsonResponse;
+use Thelia\Controller\Admin\BaseAdminController;
+use Thelia\Core\Security\AccessManager;
+use Thelia\Core\Security\Resource\AdminResources;
+
+/**
+ * Class Configuration.
+ *
+ * @author Julien Chanséaume
+ */
+class Configuration extends BaseAdminController
+{
+ public function saveAction()
+ {
+ if (null !== $response = $this->checkAuth([AdminResources::MODULE], ['hookanalytics'], AccessManager::UPDATE)) {
+ return $response;
+ }
+
+ $form = $this->createForm(\HookAnalytics\Form\Configuration::class);
+ $resp = [
+ 'error' => 0,
+ 'message' => '',
+ ];
+ $response = null;
+
+ $lang = $this->getSession()->get('thelia.admin.edition.lang');
+ try {
+ $vform = $this->validateForm($form);
+ $data = $vform->getData();
+
+ HookAnalytics::setConfigValue('hookanalytics_trackingcode', $data['trackingcode'], $lang->getLocale(), true);
+ } catch (\Exception $e) {
+ $resp['error'] = 1;
+ $resp['message'] = $e->getMessage();
+ }
+
+ return new JsonResponse($resp);
+ }
+}
diff --git a/domokits/local/modules/HookAnalytics/Form/Configuration.php b/domokits/local/modules/HookAnalytics/Form/Configuration.php
new file mode 100644
index 0000000..595f409
--- /dev/null
+++ b/domokits/local/modules/HookAnalytics/Form/Configuration.php
@@ -0,0 +1,58 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookAnalytics\Form;
+
+use HookAnalytics\HookAnalytics;
+use Symfony\Component\Form\Extension\Core\Type\TextType;
+use Thelia\Core\Translation\Translator;
+use Thelia\Form\BaseForm;
+use Thelia\Model\LangQuery;
+
+/**
+ * Class Configuration.
+ *
+ * @author Julien Chanséaume
+ */
+class Configuration extends BaseForm
+{
+ protected function buildForm(): void
+ {
+ $form = $this->formBuilder;
+
+ $lang = $this->getRequest()->getSession()->get('thelia.admin.edition.lang');
+ if (!$lang) {
+ $lang = LangQuery::create()->filterByByDefault(1)->findOne();
+ }
+
+ $value = HookAnalytics::getConfigValue('hookanalytics_trackingcode', '', $lang->getLocale());
+ $form->add(
+ 'trackingcode',
+ TextType::class,
+ [
+ 'data' => $value,
+ 'label' => Translator::getInstance()->trans('Tracking Code'),
+ 'label_attr' => [
+ 'for' => 'trackingcode',
+ ],
+ ]
+ );
+ }
+
+ /**
+ * @return string the name of you form. This name must be unique
+ */
+ public static function getName()
+ {
+ return 'hookanalytics';
+ }
+}
diff --git a/domokits/local/modules/HookAnalytics/Hook/FrontHook.php b/domokits/local/modules/HookAnalytics/Hook/FrontHook.php
new file mode 100644
index 0000000..9d20dd7
--- /dev/null
+++ b/domokits/local/modules/HookAnalytics/Hook/FrontHook.php
@@ -0,0 +1,36 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookAnalytics\Hook;
+
+use HookAnalytics\HookAnalytics;
+use Thelia\Core\Event\Hook\HookRenderEvent;
+use Thelia\Core\Hook\BaseHook;
+
+/**
+ * Class FrontHook.
+ *
+ * @author Julien Chanséaume
+ */
+class FrontHook extends BaseHook
+{
+ public function onMainHeadBottom(HookRenderEvent $event): void
+ {
+ $lang = $this->getRequest()->getSession()->get('thelia.current.lang');
+ if (null !== $lang) {
+ $value = trim(HookAnalytics::getConfigValue('hookanalytics_trackingcode', '', $lang->getLocale()));
+ if ('' != $value) {
+ $event->add($value);
+ }
+ }
+ }
+}
diff --git a/domokits/local/modules/HookAnalytics/HookAnalytics.php b/domokits/local/modules/HookAnalytics/HookAnalytics.php
new file mode 100644
index 0000000..276a3cf
--- /dev/null
+++ b/domokits/local/modules/HookAnalytics/HookAnalytics.php
@@ -0,0 +1,35 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookAnalytics;
+
+use Propel\Runtime\Connection\ConnectionInterface;
+use Thelia\Model\ConfigQuery;
+use Thelia\Model\LangQuery;
+use Thelia\Module\BaseModule;
+
+class HookAnalytics extends BaseModule
+{
+ public function update($currentVersion, $newVersion, ConnectionInterface $con = null): void
+ {
+ if (($config = ConfigQuery::read('hookanalytics_trackingcode', ''))
+ && version_compare($newVersion, '2.4.4', '>=')
+ && version_compare($currentVersion, '2.4.4', '<')) {
+ $langs = LangQuery::create()->filterByActive()->find();
+ if ($config) {
+ foreach ($langs as $lang) {
+ self::setConfigValue('hookanalytics_trackingcode', $config, $lang->getLocale());
+ }
+ }
+ }
+ }
+}
diff --git a/domokits/local/modules/HookAnalytics/I18n/backOffice/default/de_DE.php b/domokits/local/modules/HookAnalytics/I18n/backOffice/default/de_DE.php
new file mode 100644
index 0000000..f9954c0
--- /dev/null
+++ b/domokits/local/modules/HookAnalytics/I18n/backOffice/default/de_DE.php
@@ -0,0 +1,17 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'An error occured' => 'Ein Fehler ist aufgetreten',
+ 'Edit your analytics configuration.' => 'Analytics-Konfiguration bearbeiten.',
+ 'Save' => 'Speichern',
+];
diff --git a/domokits/local/modules/HookAnalytics/I18n/backOffice/default/en_US.php b/domokits/local/modules/HookAnalytics/I18n/backOffice/default/en_US.php
new file mode 100755
index 0000000..ff7e107
--- /dev/null
+++ b/domokits/local/modules/HookAnalytics/I18n/backOffice/default/en_US.php
@@ -0,0 +1,17 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'An error occured' => 'An error occured',
+ 'Edit your analytics configuration.' => 'Edit your analytics configuration.',
+ 'Save' => 'Save',
+];
diff --git a/domokits/local/modules/HookAnalytics/I18n/backOffice/default/fr_FR.php b/domokits/local/modules/HookAnalytics/I18n/backOffice/default/fr_FR.php
new file mode 100644
index 0000000..0dec381
--- /dev/null
+++ b/domokits/local/modules/HookAnalytics/I18n/backOffice/default/fr_FR.php
@@ -0,0 +1,17 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'An error occured' => 'Une erreur est survenue',
+ 'Edit your analytics configuration.' => 'Modifier la configuration des statistiques',
+ 'Save' => ' Enregistrer',
+];
diff --git a/domokits/local/modules/HookAnalytics/I18n/backOffice/default/it_IT.php b/domokits/local/modules/HookAnalytics/I18n/backOffice/default/it_IT.php
new file mode 100644
index 0000000..672ee79
--- /dev/null
+++ b/domokits/local/modules/HookAnalytics/I18n/backOffice/default/it_IT.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Save' => 'Salvare',
+];
diff --git a/domokits/local/modules/HookAnalytics/I18n/backOffice/default/ru_RU.php b/domokits/local/modules/HookAnalytics/I18n/backOffice/default/ru_RU.php
new file mode 100755
index 0000000..34e6d98
--- /dev/null
+++ b/domokits/local/modules/HookAnalytics/I18n/backOffice/default/ru_RU.php
@@ -0,0 +1,17 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'An error occured' => 'Произошла ошибка',
+ 'Edit your analytics configuration.' => 'Редактировать вашу конфигурацию аналитики',
+ 'Save' => 'Сохранить',
+];
diff --git a/domokits/local/modules/HookAnalytics/I18n/backOffice/default/tr_TR.php b/domokits/local/modules/HookAnalytics/I18n/backOffice/default/tr_TR.php
new file mode 100644
index 0000000..e370995
--- /dev/null
+++ b/domokits/local/modules/HookAnalytics/I18n/backOffice/default/tr_TR.php
@@ -0,0 +1,17 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'An error occured' => 'Bir hata meydana geldi',
+ 'Edit your analytics configuration.' => 'Analytics yapılandırmanızı düzenleyin.',
+ 'Save' => 'kaydet',
+];
diff --git a/domokits/local/modules/HookAnalytics/I18n/de_DE.php b/domokits/local/modules/HookAnalytics/I18n/de_DE.php
new file mode 100644
index 0000000..81886cd
--- /dev/null
+++ b/domokits/local/modules/HookAnalytics/I18n/de_DE.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Tracking Code' => 'Tracking-Code',
+];
diff --git a/domokits/local/modules/HookAnalytics/I18n/en_US.php b/domokits/local/modules/HookAnalytics/I18n/en_US.php
new file mode 100755
index 0000000..c4078df
--- /dev/null
+++ b/domokits/local/modules/HookAnalytics/I18n/en_US.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Tracking Code' => 'Tracking Code',
+];
diff --git a/domokits/local/modules/HookAnalytics/I18n/fr_FR.php b/domokits/local/modules/HookAnalytics/I18n/fr_FR.php
new file mode 100755
index 0000000..77c7d34
--- /dev/null
+++ b/domokits/local/modules/HookAnalytics/I18n/fr_FR.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Tracking Code' => 'Code de suivi',
+];
diff --git a/domokits/local/modules/HookAnalytics/I18n/frontOffice/default/de_DE.php b/domokits/local/modules/HookAnalytics/I18n/frontOffice/default/de_DE.php
new file mode 100644
index 0000000..12b828e
--- /dev/null
+++ b/domokits/local/modules/HookAnalytics/I18n/frontOffice/default/de_DE.php
@@ -0,0 +1,20 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Facebook' => 'Facebook',
+ 'Google+' => 'Google+',
+ 'Instagram' => 'Instagram',
+ 'RSS' => 'RSS-Feed',
+ 'Twitter' => 'Twitter',
+ 'Youtube' => 'YouTube',
+];
diff --git a/domokits/local/modules/HookAnalytics/I18n/frontOffice/default/en_US.php b/domokits/local/modules/HookAnalytics/I18n/frontOffice/default/en_US.php
new file mode 100755
index 0000000..7ca6666
--- /dev/null
+++ b/domokits/local/modules/HookAnalytics/I18n/frontOffice/default/en_US.php
@@ -0,0 +1,20 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Facebook' => 'Facebook',
+ 'Google+' => 'Google+',
+ 'Instagram' => 'Instagram',
+ 'RSS' => 'RSS Feed',
+ 'Twitter' => 'Twitter',
+ 'Youtube' => 'Youtube',
+];
diff --git a/domokits/local/modules/HookAnalytics/I18n/frontOffice/default/fr_FR.php b/domokits/local/modules/HookAnalytics/I18n/frontOffice/default/fr_FR.php
new file mode 100755
index 0000000..74465e0
--- /dev/null
+++ b/domokits/local/modules/HookAnalytics/I18n/frontOffice/default/fr_FR.php
@@ -0,0 +1,20 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Facebook' => 'Facebook',
+ 'Google+' => 'Google+',
+ 'Instagram' => 'Instagram',
+ 'RSS' => 'Flux RSS',
+ 'Twitter' => 'Twitter',
+ 'Youtube' => 'Youtube',
+];
diff --git a/domokits/local/modules/HookAnalytics/I18n/frontOffice/default/it_IT.php b/domokits/local/modules/HookAnalytics/I18n/frontOffice/default/it_IT.php
new file mode 100644
index 0000000..b089829
--- /dev/null
+++ b/domokits/local/modules/HookAnalytics/I18n/frontOffice/default/it_IT.php
@@ -0,0 +1,20 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Facebook' => 'Facebook',
+ 'Google+' => 'Google +',
+ 'Instagram' => 'Instagram',
+ 'RSS' => 'RSS Feed',
+ 'Twitter' => 'Twitter',
+ 'Youtube' => 'Youtube',
+];
diff --git a/domokits/local/modules/HookAnalytics/I18n/frontOffice/default/ru_RU.php b/domokits/local/modules/HookAnalytics/I18n/frontOffice/default/ru_RU.php
new file mode 100755
index 0000000..b3b977a
--- /dev/null
+++ b/domokits/local/modules/HookAnalytics/I18n/frontOffice/default/ru_RU.php
@@ -0,0 +1,20 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Facebook' => 'Facebook',
+ 'Google+' => 'Google+',
+ 'Instagram' => 'Instagram',
+ 'RSS' => 'RSS-канал',
+ 'Twitter' => 'Twitter',
+ 'Youtube' => 'Youtube',
+];
diff --git a/domokits/local/modules/HookAnalytics/I18n/frontOffice/default/tr_TR.php b/domokits/local/modules/HookAnalytics/I18n/frontOffice/default/tr_TR.php
new file mode 100644
index 0000000..351bff5
--- /dev/null
+++ b/domokits/local/modules/HookAnalytics/I18n/frontOffice/default/tr_TR.php
@@ -0,0 +1,20 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Facebook' => 'Facebook',
+ 'Google+' => 'Google +',
+ 'Instagram' => 'Instagram',
+ 'RSS' => 'RSS Beslemesi',
+ 'Twitter' => 'Twitter',
+ 'Youtube' => 'Youtube',
+];
diff --git a/domokits/local/modules/HookAnalytics/I18n/it_IT.php b/domokits/local/modules/HookAnalytics/I18n/it_IT.php
new file mode 100644
index 0000000..0a31bcd
--- /dev/null
+++ b/domokits/local/modules/HookAnalytics/I18n/it_IT.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Tracking Code' => 'Codice di monitoraggio',
+];
diff --git a/domokits/local/modules/HookAnalytics/I18n/ru_RU.php b/domokits/local/modules/HookAnalytics/I18n/ru_RU.php
new file mode 100755
index 0000000..ece2499
--- /dev/null
+++ b/domokits/local/modules/HookAnalytics/I18n/ru_RU.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Tracking Code' => 'Код отслеживания',
+];
diff --git a/domokits/local/modules/HookAnalytics/I18n/tr_TR.php b/domokits/local/modules/HookAnalytics/I18n/tr_TR.php
new file mode 100644
index 0000000..4111611
--- /dev/null
+++ b/domokits/local/modules/HookAnalytics/I18n/tr_TR.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Tracking Code' => 'İzleme Kodu',
+];
diff --git a/domokits/local/modules/HookAnalytics/LICENSE.txt b/domokits/local/modules/HookAnalytics/LICENSE.txt
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/domokits/local/modules/HookAnalytics/LICENSE.txt
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/domokits/local/modules/HookAnalytics/composer.json b/domokits/local/modules/HookAnalytics/composer.json
new file mode 100644
index 0000000..efe5231
--- /dev/null
+++ b/domokits/local/modules/HookAnalytics/composer.json
@@ -0,0 +1,11 @@
+{
+ "name": "thelia/hook-analytics-module",
+ "license": "LGPL-3.0+",
+ "type": "thelia-module",
+ "require": {
+ "thelia/installer": "~1.1"
+ },
+ "extra": {
+ "installer-name": "HookAnalytics"
+ }
+}
diff --git a/domokits/local/modules/HookAnalytics/templates/backOffice/default/assets/js/module-configuration.js b/domokits/local/modules/HookAnalytics/templates/backOffice/default/assets/js/module-configuration.js
new file mode 100644
index 0000000..fe180bb
--- /dev/null
+++ b/domokits/local/modules/HookAnalytics/templates/backOffice/default/assets/js/module-configuration.js
@@ -0,0 +1,29 @@
+$(document).ready(function() {
+ $("#hookanalytics-form").on("submit", function(e, data){
+ e.preventDefault();
+ var form = $(this);
+
+ $('body').append('
+
+
+
+
diff --git a/domokits/local/modules/HookCart/Config/config.xml b/domokits/local/modules/HookCart/Config/config.xml
new file mode 100644
index 0000000..f8c3dce
--- /dev/null
+++ b/domokits/local/modules/HookCart/Config/config.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/domokits/local/modules/HookCart/Config/module.xml b/domokits/local/modules/HookCart/Config/module.xml
new file mode 100644
index 0000000..9f67fe6
--- /dev/null
+++ b/domokits/local/modules/HookCart/Config/module.xml
@@ -0,0 +1,24 @@
+
+
+ HookCart\HookCart
+
+ Block Cart
+
+
+ Bloc Panier
+
+
+ en_US
+ fr_FR
+
+ 2.5.4
+
+ Julien Chanséaume
+ jchanseaume@openstudio.fr
+
+ classic
+ 2.5.4
+ alpha
+
diff --git a/domokits/local/modules/HookCart/HookCart.php b/domokits/local/modules/HookCart/HookCart.php
new file mode 100644
index 0000000..5eb0daa
--- /dev/null
+++ b/domokits/local/modules/HookCart/HookCart.php
@@ -0,0 +1,19 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookCart;
+
+use Thelia\Module\BaseModule;
+
+class HookCart extends BaseModule
+{
+}
diff --git a/domokits/local/modules/HookCart/I18n/frontOffice/default/de_DE.php b/domokits/local/modules/HookCart/I18n/frontOffice/default/de_DE.php
new file mode 100644
index 0000000..d59fd8b
--- /dev/null
+++ b/domokits/local/modules/HookCart/I18n/frontOffice/default/de_DE.php
@@ -0,0 +1,19 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Cart' => 'Warenkorb',
+ 'Checkout' => 'Zur Kasse',
+ 'Remove' => 'Entfernen',
+ 'View Cart' => 'Warenkorb anzeigen',
+ 'You have no items in your shopping cart.' => 'Sie haben keine Produkte im Warenkorb',
+];
diff --git a/domokits/local/modules/HookCart/I18n/frontOffice/default/en_US.php b/domokits/local/modules/HookCart/I18n/frontOffice/default/en_US.php
new file mode 100644
index 0000000..c3fea29
--- /dev/null
+++ b/domokits/local/modules/HookCart/I18n/frontOffice/default/en_US.php
@@ -0,0 +1,19 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Cart' => 'Cart',
+ 'Checkout' => 'Checkout',
+ 'Remove' => 'Remove',
+ 'View Cart' => 'View Cart',
+ 'You have no items in your shopping cart.' => 'You have no items in your shopping cart.',
+];
diff --git a/domokits/local/modules/HookCart/I18n/frontOffice/default/fr_FR.php b/domokits/local/modules/HookCart/I18n/frontOffice/default/fr_FR.php
new file mode 100644
index 0000000..e1b0971
--- /dev/null
+++ b/domokits/local/modules/HookCart/I18n/frontOffice/default/fr_FR.php
@@ -0,0 +1,19 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Cart' => 'Panier',
+ 'Checkout' => 'Commande',
+ 'Remove' => 'Supprimer',
+ 'View Cart' => 'Voir le panier',
+ 'You have no items in your shopping cart.' => 'Vous n\'avez pas de produit dans votre panier.',
+];
diff --git a/domokits/local/modules/HookCart/I18n/frontOffice/default/it_IT.php b/domokits/local/modules/HookCart/I18n/frontOffice/default/it_IT.php
new file mode 100644
index 0000000..492fd63
--- /dev/null
+++ b/domokits/local/modules/HookCart/I18n/frontOffice/default/it_IT.php
@@ -0,0 +1,19 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Cart' => 'Carrello',
+ 'Checkout' => 'Procedi all\'acquisto',
+ 'Remove' => 'Rimuovi',
+ 'View Cart' => 'Visualizza il carrello',
+ 'You have no items in your shopping cart.' => 'Non hai nessun prodotto nel tuo carrello.',
+];
diff --git a/domokits/local/modules/HookCart/I18n/frontOffice/default/ru_RU.php b/domokits/local/modules/HookCart/I18n/frontOffice/default/ru_RU.php
new file mode 100644
index 0000000..312788a
--- /dev/null
+++ b/domokits/local/modules/HookCart/I18n/frontOffice/default/ru_RU.php
@@ -0,0 +1,19 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Cart' => 'Корзина',
+ 'Checkout' => 'Оформить',
+ 'Remove' => 'Удалить',
+ 'View Cart' => 'Просмотр',
+ 'You have no items in your shopping cart.' => 'Ваша корзина пуста',
+];
diff --git a/domokits/local/modules/HookCart/I18n/frontOffice/default/tr_TR.php b/domokits/local/modules/HookCart/I18n/frontOffice/default/tr_TR.php
new file mode 100644
index 0000000..8d40125
--- /dev/null
+++ b/domokits/local/modules/HookCart/I18n/frontOffice/default/tr_TR.php
@@ -0,0 +1,19 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Cart' => 'Sepet',
+ 'Checkout' => 'Ödeme yap',
+ 'Remove' => 'Kaldır',
+ 'View Cart' => 'Sepeti Görüntüle',
+ 'You have no items in your shopping cart.' => 'Sepetinizde hiç ürün yok.',
+];
diff --git a/domokits/local/modules/HookCart/LICENSE.txt b/domokits/local/modules/HookCart/LICENSE.txt
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/domokits/local/modules/HookCart/LICENSE.txt
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/domokits/local/modules/HookCart/composer.json b/domokits/local/modules/HookCart/composer.json
new file mode 100644
index 0000000..f56a5cb
--- /dev/null
+++ b/domokits/local/modules/HookCart/composer.json
@@ -0,0 +1,11 @@
+{
+ "name": "thelia/hook-cart-module",
+ "license": "LGPL-3.0+",
+ "type": "thelia-module",
+ "require": {
+ "thelia/installer": "~1.1"
+ },
+ "extra": {
+ "installer-name": "HookCart"
+ }
+}
diff --git a/domokits/local/modules/HookCart/templates/frontOffice/default/assets/css/styles.css b/domokits/local/modules/HookCart/templates/frontOffice/default/assets/css/styles.css
new file mode 100644
index 0000000..e69de29
diff --git a/domokits/local/modules/HookCart/templates/frontOffice/default/main-navbar-secondary.html b/domokits/local/modules/HookCart/templates/frontOffice/default/main-navbar-secondary.html
new file mode 100644
index 0000000..a5df381
--- /dev/null
+++ b/domokits/local/modules/HookCart/templates/frontOffice/default/main-navbar-secondary.html
@@ -0,0 +1,3 @@
+
+ {hook name="mini-cart"}
+
\ No newline at end of file
diff --git a/domokits/local/modules/HookCart/templates/frontOffice/default/mini-cart.html b/domokits/local/modules/HookCart/templates/frontOffice/default/mini-cart.html
new file mode 100644
index 0000000..72be18e
--- /dev/null
+++ b/domokits/local/modules/HookCart/templates/frontOffice/default/mini-cart.html
@@ -0,0 +1,73 @@
+{ifloop rel="cartloop"}
+
{intl l="You have no items in your shopping cart." d="hookcart.fo.default"}
+
+
+{/elseloop}
diff --git a/domokits/local/modules/HookContact/Config/config.xml b/domokits/local/modules/HookContact/Config/config.xml
new file mode 100644
index 0000000..5c54bc9
--- /dev/null
+++ b/domokits/local/modules/HookContact/Config/config.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/domokits/local/modules/HookContact/Config/module.xml b/domokits/local/modules/HookContact/Config/module.xml
new file mode 100644
index 0000000..f1bd006
--- /dev/null
+++ b/domokits/local/modules/HookContact/Config/module.xml
@@ -0,0 +1,24 @@
+
+
+ HookContact\HookContact
+
+ Block Contact
+
+
+ Bloc Contact
+
+
+ en_US
+ fr_FR
+
+ 2.5.4
+
+ Julien Chanséaume
+ jchanseaume@openstudio.fr
+
+ classic
+ 2.5.4
+ alpha
+
diff --git a/domokits/local/modules/HookContact/Hook/FrontHook.php b/domokits/local/modules/HookContact/Hook/FrontHook.php
new file mode 100644
index 0000000..2bde0bf
--- /dev/null
+++ b/domokits/local/modules/HookContact/Hook/FrontHook.php
@@ -0,0 +1,39 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookContact\Hook;
+
+use Thelia\Core\Event\Hook\HookRenderBlockEvent;
+use Thelia\Core\Hook\BaseHook;
+
+/**
+ * Class FrontHook.
+ *
+ * @author Julien Chanséaume
+ */
+class FrontHook extends BaseHook
+{
+ public function onMainFooterBody(HookRenderBlockEvent $event): void
+ {
+ $content = trim($this->render('main-footer-body.html'));
+ if ('' != $content) {
+ $event->add(
+ [
+ 'id' => 'contact-footer-body',
+ 'class' => 'contact',
+ 'title' => $this->trans('Contact', [], 'hookcontact'),
+ 'content' => $content,
+ ]
+ );
+ }
+ }
+}
diff --git a/domokits/local/modules/HookContact/HookContact.php b/domokits/local/modules/HookContact/HookContact.php
new file mode 100644
index 0000000..1f5a4d2
--- /dev/null
+++ b/domokits/local/modules/HookContact/HookContact.php
@@ -0,0 +1,19 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookContact;
+
+use Thelia\Module\BaseModule;
+
+class HookContact extends BaseModule
+{
+}
diff --git a/domokits/local/modules/HookContact/I18n/de_DE.php b/domokits/local/modules/HookContact/I18n/de_DE.php
new file mode 100644
index 0000000..8134ca2
--- /dev/null
+++ b/domokits/local/modules/HookContact/I18n/de_DE.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Contact' => 'Kontakt',
+];
diff --git a/domokits/local/modules/HookContact/I18n/en_US.php b/domokits/local/modules/HookContact/I18n/en_US.php
new file mode 100644
index 0000000..6890337
--- /dev/null
+++ b/domokits/local/modules/HookContact/I18n/en_US.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Contact' => 'Contact',
+];
diff --git a/domokits/local/modules/HookContact/I18n/fr_FR.php b/domokits/local/modules/HookContact/I18n/fr_FR.php
new file mode 100644
index 0000000..6890337
--- /dev/null
+++ b/domokits/local/modules/HookContact/I18n/fr_FR.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Contact' => 'Contact',
+];
diff --git a/domokits/local/modules/HookContact/I18n/frontOffice/default/fr_FR.php b/domokits/local/modules/HookContact/I18n/frontOffice/default/fr_FR.php
new file mode 100644
index 0000000..ec233a8
--- /dev/null
+++ b/domokits/local/modules/HookContact/I18n/frontOffice/default/fr_FR.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Find us, Contact us' => 'Nous trouver, Nous contacter',
+];
diff --git a/domokits/local/modules/HookContact/I18n/frontOffice/default/ru_RU.php b/domokits/local/modules/HookContact/I18n/frontOffice/default/ru_RU.php
new file mode 100644
index 0000000..3b01cd9
--- /dev/null
+++ b/domokits/local/modules/HookContact/I18n/frontOffice/default/ru_RU.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Find us, Contact us' => 'Найти нас, Связаться с нами',
+];
diff --git a/domokits/local/modules/HookContact/I18n/it_IT.php b/domokits/local/modules/HookContact/I18n/it_IT.php
new file mode 100644
index 0000000..71e5dd4
--- /dev/null
+++ b/domokits/local/modules/HookContact/I18n/it_IT.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Contact' => 'Contatta',
+];
diff --git a/domokits/local/modules/HookContact/I18n/ru_RU.php b/domokits/local/modules/HookContact/I18n/ru_RU.php
new file mode 100644
index 0000000..fdfc258
--- /dev/null
+++ b/domokits/local/modules/HookContact/I18n/ru_RU.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Contact' => 'Контакты',
+];
diff --git a/domokits/local/modules/HookContact/I18n/tr_TR.php b/domokits/local/modules/HookContact/I18n/tr_TR.php
new file mode 100644
index 0000000..c60f40d
--- /dev/null
+++ b/domokits/local/modules/HookContact/I18n/tr_TR.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Contact' => 'İletişim',
+];
diff --git a/domokits/local/modules/HookContact/LICENSE.txt b/domokits/local/modules/HookContact/LICENSE.txt
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/domokits/local/modules/HookContact/LICENSE.txt
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/domokits/local/modules/HookContact/composer.json b/domokits/local/modules/HookContact/composer.json
new file mode 100644
index 0000000..2ecdb22
--- /dev/null
+++ b/domokits/local/modules/HookContact/composer.json
@@ -0,0 +1,11 @@
+{
+ "name": "thelia/hook-contact-module",
+ "license": "LGPL-3.0+",
+ "type": "thelia-module",
+ "require": {
+ "thelia/installer": "~1.1"
+ },
+ "extra": {
+ "installer-name": "HookContact"
+ }
+}
diff --git a/domokits/local/modules/HookContact/templates/frontOffice/default/main-footer-body.html b/domokits/local/modules/HookContact/templates/frontOffice/default/main-footer-body.html
new file mode 100644
index 0000000..9eea38b
--- /dev/null
+++ b/domokits/local/modules/HookContact/templates/frontOffice/default/main-footer-body.html
@@ -0,0 +1,25 @@
+
diff --git a/domokits/local/modules/HookCurrency/Config/config.xml b/domokits/local/modules/HookCurrency/Config/config.xml
new file mode 100644
index 0000000..1b5deb7
--- /dev/null
+++ b/domokits/local/modules/HookCurrency/Config/config.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/domokits/local/modules/HookCurrency/Config/module.xml b/domokits/local/modules/HookCurrency/Config/module.xml
new file mode 100644
index 0000000..e15a292
--- /dev/null
+++ b/domokits/local/modules/HookCurrency/Config/module.xml
@@ -0,0 +1,24 @@
+
+
+ HookCurrency\HookCurrency
+
+ Block Currency
+
+
+ Bloc Devise
+
+
+ en_US
+ fr_FR
+
+ 2.5.4
+
+ Julien Chanséaume
+ jchanseaume@openstudio.fr
+
+ classic
+ 2.5.4
+ alpha
+
diff --git a/domokits/local/modules/HookCurrency/HookCurrency.php b/domokits/local/modules/HookCurrency/HookCurrency.php
new file mode 100644
index 0000000..d321ca3
--- /dev/null
+++ b/domokits/local/modules/HookCurrency/HookCurrency.php
@@ -0,0 +1,19 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookCurrency;
+
+use Thelia\Module\BaseModule;
+
+class HookCurrency extends BaseModule
+{
+}
diff --git a/domokits/local/modules/HookCurrency/LICENSE.txt b/domokits/local/modules/HookCurrency/LICENSE.txt
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/domokits/local/modules/HookCurrency/LICENSE.txt
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/domokits/local/modules/HookCurrency/composer.json b/domokits/local/modules/HookCurrency/composer.json
new file mode 100644
index 0000000..5876794
--- /dev/null
+++ b/domokits/local/modules/HookCurrency/composer.json
@@ -0,0 +1,11 @@
+{
+ "name": "thelia/hook-currency-module",
+ "license": "LGPL-3.0+",
+ "type": "thelia-module",
+ "require": {
+ "thelia/installer": "~1.1"
+ },
+ "extra": {
+ "installer-name": "HookCurrency"
+ }
+}
diff --git a/domokits/local/modules/HookCurrency/templates/frontOffice/default/main-navbar-secondary.html b/domokits/local/modules/HookCurrency/templates/frontOffice/default/main-navbar-secondary.html
new file mode 100644
index 0000000..0a8faad
--- /dev/null
+++ b/domokits/local/modules/HookCurrency/templates/frontOffice/default/main-navbar-secondary.html
@@ -0,0 +1,10 @@
+
\ No newline at end of file
diff --git a/domokits/local/modules/HookCustomer/Config/config.xml b/domokits/local/modules/HookCustomer/Config/config.xml
new file mode 100644
index 0000000..63a29ce
--- /dev/null
+++ b/domokits/local/modules/HookCustomer/Config/config.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/domokits/local/modules/HookCustomer/Config/module.xml b/domokits/local/modules/HookCustomer/Config/module.xml
new file mode 100644
index 0000000..9d442cd
--- /dev/null
+++ b/domokits/local/modules/HookCustomer/Config/module.xml
@@ -0,0 +1,24 @@
+
+
+ HookCustomer\HookCustomer
+
+ Block Customer
+
+
+ Bloc Client
+
+
+ en_US
+ fr_FR
+
+ 2.5.4
+
+ Julien Chanséaume
+ jchanseaume@openstudio.fr
+
+ classic
+ 2.5.4
+ alpha
+
diff --git a/domokits/local/modules/HookCustomer/HookCustomer.php b/domokits/local/modules/HookCustomer/HookCustomer.php
new file mode 100644
index 0000000..0f7f8c4
--- /dev/null
+++ b/domokits/local/modules/HookCustomer/HookCustomer.php
@@ -0,0 +1,19 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookCustomer;
+
+use Thelia\Module\BaseModule;
+
+class HookCustomer extends BaseModule
+{
+}
diff --git a/domokits/local/modules/HookCustomer/I18n/frontOffice/default/de_DE.php b/domokits/local/modules/HookCustomer/I18n/frontOffice/default/de_DE.php
new file mode 100644
index 0000000..91ab712
--- /dev/null
+++ b/domokits/local/modules/HookCustomer/I18n/frontOffice/default/de_DE.php
@@ -0,0 +1,23 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Email address' => 'E-mail Adresse',
+ 'Forgot your Password?' => 'Haben sir Ihr Passwort vergessen ?',
+ 'Log In!' => 'Log In!',
+ 'Log out!' => 'Log out!',
+ 'My Account' => 'Mein Kundenkonto',
+ 'Password' => 'Passwort',
+ 'Register' => 'Registrieren',
+ 'Register!' => 'Registrieren!',
+ 'Sign In' => 'Registrieren',
+];
diff --git a/domokits/local/modules/HookCustomer/I18n/frontOffice/default/en_US.php b/domokits/local/modules/HookCustomer/I18n/frontOffice/default/en_US.php
new file mode 100644
index 0000000..bf1b235
--- /dev/null
+++ b/domokits/local/modules/HookCustomer/I18n/frontOffice/default/en_US.php
@@ -0,0 +1,23 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Email address' => 'Email address',
+ 'Forgot your Password?' => 'Forgot your Password?',
+ 'Log In!' => 'Log In!',
+ 'Log out!' => 'Log out!',
+ 'My Account' => 'My Account',
+ 'Password' => 'Password',
+ 'Register' => 'Register',
+ 'Register!' => 'Register!',
+ 'Sign In' => 'Sign In',
+];
diff --git a/domokits/local/modules/HookCustomer/I18n/frontOffice/default/fr_FR.php b/domokits/local/modules/HookCustomer/I18n/frontOffice/default/fr_FR.php
new file mode 100644
index 0000000..ae76cbe
--- /dev/null
+++ b/domokits/local/modules/HookCustomer/I18n/frontOffice/default/fr_FR.php
@@ -0,0 +1,23 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Email address' => 'Adresse e-mail',
+ 'Forgot your Password?' => "Mot de passe oublié\u{a0}?",
+ 'Log In!' => 'Se connecter',
+ 'Log out!' => 'Se déconnecter',
+ 'My Account' => 'Mon compte',
+ 'Password' => 'Mot de passe',
+ 'Register' => 'S\'inscrire',
+ 'Register!' => 'Enregistrez-vous !',
+ 'Sign In' => 'Se connecter',
+];
diff --git a/domokits/local/modules/HookCustomer/I18n/frontOffice/default/it_IT.php b/domokits/local/modules/HookCustomer/I18n/frontOffice/default/it_IT.php
new file mode 100644
index 0000000..05f1353
--- /dev/null
+++ b/domokits/local/modules/HookCustomer/I18n/frontOffice/default/it_IT.php
@@ -0,0 +1,23 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Email address' => 'Indirizzo email',
+ 'Forgot your Password?' => 'Hai dimenticato la password?',
+ 'Log In!' => 'Accedi!',
+ 'Log out!' => 'Esci!',
+ 'My Account' => 'Mio account',
+ 'Password' => 'Password',
+ 'Register' => 'Registrati',
+ 'Register!' => 'Registrati!',
+ 'Sign In' => 'Accedi',
+];
diff --git a/domokits/local/modules/HookCustomer/I18n/frontOffice/default/ru_RU.php b/domokits/local/modules/HookCustomer/I18n/frontOffice/default/ru_RU.php
new file mode 100644
index 0000000..741d6ea
--- /dev/null
+++ b/domokits/local/modules/HookCustomer/I18n/frontOffice/default/ru_RU.php
@@ -0,0 +1,23 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Email address' => 'Адрес email',
+ 'Forgot your Password?' => 'Забыли пароль?',
+ 'Log In!' => 'Вход',
+ 'Log out!' => 'Выход',
+ 'My Account' => 'Мой аккаунт',
+ 'Password' => 'Пароль',
+ 'Register' => 'Регистрация',
+ 'Register!' => 'Регистрация',
+ 'Sign In' => 'Войти',
+];
diff --git a/domokits/local/modules/HookCustomer/I18n/frontOffice/default/tr_TR.php b/domokits/local/modules/HookCustomer/I18n/frontOffice/default/tr_TR.php
new file mode 100644
index 0000000..791ffc1
--- /dev/null
+++ b/domokits/local/modules/HookCustomer/I18n/frontOffice/default/tr_TR.php
@@ -0,0 +1,23 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Email address' => 'Eposta adresi',
+ 'Forgot your Password?' => 'Parolanızı mı unuttunuz?',
+ 'Log In!' => 'Oturum aç!',
+ 'Log out!' => 'Çıkış Yap!',
+ 'My Account' => 'Hesabım',
+ 'Password' => 'Parola',
+ 'Register' => 'Kaydol',
+ 'Register!' => 'Kayıt ol!',
+ 'Sign In' => 'Oturum Aç',
+];
diff --git a/domokits/local/modules/HookCustomer/LICENSE.txt b/domokits/local/modules/HookCustomer/LICENSE.txt
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/domokits/local/modules/HookCustomer/LICENSE.txt
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/domokits/local/modules/HookCustomer/composer.json b/domokits/local/modules/HookCustomer/composer.json
new file mode 100644
index 0000000..d081b40
--- /dev/null
+++ b/domokits/local/modules/HookCustomer/composer.json
@@ -0,0 +1,11 @@
+{
+ "name": "thelia/hook-customer-module",
+ "license": "LGPL-3.0+",
+ "type": "thelia-module",
+ "require": {
+ "thelia/installer": "~1.1"
+ },
+ "extra": {
+ "installer-name": "HookCustomer"
+ }
+}
diff --git a/domokits/local/modules/HookCustomer/templates/frontOffice/default/assets/css/styles.css b/domokits/local/modules/HookCustomer/templates/frontOffice/default/assets/css/styles.css
new file mode 100644
index 0000000..e69de29
diff --git a/domokits/local/modules/HookCustomer/templates/frontOffice/default/main-navbar-secondary.html b/domokits/local/modules/HookCustomer/templates/frontOffice/default/main-navbar-secondary.html
new file mode 100644
index 0000000..23884cb
--- /dev/null
+++ b/domokits/local/modules/HookCustomer/templates/frontOffice/default/main-navbar-secondary.html
@@ -0,0 +1,43 @@
+
diff --git a/domokits/local/modules/HookLang/Config/config.xml b/domokits/local/modules/HookLang/Config/config.xml
new file mode 100644
index 0000000..d30cb54
--- /dev/null
+++ b/domokits/local/modules/HookLang/Config/config.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/domokits/local/modules/HookLang/Config/module.xml b/domokits/local/modules/HookLang/Config/module.xml
new file mode 100644
index 0000000..dec1ec4
--- /dev/null
+++ b/domokits/local/modules/HookLang/Config/module.xml
@@ -0,0 +1,24 @@
+
+
+ HookLang\HookLang
+
+ Block Languages
+
+
+ Bloc langages
+
+
+ en_US
+ fr_FR
+
+ 2.5.4
+
+ Julien Chanséaume
+ jchanseaume@openstudio.fr
+
+ classic
+ 2.5.4
+ alpha
+
diff --git a/domokits/local/modules/HookLang/HookLang.php b/domokits/local/modules/HookLang/HookLang.php
new file mode 100644
index 0000000..942251a
--- /dev/null
+++ b/domokits/local/modules/HookLang/HookLang.php
@@ -0,0 +1,19 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookLang;
+
+use Thelia\Module\BaseModule;
+
+class HookLang extends BaseModule
+{
+}
diff --git a/domokits/local/modules/HookLang/LICENSE.txt b/domokits/local/modules/HookLang/LICENSE.txt
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/domokits/local/modules/HookLang/LICENSE.txt
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/domokits/local/modules/HookLang/composer.json b/domokits/local/modules/HookLang/composer.json
new file mode 100644
index 0000000..c533864
--- /dev/null
+++ b/domokits/local/modules/HookLang/composer.json
@@ -0,0 +1,11 @@
+{
+ "name": "thelia/hook-lang-module",
+ "license": "LGPL-3.0+",
+ "type": "thelia-module",
+ "require": {
+ "thelia/installer": "~1.1"
+ },
+ "extra": {
+ "installer-name": "HookLang"
+ }
+}
diff --git a/domokits/local/modules/HookLang/templates/frontOffice/default/main-navbar-secondary.html b/domokits/local/modules/HookLang/templates/frontOffice/default/main-navbar-secondary.html
new file mode 100644
index 0000000..a61a7a1
--- /dev/null
+++ b/domokits/local/modules/HookLang/templates/frontOffice/default/main-navbar-secondary.html
@@ -0,0 +1,10 @@
+
\ No newline at end of file
diff --git a/domokits/local/modules/HookLinks/Config/config.xml b/domokits/local/modules/HookLinks/Config/config.xml
new file mode 100644
index 0000000..6036b5d
--- /dev/null
+++ b/domokits/local/modules/HookLinks/Config/config.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/domokits/local/modules/HookLinks/Config/module.xml b/domokits/local/modules/HookLinks/Config/module.xml
new file mode 100644
index 0000000..1432106
--- /dev/null
+++ b/domokits/local/modules/HookLinks/Config/module.xml
@@ -0,0 +1,24 @@
+
+
+ HookLinks\HookLinks
+
+ Block Useful links
+
+
+ Bloc Liens utiles
+
+
+ en_US
+ fr_FR
+
+ 2.5.4
+
+ Julien Chanséaume
+ jchanseaume@openstudio.fr
+
+ classic
+ 2.5.4
+ alpha
+
diff --git a/domokits/local/modules/HookLinks/Hook/FrontHook.php b/domokits/local/modules/HookLinks/Hook/FrontHook.php
new file mode 100644
index 0000000..ae69771
--- /dev/null
+++ b/domokits/local/modules/HookLinks/Hook/FrontHook.php
@@ -0,0 +1,37 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookLinks\Hook;
+
+use Thelia\Core\Event\Hook\HookRenderBlockEvent;
+use Thelia\Core\Hook\BaseHook;
+
+/**
+ * Class FrontHook.
+ *
+ * @author Julien Chanséaume
+ */
+class FrontHook extends BaseHook
+{
+ public function onMainFooterBody(HookRenderBlockEvent $event): void
+ {
+ $content = trim($this->render('main-footer-body.html'));
+ if ('' != $content) {
+ $event->add([
+ 'id' => 'links-footer-body',
+ 'class' => 'default',
+ 'title' => $this->trans('Useful links', [], 'hooklinks'),
+ 'content' => $content,
+ ]);
+ }
+ }
+}
diff --git a/domokits/local/modules/HookLinks/HookLinks.php b/domokits/local/modules/HookLinks/HookLinks.php
new file mode 100644
index 0000000..31677b5
--- /dev/null
+++ b/domokits/local/modules/HookLinks/HookLinks.php
@@ -0,0 +1,19 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookLinks;
+
+use Thelia\Module\BaseModule;
+
+class HookLinks extends BaseModule
+{
+}
diff --git a/domokits/local/modules/HookLinks/I18n/de_DE.php b/domokits/local/modules/HookLinks/I18n/de_DE.php
new file mode 100644
index 0000000..5f92cfe
--- /dev/null
+++ b/domokits/local/modules/HookLinks/I18n/de_DE.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Useful links' => 'Nützliche Links',
+];
diff --git a/domokits/local/modules/HookLinks/I18n/en_US.php b/domokits/local/modules/HookLinks/I18n/en_US.php
new file mode 100644
index 0000000..cbbd670
--- /dev/null
+++ b/domokits/local/modules/HookLinks/I18n/en_US.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Useful links' => 'Useful links',
+];
diff --git a/domokits/local/modules/HookLinks/I18n/fr_FR.php b/domokits/local/modules/HookLinks/I18n/fr_FR.php
new file mode 100644
index 0000000..2495350
--- /dev/null
+++ b/domokits/local/modules/HookLinks/I18n/fr_FR.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Useful links' => 'Liens utiles',
+];
diff --git a/domokits/local/modules/HookLinks/I18n/frontOffice/default/de_DE.php b/domokits/local/modules/HookLinks/I18n/frontOffice/default/de_DE.php
new file mode 100644
index 0000000..6291da6
--- /dev/null
+++ b/domokits/local/modules/HookLinks/I18n/frontOffice/default/de_DE.php
@@ -0,0 +1,20 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Cart' => 'Warenkorb',
+ 'Checkout' => 'Zur Kasse',
+ 'Log out!' => 'Log out!',
+ 'Login' => 'Anmeldung',
+ 'My Account' => 'Mein Kundenkonto',
+ 'Register' => 'Registrieren',
+];
diff --git a/domokits/local/modules/HookLinks/I18n/frontOffice/default/en_US.php b/domokits/local/modules/HookLinks/I18n/frontOffice/default/en_US.php
new file mode 100644
index 0000000..08ef935
--- /dev/null
+++ b/domokits/local/modules/HookLinks/I18n/frontOffice/default/en_US.php
@@ -0,0 +1,20 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Cart' => 'Cart',
+ 'Checkout' => 'Checkout',
+ 'Log out!' => 'Log out!',
+ 'Login' => 'Login',
+ 'My Account' => 'My Account',
+ 'Register' => 'Register',
+];
diff --git a/domokits/local/modules/HookLinks/I18n/frontOffice/default/fr_FR.php b/domokits/local/modules/HookLinks/I18n/frontOffice/default/fr_FR.php
new file mode 100644
index 0000000..b0a9707
--- /dev/null
+++ b/domokits/local/modules/HookLinks/I18n/frontOffice/default/fr_FR.php
@@ -0,0 +1,20 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Cart' => 'Panier',
+ 'Checkout' => 'Commander',
+ 'Log out!' => 'Se déconnecter',
+ 'Login' => 'Connexion',
+ 'My Account' => 'Mon compte',
+ 'Register' => 'S\'inscrire',
+];
diff --git a/domokits/local/modules/HookLinks/I18n/frontOffice/default/it_IT.php b/domokits/local/modules/HookLinks/I18n/frontOffice/default/it_IT.php
new file mode 100644
index 0000000..0a53f32
--- /dev/null
+++ b/domokits/local/modules/HookLinks/I18n/frontOffice/default/it_IT.php
@@ -0,0 +1,20 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Cart' => 'Carrello',
+ 'Checkout' => 'Procedi all\'acquisto',
+ 'Log out!' => 'Esci!',
+ 'Login' => 'Login',
+ 'My Account' => 'Mio account',
+ 'Register' => 'Registrati',
+];
diff --git a/domokits/local/modules/HookLinks/I18n/frontOffice/default/ru_RU.php b/domokits/local/modules/HookLinks/I18n/frontOffice/default/ru_RU.php
new file mode 100644
index 0000000..e0a8ca7
--- /dev/null
+++ b/domokits/local/modules/HookLinks/I18n/frontOffice/default/ru_RU.php
@@ -0,0 +1,20 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Cart' => 'Корзина',
+ 'Checkout' => 'Оформить заказ',
+ 'Log out!' => 'Выход',
+ 'Login' => 'Вход',
+ 'My Account' => 'Мой аккаунт',
+ 'Register' => 'Регистрация',
+];
diff --git a/domokits/local/modules/HookLinks/I18n/frontOffice/default/tr_TR.php b/domokits/local/modules/HookLinks/I18n/frontOffice/default/tr_TR.php
new file mode 100644
index 0000000..47986c4
--- /dev/null
+++ b/domokits/local/modules/HookLinks/I18n/frontOffice/default/tr_TR.php
@@ -0,0 +1,20 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Cart' => 'Sepet',
+ 'Checkout' => 'Ödeme yap',
+ 'Log out!' => 'Çıkış Yap!',
+ 'Login' => 'Giriş yap',
+ 'My Account' => 'Hesabım',
+ 'Register' => 'Kaydol',
+];
diff --git a/domokits/local/modules/HookLinks/I18n/it_IT.php b/domokits/local/modules/HookLinks/I18n/it_IT.php
new file mode 100644
index 0000000..085177a
--- /dev/null
+++ b/domokits/local/modules/HookLinks/I18n/it_IT.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Useful links' => 'Link utili',
+];
diff --git a/domokits/local/modules/HookLinks/I18n/ru_RU.php b/domokits/local/modules/HookLinks/I18n/ru_RU.php
new file mode 100644
index 0000000..ca008ad
--- /dev/null
+++ b/domokits/local/modules/HookLinks/I18n/ru_RU.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Useful links' => 'Полезные ссылки',
+];
diff --git a/domokits/local/modules/HookLinks/I18n/tr_TR.php b/domokits/local/modules/HookLinks/I18n/tr_TR.php
new file mode 100644
index 0000000..4895238
--- /dev/null
+++ b/domokits/local/modules/HookLinks/I18n/tr_TR.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Useful links' => 'Faydalı Linkler',
+];
diff --git a/domokits/local/modules/HookLinks/LICENSE.txt b/domokits/local/modules/HookLinks/LICENSE.txt
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/domokits/local/modules/HookLinks/LICENSE.txt
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/domokits/local/modules/HookLinks/composer.json b/domokits/local/modules/HookLinks/composer.json
new file mode 100644
index 0000000..23abd78
--- /dev/null
+++ b/domokits/local/modules/HookLinks/composer.json
@@ -0,0 +1,11 @@
+{
+ "name": "thelia/hook-links-module",
+ "license": "LGPL-3.0+",
+ "type": "thelia-module",
+ "require": {
+ "thelia/installer": "~1.1"
+ },
+ "extra": {
+ "installer-name": "HookLinks"
+ }
+}
diff --git a/domokits/local/modules/HookLinks/templates/frontOffice/default/main-footer-body.html b/domokits/local/modules/HookLinks/templates/frontOffice/default/main-footer-body.html
new file mode 100644
index 0000000..08607f0
--- /dev/null
+++ b/domokits/local/modules/HookLinks/templates/frontOffice/default/main-footer-body.html
@@ -0,0 +1,15 @@
+
\ No newline at end of file
diff --git a/domokits/local/modules/HookNavigation/Config/config.xml b/domokits/local/modules/HookNavigation/Config/config.xml
new file mode 100644
index 0000000..1da4b2b
--- /dev/null
+++ b/domokits/local/modules/HookNavigation/Config/config.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/domokits/local/modules/HookNavigation/Config/module.xml b/domokits/local/modules/HookNavigation/Config/module.xml
new file mode 100644
index 0000000..a96cbc3
--- /dev/null
+++ b/domokits/local/modules/HookNavigation/Config/module.xml
@@ -0,0 +1,24 @@
+
+
+ HookNavigation\HookNavigation
+
+ Block Navigation
+
+
+ Bloc Menu
+
+
+ en_US
+ fr_FR
+
+ 2.5.4
+
+ Julien Chanséaume
+ jchanseaume@openstudio.fr
+
+ classic
+ 2.5.4
+ alpha
+
diff --git a/domokits/local/modules/HookNavigation/Config/routing.xml b/domokits/local/modules/HookNavigation/Config/routing.xml
new file mode 100644
index 0000000..b8c3028
--- /dev/null
+++ b/domokits/local/modules/HookNavigation/Config/routing.xml
@@ -0,0 +1,9 @@
+
+
+
+ HookNavigation\Controller\HookNavigationConfigController::defaultAction
+
+
+ HookNavigation\Controller\HookNavigationConfigController::saveAction
+
+
diff --git a/domokits/local/modules/HookNavigation/Controller/HookNavigationConfigController.php b/domokits/local/modules/HookNavigation/Controller/HookNavigationConfigController.php
new file mode 100644
index 0000000..a173791
--- /dev/null
+++ b/domokits/local/modules/HookNavigation/Controller/HookNavigationConfigController.php
@@ -0,0 +1,87 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookNavigation\Controller;
+
+use HookNavigation\HookNavigation;
+use HookNavigation\Model\Config\HookNavigationConfigValue;
+use Thelia\Controller\Admin\BaseAdminController;
+use Thelia\Core\HttpFoundation\Request;
+use Thelia\Core\HttpFoundation\Session\Session;
+use Thelia\Core\Template\ParserContext;
+use Thelia\Core\Translation\Translator;
+use Thelia\Form\Exception\FormValidationException;
+use Thelia\Tools\URL;
+
+/**
+ * Class HookNavigationConfigController.
+ *
+ * @author Etienne PERRIERE - OpenStudio
+ */
+class HookNavigationConfigController extends BaseAdminController
+{
+ public function defaultAction(Session $session)
+ {
+ $bodyConfig = HookNavigation::getConfigValue(HookNavigationConfigValue::FOOTER_BODY_FOLDER_ID);
+ $bottomConfig = HookNavigation::getConfigValue(HookNavigationConfigValue::FOOTER_BOTTOM_FOLDER_ID);
+
+ $session->getFlashBag()->set('bodyConfig', $bodyConfig ?? '');
+ $session->getFlashBag()->set('bottomConfig', $bottomConfig ?? '');
+
+ return $this->render('hooknavigation-configuration');
+ }
+
+ public function saveAction(Request $request, Translator $translator, ParserContext $parserContext)
+ {
+ $baseForm = $this->createForm('hooknavigation.configuration');
+
+ $errorMessage = null;
+
+ $parserContext->set('success', true);
+
+ try {
+ $form = $this->validateForm($baseForm);
+ $data = $form->getData();
+
+ HookNavigation::setConfigValue(HookNavigationConfigValue::FOOTER_BODY_FOLDER_ID, \is_bool($data['footer_body_folder_id']) ? (int) ($data['footer_body_folder_id']) : $data['footer_body_folder_id']);
+ HookNavigation::setConfigValue(HookNavigationConfigValue::FOOTER_BOTTOM_FOLDER_ID, \is_bool($data['footer_bottom_folder_id']) ? (int) ($data['footer_bottom_folder_id']) : $data['footer_bottom_folder_id']);
+
+ if ($request->get('save_mode') !== 'stay') {
+ // Redirect to module list
+ return $this->generateRedirect(URL::getInstance()->absoluteUrl('/admin/modules'));
+ }
+ } catch (FormValidationException $ex) {
+ // Invalid data entered
+ $errorMessage = $this->createStandardFormValidationErrorMessage($ex);
+ } catch (\Exception $ex) {
+ // Any other error
+ $errorMessage = $translator->trans(
+ 'Sorry, an error occurred: %err',
+ ['%err' => $ex->getMessage()],
+ HookNavigation::MESSAGE_DOMAIN
+ );
+ }
+
+ if (null !== $errorMessage) {
+ // Mark the form as with error
+ $baseForm->setErrorMessage($errorMessage);
+
+ // Send the form and the error to the parser
+ $parserContext
+ ->addForm($baseForm)
+ ->setGeneralError($errorMessage)
+ ;
+ }
+
+ return $this->defaultAction($request->getSession());
+ }
+}
diff --git a/domokits/local/modules/HookNavigation/Form/HookNavigationConfigForm.php b/domokits/local/modules/HookNavigation/Form/HookNavigationConfigForm.php
new file mode 100644
index 0000000..c955791
--- /dev/null
+++ b/domokits/local/modules/HookNavigation/Form/HookNavigationConfigForm.php
@@ -0,0 +1,51 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookNavigation\Form;
+
+use HookNavigation\HookNavigation;
+use Symfony\Component\Form\Extension\Core\Type\NumberType;
+use Thelia\Form\BaseForm;
+
+/**
+ * Class HookNavigationConfigForm.
+ *
+ * @author Etienne PERRIERE - OpenStudio
+ */
+class HookNavigationConfigForm extends BaseForm
+{
+ public static function getName()
+ {
+ return 'hooknavigation_configuration';
+ }
+
+ protected function buildForm(): void
+ {
+ $this->formBuilder
+ ->add(
+ 'footer_body_folder_id',
+ NumberType::class,
+ [
+ 'required' => false,
+ 'label' => $this->translator->trans('Folder in footer body', [], HookNavigation::MESSAGE_DOMAIN),
+ ]
+ )
+ ->add(
+ 'footer_bottom_folder_id',
+ NumberType::class,
+ [
+ 'required' => false,
+ 'label' => $this->translator->trans('Folder in footer bottom', [], HookNavigation::MESSAGE_DOMAIN),
+ ]
+ );
+ }
+}
diff --git a/domokits/local/modules/HookNavigation/Hook/FrontHook.php b/domokits/local/modules/HookNavigation/Hook/FrontHook.php
new file mode 100644
index 0000000..72977d5
--- /dev/null
+++ b/domokits/local/modules/HookNavigation/Hook/FrontHook.php
@@ -0,0 +1,50 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookNavigation\Hook;
+
+use HookNavigation\HookNavigation;
+use HookNavigation\Model\Config\HookNavigationConfigValue;
+use Thelia\Core\Event\Hook\HookRenderBlockEvent;
+use Thelia\Core\Event\Hook\HookRenderEvent;
+use Thelia\Core\Hook\BaseHook;
+
+/**
+ * Class FrontHook.
+ *
+ * @author Julien Chanséaume , Etienne PERRIERE - OpenStudio
+ */
+class FrontHook extends BaseHook
+{
+ public function onMainFooterBody(HookRenderBlockEvent $event): void
+ {
+ $bodyConfig = HookNavigation::getConfigValue(HookNavigationConfigValue::FOOTER_BODY_FOLDER_ID);
+
+ $content = trim($this->render('main-footer-body.html', ['bodyFolderId' => $bodyConfig]));
+ if ('' !== $content) {
+ $event->add([
+ 'id' => 'navigation-footer-body',
+ 'class' => 'links',
+ 'title' => $this->trans('Latest articles', [], HookNavigation::MESSAGE_DOMAIN),
+ 'content' => $content,
+ ]);
+ }
+ }
+
+ public function onMainFooterBottom(HookRenderEvent $event): void
+ {
+ $bottomConfig = HookNavigation::getConfigValue(HookNavigationConfigValue::FOOTER_BOTTOM_FOLDER_ID);
+
+ $content = $this->render('main-footer-bottom.html', ['bottomFolderId' => $bottomConfig]);
+ $event->add($content);
+ }
+}
diff --git a/domokits/local/modules/HookNavigation/HookNavigation.php b/domokits/local/modules/HookNavigation/HookNavigation.php
new file mode 100644
index 0000000..8abc3d7
--- /dev/null
+++ b/domokits/local/modules/HookNavigation/HookNavigation.php
@@ -0,0 +1,36 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookNavigation;
+
+use Symfony\Component\DependencyInjection\Loader\Configurator\ServicesConfigurator;
+use Thelia\Module\BaseModule;
+
+/**
+ * Class HookNavigation.
+ */
+class HookNavigation extends BaseModule
+{
+ public const MESSAGE_DOMAIN = 'hooknavigation';
+ public const ROUTER = 'router.hooknavigation';
+
+ /**
+ * Defines how services are loaded in your modules.
+ */
+ public static function configureServices(ServicesConfigurator $servicesConfigurator): void
+ {
+ $servicesConfigurator->load(self::getModuleCode().'\\', __DIR__)
+ ->exclude([THELIA_MODULE_DIR.ucfirst(self::getModuleCode()).'/I18n/*'])
+ ->autowire(true)
+ ->autoconfigure(true);
+ }
+}
diff --git a/domokits/local/modules/HookNavigation/I18n/backOffice/default/de_DE.php b/domokits/local/modules/HookNavigation/I18n/backOffice/default/de_DE.php
new file mode 100644
index 0000000..3c7270e
--- /dev/null
+++ b/domokits/local/modules/HookNavigation/I18n/backOffice/default/de_DE.php
@@ -0,0 +1,21 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Categories' => 'Kategorien',
+ 'Folder in footer body' => 'Ordner in Fußzeile',
+ 'Folder in footer bottom' => 'Ordner in Fußzeile',
+ 'Home' => 'Startseite',
+ 'HookNavigation configuration' => 'HookNavigation Konfiguration',
+ 'No articles currently' => 'Zur Zeit keine Artikel',
+ 'Toggle navigation' => 'Navigation umschalten',
+];
diff --git a/domokits/local/modules/HookNavigation/I18n/backOffice/default/en_US.php b/domokits/local/modules/HookNavigation/I18n/backOffice/default/en_US.php
new file mode 100644
index 0000000..1322a48
--- /dev/null
+++ b/domokits/local/modules/HookNavigation/I18n/backOffice/default/en_US.php
@@ -0,0 +1,20 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Configuration correctly saved' => 'Configuration correctly saved',
+ 'Configure hooknavigation' => 'Configure hooknavigation',
+ 'Home' => 'Home',
+ 'HookNavigation configuration' => 'HookNavigation configuration',
+ 'Modules' => 'Modules',
+ 'Select a folder' => 'Select a folder',
+];
diff --git a/domokits/local/modules/HookNavigation/I18n/backOffice/default/fr_FR.php b/domokits/local/modules/HookNavigation/I18n/backOffice/default/fr_FR.php
new file mode 100644
index 0000000..97ecd9a
--- /dev/null
+++ b/domokits/local/modules/HookNavigation/I18n/backOffice/default/fr_FR.php
@@ -0,0 +1,20 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Configuration correctly saved' => 'Configuration sauvegardée correctement',
+ 'Configure hooknavigation' => 'Configurer Bloc Menu',
+ 'Home' => 'Accueil',
+ 'HookNavigation configuration' => 'Configuration de Block Menu',
+ 'Modules' => 'Modules',
+ 'Select a folder' => 'Sélectionner un dossier',
+];
diff --git a/domokits/local/modules/HookNavigation/I18n/backOffice/default/it_IT.php b/domokits/local/modules/HookNavigation/I18n/backOffice/default/it_IT.php
new file mode 100644
index 0000000..477c029
--- /dev/null
+++ b/domokits/local/modules/HookNavigation/I18n/backOffice/default/it_IT.php
@@ -0,0 +1,17 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Home' => 'Home',
+ 'Modules' => 'Moduli',
+ 'Select a folder' => 'Seleziona una cartella',
+];
diff --git a/domokits/local/modules/HookNavigation/I18n/backOffice/default/ru_RU.php b/domokits/local/modules/HookNavigation/I18n/backOffice/default/ru_RU.php
new file mode 100644
index 0000000..b04226e
--- /dev/null
+++ b/domokits/local/modules/HookNavigation/I18n/backOffice/default/ru_RU.php
@@ -0,0 +1,20 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Configuration correctly saved' => 'Конфигурация успешно сохранена',
+ 'Configure hooknavigation' => 'Настройка HookNavigation',
+ 'Home' => 'Главная',
+ 'HookNavigation configuration' => 'Конфигурация HookNavigation',
+ 'Modules' => 'Модули',
+ 'Select a folder' => 'Выберите папку',
+];
diff --git a/domokits/local/modules/HookNavigation/I18n/backOffice/default/tr_TR.php b/domokits/local/modules/HookNavigation/I18n/backOffice/default/tr_TR.php
new file mode 100644
index 0000000..e39ec6c
--- /dev/null
+++ b/domokits/local/modules/HookNavigation/I18n/backOffice/default/tr_TR.php
@@ -0,0 +1,21 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Categories' => 'Katogoriler',
+ 'Folder in footer body' => 'Altbilgi vücut klasöründe',
+ 'Folder in footer bottom' => 'Altbilgi alt klasöründe',
+ 'Home' => 'Ana sayfa',
+ 'HookNavigation configuration' => 'HookNavigation yapılandırma',
+ 'No articles currently' => 'Hiç makale yok',
+ 'Toggle navigation' => 'Navigasyonu değiştir',
+];
diff --git a/domokits/local/modules/HookNavigation/I18n/en_US.php b/domokits/local/modules/HookNavigation/I18n/en_US.php
new file mode 100644
index 0000000..d7ffbc2
--- /dev/null
+++ b/domokits/local/modules/HookNavigation/I18n/en_US.php
@@ -0,0 +1,18 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Folder in footer body' => 'Folder in footer body',
+ 'Folder in footer bottom' => 'Folder in footer bottom',
+ 'Latest articles' => 'Latest articles',
+ 'Sorry, an error occurred: %err' => 'Sorry, an error occurred: %err',
+];
diff --git a/domokits/local/modules/HookNavigation/I18n/fr_FR.php b/domokits/local/modules/HookNavigation/I18n/fr_FR.php
new file mode 100644
index 0000000..8a1693d
--- /dev/null
+++ b/domokits/local/modules/HookNavigation/I18n/fr_FR.php
@@ -0,0 +1,18 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Folder in footer body' => 'Dossier du pied de page',
+ 'Folder in footer bottom' => 'Dossier sous le pied de page',
+ 'Latest articles' => 'Derniers articles',
+ 'Sorry, an error occurred: %err' => 'Désolé, une erreur est survenue: %err',
+];
diff --git a/domokits/local/modules/HookNavigation/I18n/frontOffice/default/de_DE.php b/domokits/local/modules/HookNavigation/I18n/frontOffice/default/de_DE.php
new file mode 100644
index 0000000..199e3d2
--- /dev/null
+++ b/domokits/local/modules/HookNavigation/I18n/frontOffice/default/de_DE.php
@@ -0,0 +1,16 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Latest articles' => 'Neueste Artikel',
+ 'No articles currently' => 'Zur Zeit keine Artikel',
+];
diff --git a/domokits/local/modules/HookNavigation/I18n/frontOffice/default/en_US.php b/domokits/local/modules/HookNavigation/I18n/frontOffice/default/en_US.php
new file mode 100644
index 0000000..dfbcf23
--- /dev/null
+++ b/domokits/local/modules/HookNavigation/I18n/frontOffice/default/en_US.php
@@ -0,0 +1,18 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Categories' => 'Categories',
+ 'Home' => 'Home',
+ 'No articles currently' => 'No articles currently',
+ 'Toggle navigation' => 'Toggle navigation',
+];
diff --git a/domokits/local/modules/HookNavigation/I18n/frontOffice/default/fr_FR.php b/domokits/local/modules/HookNavigation/I18n/frontOffice/default/fr_FR.php
new file mode 100644
index 0000000..16ea044
--- /dev/null
+++ b/domokits/local/modules/HookNavigation/I18n/frontOffice/default/fr_FR.php
@@ -0,0 +1,18 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Categories' => 'Rubriques',
+ 'Home' => 'Accueil',
+ 'No articles currently' => 'Aucun article pour le moment',
+ 'Toggle navigation' => 'Basculer la navigation',
+];
diff --git a/domokits/local/modules/HookNavigation/I18n/frontOffice/default/it_IT.php b/domokits/local/modules/HookNavigation/I18n/frontOffice/default/it_IT.php
new file mode 100644
index 0000000..237c7f6
--- /dev/null
+++ b/domokits/local/modules/HookNavigation/I18n/frontOffice/default/it_IT.php
@@ -0,0 +1,18 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Categories' => 'Categorie',
+ 'Home' => 'Home',
+ 'No articles currently' => 'Attualmente non sono presenti articoli',
+ 'Toggle navigation' => 'Toggle navigation',
+];
diff --git a/domokits/local/modules/HookNavigation/I18n/frontOffice/default/ru_RU.php b/domokits/local/modules/HookNavigation/I18n/frontOffice/default/ru_RU.php
new file mode 100644
index 0000000..e97a034
--- /dev/null
+++ b/domokits/local/modules/HookNavigation/I18n/frontOffice/default/ru_RU.php
@@ -0,0 +1,18 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Categories' => 'Категории',
+ 'Home' => 'Главная',
+ 'No articles currently' => 'Пока статей нет',
+ 'Toggle navigation' => 'Переключить навигацию',
+];
diff --git a/domokits/local/modules/HookNavigation/I18n/frontOffice/default/tr_TR.php b/domokits/local/modules/HookNavigation/I18n/frontOffice/default/tr_TR.php
new file mode 100644
index 0000000..99cb89a
--- /dev/null
+++ b/domokits/local/modules/HookNavigation/I18n/frontOffice/default/tr_TR.php
@@ -0,0 +1,16 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Latest articles' => 'Son Makaleler',
+ 'No articles currently' => 'Hiç makale yok',
+];
diff --git a/domokits/local/modules/HookNavigation/I18n/it_IT.php b/domokits/local/modules/HookNavigation/I18n/it_IT.php
new file mode 100644
index 0000000..dfe4d71
--- /dev/null
+++ b/domokits/local/modules/HookNavigation/I18n/it_IT.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Latest articles' => 'Ultimi articoli',
+];
diff --git a/domokits/local/modules/HookNavigation/I18n/ru_RU.php b/domokits/local/modules/HookNavigation/I18n/ru_RU.php
new file mode 100644
index 0000000..875a445
--- /dev/null
+++ b/domokits/local/modules/HookNavigation/I18n/ru_RU.php
@@ -0,0 +1,18 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Folder in footer body' => 'Папка внизу страницы',
+ 'Folder in footer bottom' => 'Папка в подвале страницы',
+ 'Latest articles' => 'Последние статьи',
+ 'Sorry, an error occurred: %err' => 'К сожалению произошла ошибка: %err',
+];
diff --git a/domokits/local/modules/HookNavigation/LICENSE.txt b/domokits/local/modules/HookNavigation/LICENSE.txt
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/domokits/local/modules/HookNavigation/LICENSE.txt
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/domokits/local/modules/HookNavigation/Model/Config/Base/HookNavigationConfigValue.php b/domokits/local/modules/HookNavigation/Model/Config/Base/HookNavigationConfigValue.php
new file mode 100644
index 0000000..bf2a659
--- /dev/null
+++ b/domokits/local/modules/HookNavigation/Model/Config/Base/HookNavigationConfigValue.php
@@ -0,0 +1,22 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookNavigation\Model\Config\Base;
+
+/**
+ * Class HookNavigationConfigValue.
+ */
+class HookNavigationConfigValue
+{
+ public const FOOTER_BODY_FOLDER_ID = 'footer_body_folder_id';
+ public const FOOTER_BOTTOM_FOLDER_ID = 'footer_bottom_folder_id';
+}
diff --git a/domokits/local/modules/HookNavigation/Model/Config/HookNavigationConfigValue.php b/domokits/local/modules/HookNavigation/Model/Config/HookNavigationConfigValue.php
new file mode 100644
index 0000000..74db14a
--- /dev/null
+++ b/domokits/local/modules/HookNavigation/Model/Config/HookNavigationConfigValue.php
@@ -0,0 +1,22 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookNavigation\Model\Config;
+
+use HookNavigation\Model\Config\Base\HookNavigationConfigValue as BaseHookNavigationConfigValue;
+
+/**
+ * Class HookNavigationConfigValue.
+ */
+class HookNavigationConfigValue extends BaseHookNavigationConfigValue
+{
+}
diff --git a/domokits/local/modules/HookNavigation/composer.json b/domokits/local/modules/HookNavigation/composer.json
new file mode 100644
index 0000000..0ccb0ca
--- /dev/null
+++ b/domokits/local/modules/HookNavigation/composer.json
@@ -0,0 +1,11 @@
+{
+ "name": "thelia/hook-navigation-module",
+ "license": "LGPL-3.0+",
+ "type": "thelia-module",
+ "require": {
+ "thelia/installer": "~1.1"
+ },
+ "extra": {
+ "installer-name": "HookNavigation"
+ }
+}
diff --git a/domokits/local/modules/HookNavigation/templates/backOffice/default/hooknavigation-configuration.html b/domokits/local/modules/HookNavigation/templates/backOffice/default/hooknavigation-configuration.html
new file mode 100644
index 0000000..871c43d
--- /dev/null
+++ b/domokits/local/modules/HookNavigation/templates/backOffice/default/hooknavigation-configuration.html
@@ -0,0 +1,116 @@
+{extends file="admin-layout.tpl"}
+
+{block name="no-return-functions"}
+ {$admin_current_location = 'modules'}
+{/block}
+
+{block name="page-title"}{intl d="hooknavigation.bo.default" l='HookNavigation configuration'}{/block}
+
+{block name="check-resource"}admin.module{/block}
+{block name="check-access"}view{/block}
+{block name="check-module"}HookNavigation{/block}
+
+{block name="main-content"}
+
+{/elseloop}
\ No newline at end of file
diff --git a/domokits/local/modules/HookNavigation/templates/frontOffice/default/main-footer-bottom.html b/domokits/local/modules/HookNavigation/templates/frontOffice/default/main-footer-bottom.html
new file mode 100644
index 0000000..05c8047
--- /dev/null
+++ b/domokits/local/modules/HookNavigation/templates/frontOffice/default/main-footer-bottom.html
@@ -0,0 +1,7 @@
+
diff --git a/domokits/local/modules/HookNavigation/templates/frontOffice/default/main-navbar-primary.html b/domokits/local/modules/HookNavigation/templates/frontOffice/default/main-navbar-primary.html
new file mode 100644
index 0000000..6251461
--- /dev/null
+++ b/domokits/local/modules/HookNavigation/templates/frontOffice/default/main-navbar-primary.html
@@ -0,0 +1,56 @@
+
+
+{* classic navbar without dropdown
+
+*}
\ No newline at end of file
diff --git a/domokits/local/modules/HookNewsletter/Config/config.xml b/domokits/local/modules/HookNewsletter/Config/config.xml
new file mode 100644
index 0000000..9d66a2f
--- /dev/null
+++ b/domokits/local/modules/HookNewsletter/Config/config.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/domokits/local/modules/HookNewsletter/Config/module.xml b/domokits/local/modules/HookNewsletter/Config/module.xml
new file mode 100644
index 0000000..2bb1f44
--- /dev/null
+++ b/domokits/local/modules/HookNewsletter/Config/module.xml
@@ -0,0 +1,24 @@
+
+
+ HookNewsletter\HookNewsletter
+
+ Block Newsletter
+
+
+ Bloc Newsletter
+
+
+ en_US
+ fr_FR
+
+ 2.5.4
+
+ Julien Chanséaume
+ jchanseaume@openstudio.fr
+
+ classic
+ 2.5.4
+ alpha
+
diff --git a/domokits/local/modules/HookNewsletter/Hook/FrontHook.php b/domokits/local/modules/HookNewsletter/Hook/FrontHook.php
new file mode 100644
index 0000000..47a41e6
--- /dev/null
+++ b/domokits/local/modules/HookNewsletter/Hook/FrontHook.php
@@ -0,0 +1,37 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookNewsletter\Hook;
+
+use Thelia\Core\Event\Hook\HookRenderBlockEvent;
+use Thelia\Core\Hook\BaseHook;
+
+/**
+ * Class FrontHook.
+ *
+ * @author Julien Chanséaume
+ */
+class FrontHook extends BaseHook
+{
+ public function onMainFooterBody(HookRenderBlockEvent $event): void
+ {
+ $content = trim($this->render('main-footer-body.html'));
+ if ('' != $content) {
+ $event->add([
+ 'id' => 'newsletter-footer-body',
+ 'class' => 'newsletter',
+ 'title' => $this->trans('Newsletter', [], 'hooknewsletter'),
+ 'content' => $content,
+ ]);
+ }
+ }
+}
diff --git a/domokits/local/modules/HookNewsletter/HookNewsletter.php b/domokits/local/modules/HookNewsletter/HookNewsletter.php
new file mode 100644
index 0000000..3bf0444
--- /dev/null
+++ b/domokits/local/modules/HookNewsletter/HookNewsletter.php
@@ -0,0 +1,19 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookNewsletter;
+
+use Thelia\Module\BaseModule;
+
+class HookNewsletter extends BaseModule
+{
+}
diff --git a/domokits/local/modules/HookNewsletter/I18n/de_DE.php b/domokits/local/modules/HookNewsletter/I18n/de_DE.php
new file mode 100644
index 0000000..4fbbce0
--- /dev/null
+++ b/domokits/local/modules/HookNewsletter/I18n/de_DE.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Newsletter' => 'Newsletter',
+];
diff --git a/domokits/local/modules/HookNewsletter/I18n/en_US.php b/domokits/local/modules/HookNewsletter/I18n/en_US.php
new file mode 100755
index 0000000..4fbbce0
--- /dev/null
+++ b/domokits/local/modules/HookNewsletter/I18n/en_US.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Newsletter' => 'Newsletter',
+];
diff --git a/domokits/local/modules/HookNewsletter/I18n/fr_FR.php b/domokits/local/modules/HookNewsletter/I18n/fr_FR.php
new file mode 100755
index 0000000..2895c2d
--- /dev/null
+++ b/domokits/local/modules/HookNewsletter/I18n/fr_FR.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Newsletter' => 'Lettre d\'information',
+];
diff --git a/domokits/local/modules/HookNewsletter/I18n/frontOffice/default/de_DE.php b/domokits/local/modules/HookNewsletter/I18n/frontOffice/default/de_DE.php
new file mode 100644
index 0000000..6d0e6a5
--- /dev/null
+++ b/domokits/local/modules/HookNewsletter/I18n/frontOffice/default/de_DE.php
@@ -0,0 +1,18 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Email address' => 'E-mail Adresse',
+ 'Sign up to receive our latest news.' => 'Abonnieren Sie unseren Newsletter.',
+ 'Subscribe' => 'Abonnieren',
+ 'Your email address' => 'Ihre E-Mail-Adresse',
+];
diff --git a/domokits/local/modules/HookNewsletter/I18n/frontOffice/default/en_US.php b/domokits/local/modules/HookNewsletter/I18n/frontOffice/default/en_US.php
new file mode 100755
index 0000000..261b546
--- /dev/null
+++ b/domokits/local/modules/HookNewsletter/I18n/frontOffice/default/en_US.php
@@ -0,0 +1,18 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Email address' => 'Email address',
+ 'Sign up to receive our latest news.' => 'Sign up to receive our latest news.',
+ 'Subscribe' => 'Subscribe',
+ 'Your email address' => 'Your email address',
+];
diff --git a/domokits/local/modules/HookNewsletter/I18n/frontOffice/default/fr_FR.php b/domokits/local/modules/HookNewsletter/I18n/frontOffice/default/fr_FR.php
new file mode 100755
index 0000000..cbd671c
--- /dev/null
+++ b/domokits/local/modules/HookNewsletter/I18n/frontOffice/default/fr_FR.php
@@ -0,0 +1,18 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Email address' => 'Adresse e-mail',
+ 'Sign up to receive our latest news.' => 'Enregistrez vous pour recevoir nos dernières nouvelles.',
+ 'Subscribe' => 'Inscription',
+ 'Your email address' => 'Votre adresse email',
+];
diff --git a/domokits/local/modules/HookNewsletter/I18n/frontOffice/default/it_IT.php b/domokits/local/modules/HookNewsletter/I18n/frontOffice/default/it_IT.php
new file mode 100644
index 0000000..27f1570
--- /dev/null
+++ b/domokits/local/modules/HookNewsletter/I18n/frontOffice/default/it_IT.php
@@ -0,0 +1,16 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Email address' => 'Indirizzo email',
+ 'Subscribe' => 'Abbonati',
+];
diff --git a/domokits/local/modules/HookNewsletter/I18n/frontOffice/default/ru_RU.php b/domokits/local/modules/HookNewsletter/I18n/frontOffice/default/ru_RU.php
new file mode 100755
index 0000000..0878ec9
--- /dev/null
+++ b/domokits/local/modules/HookNewsletter/I18n/frontOffice/default/ru_RU.php
@@ -0,0 +1,18 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Email address' => 'E-mail адрес',
+ 'Sign up to receive our latest news.' => 'Подпишитесь для получения новостей от нас',
+ 'Subscribe' => 'Подписаться',
+ 'Your email address' => 'Ваш email адрес',
+];
diff --git a/domokits/local/modules/HookNewsletter/I18n/frontOffice/default/tr_TR.php b/domokits/local/modules/HookNewsletter/I18n/frontOffice/default/tr_TR.php
new file mode 100644
index 0000000..46f52f9
--- /dev/null
+++ b/domokits/local/modules/HookNewsletter/I18n/frontOffice/default/tr_TR.php
@@ -0,0 +1,18 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Email address' => 'Eposta adresi',
+ 'Sign up to receive our latest news.' => 'En yeni haberleri almak için kaydolun.',
+ 'Subscribe' => 'Abone Ol',
+ 'Your email address' => 'E-posta adresiniz',
+];
diff --git a/domokits/local/modules/HookNewsletter/I18n/it_IT.php b/domokits/local/modules/HookNewsletter/I18n/it_IT.php
new file mode 100644
index 0000000..4fbbce0
--- /dev/null
+++ b/domokits/local/modules/HookNewsletter/I18n/it_IT.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Newsletter' => 'Newsletter',
+];
diff --git a/domokits/local/modules/HookNewsletter/I18n/ru_RU.php b/domokits/local/modules/HookNewsletter/I18n/ru_RU.php
new file mode 100755
index 0000000..127244d
--- /dev/null
+++ b/domokits/local/modules/HookNewsletter/I18n/ru_RU.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Newsletter' => 'Подписка',
+];
diff --git a/domokits/local/modules/HookNewsletter/I18n/tr_TR.php b/domokits/local/modules/HookNewsletter/I18n/tr_TR.php
new file mode 100644
index 0000000..cd4dfce
--- /dev/null
+++ b/domokits/local/modules/HookNewsletter/I18n/tr_TR.php
@@ -0,0 +1,15 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Newsletter' => 'E-Bülten',
+];
diff --git a/domokits/local/modules/HookNewsletter/LICENSE.txt b/domokits/local/modules/HookNewsletter/LICENSE.txt
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/domokits/local/modules/HookNewsletter/LICENSE.txt
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/domokits/local/modules/HookNewsletter/composer.json b/domokits/local/modules/HookNewsletter/composer.json
new file mode 100644
index 0000000..230b69d
--- /dev/null
+++ b/domokits/local/modules/HookNewsletter/composer.json
@@ -0,0 +1,11 @@
+{
+ "name": "thelia/hook-newsletter-module",
+ "license": "LGPL-3.0+",
+ "type": "thelia-module",
+ "require": {
+ "thelia/installer": "~1.1"
+ },
+ "extra": {
+ "installer-name": "HookNewsletter"
+ }
+}
diff --git a/domokits/local/modules/HookNewsletter/templates/frontOffice/default/main-footer-body.html b/domokits/local/modules/HookNewsletter/templates/frontOffice/default/main-footer-body.html
new file mode 100644
index 0000000..1249959
--- /dev/null
+++ b/domokits/local/modules/HookNewsletter/templates/frontOffice/default/main-footer-body.html
@@ -0,0 +1,13 @@
+
{intl l="Sign up to receive our latest news." d="hooknewsletter.fo.default"}
+{form name="thelia.front.newsletter"}
+
+{/form}
diff --git a/domokits/local/modules/HookProductsNew/Config/config.xml b/domokits/local/modules/HookProductsNew/Config/config.xml
new file mode 100644
index 0000000..42df653
--- /dev/null
+++ b/domokits/local/modules/HookProductsNew/Config/config.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/domokits/local/modules/HookProductsNew/Config/module.xml b/domokits/local/modules/HookProductsNew/Config/module.xml
new file mode 100644
index 0000000..abe77b3
--- /dev/null
+++ b/domokits/local/modules/HookProductsNew/Config/module.xml
@@ -0,0 +1,24 @@
+
+
+ HookProductsNew\HookProductsNew
+
+ Block New Products
+
+
+ Bloc Nouveaux Produits
+
+
+ en_US
+ fr_FR
+
+ 2.5.4
+
+ Julien Chanséaume
+ jchanseaume@openstudio.fr
+
+ classic
+ 2.5.4
+ alpha
+
diff --git a/domokits/local/modules/HookProductsNew/HookProductsNew.php b/domokits/local/modules/HookProductsNew/HookProductsNew.php
new file mode 100644
index 0000000..e764f49
--- /dev/null
+++ b/domokits/local/modules/HookProductsNew/HookProductsNew.php
@@ -0,0 +1,19 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookProductsNew;
+
+use Thelia\Module\BaseModule;
+
+class HookProductsNew extends BaseModule
+{
+}
diff --git a/domokits/local/modules/HookProductsNew/I18n/frontOffice/default/de_DE.php b/domokits/local/modules/HookProductsNew/I18n/frontOffice/default/de_DE.php
new file mode 100644
index 0000000..93af348
--- /dev/null
+++ b/domokits/local/modules/HookProductsNew/I18n/frontOffice/default/de_DE.php
@@ -0,0 +1,16 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ '+ View All' => '+ Alle anzeigen',
+ 'Latest' => 'Neuigkeiten',
+];
diff --git a/domokits/local/modules/HookProductsNew/I18n/frontOffice/default/en_US.php b/domokits/local/modules/HookProductsNew/I18n/frontOffice/default/en_US.php
new file mode 100755
index 0000000..2630a45
--- /dev/null
+++ b/domokits/local/modules/HookProductsNew/I18n/frontOffice/default/en_US.php
@@ -0,0 +1,16 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ '+ View All' => '+ View All',
+ 'Latest' => 'Latest',
+];
diff --git a/domokits/local/modules/HookProductsNew/I18n/frontOffice/default/fr_FR.php b/domokits/local/modules/HookProductsNew/I18n/frontOffice/default/fr_FR.php
new file mode 100755
index 0000000..c78e30b
--- /dev/null
+++ b/domokits/local/modules/HookProductsNew/I18n/frontOffice/default/fr_FR.php
@@ -0,0 +1,16 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ '+ View All' => '+ Tout voir',
+ 'Latest' => 'Nouveautés',
+];
diff --git a/domokits/local/modules/HookProductsNew/I18n/frontOffice/default/it_IT.php b/domokits/local/modules/HookProductsNew/I18n/frontOffice/default/it_IT.php
new file mode 100644
index 0000000..030c627
--- /dev/null
+++ b/domokits/local/modules/HookProductsNew/I18n/frontOffice/default/it_IT.php
@@ -0,0 +1,16 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ '+ View All' => '+ Mostra tutto',
+ 'Latest' => 'Ultimi',
+];
diff --git a/domokits/local/modules/HookProductsNew/I18n/frontOffice/default/ru_RU.php b/domokits/local/modules/HookProductsNew/I18n/frontOffice/default/ru_RU.php
new file mode 100755
index 0000000..7c1bfb4
--- /dev/null
+++ b/domokits/local/modules/HookProductsNew/I18n/frontOffice/default/ru_RU.php
@@ -0,0 +1,16 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ '+ View All' => '+ Смотреть все',
+ 'Latest' => 'Новые',
+];
diff --git a/domokits/local/modules/HookProductsNew/I18n/frontOffice/default/tr_TR.php b/domokits/local/modules/HookProductsNew/I18n/frontOffice/default/tr_TR.php
new file mode 100644
index 0000000..f6e4bb6
--- /dev/null
+++ b/domokits/local/modules/HookProductsNew/I18n/frontOffice/default/tr_TR.php
@@ -0,0 +1,16 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ '+ View All' => '+ Hepsini gör',
+ 'Latest' => 'En son',
+];
diff --git a/domokits/local/modules/HookProductsNew/LICENSE.txt b/domokits/local/modules/HookProductsNew/LICENSE.txt
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/domokits/local/modules/HookProductsNew/LICENSE.txt
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/domokits/local/modules/HookProductsNew/composer.json b/domokits/local/modules/HookProductsNew/composer.json
new file mode 100644
index 0000000..3757392
--- /dev/null
+++ b/domokits/local/modules/HookProductsNew/composer.json
@@ -0,0 +1,11 @@
+{
+ "name": "thelia/hook-products-new-module",
+ "license": "LGPL-3.0+",
+ "type": "thelia-module",
+ "require": {
+ "thelia/installer": "~1.1"
+ },
+ "extra": {
+ "installer-name": "HookProductsNew"
+ }
+}
diff --git a/domokits/local/modules/HookProductsNew/templates/frontOffice/default/home-body.html b/domokits/local/modules/HookProductsNew/templates/frontOffice/default/home-body.html
new file mode 100644
index 0000000..11f6004
--- /dev/null
+++ b/domokits/local/modules/HookProductsNew/templates/frontOffice/default/home-body.html
@@ -0,0 +1,59 @@
+{ifloop rel="product_new"}
+
+
+
+{/ifloop}
diff --git a/domokits/local/modules/HookProductsOffer/Config/config.xml b/domokits/local/modules/HookProductsOffer/Config/config.xml
new file mode 100644
index 0000000..00e4ebb
--- /dev/null
+++ b/domokits/local/modules/HookProductsOffer/Config/config.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/domokits/local/modules/HookProductsOffer/Config/module.xml b/domokits/local/modules/HookProductsOffer/Config/module.xml
new file mode 100644
index 0000000..6ee97b0
--- /dev/null
+++ b/domokits/local/modules/HookProductsOffer/Config/module.xml
@@ -0,0 +1,24 @@
+
+
+ HookProductsOffer\HookProductsOffer
+
+ Block Promo Products
+
+
+ Bloc Produits en promo
+
+
+ en_US
+ fr_FR
+
+ 2.5.4
+
+ Julien Chanséaume
+ jchanseaume@openstudio.fr
+
+ classic
+ 2.5.4
+ alpha
+
diff --git a/domokits/local/modules/HookProductsOffer/HookProductsOffer.php b/domokits/local/modules/HookProductsOffer/HookProductsOffer.php
new file mode 100644
index 0000000..85ade35
--- /dev/null
+++ b/domokits/local/modules/HookProductsOffer/HookProductsOffer.php
@@ -0,0 +1,19 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookProductsOffer;
+
+use Thelia\Module\BaseModule;
+
+class HookProductsOffer extends BaseModule
+{
+}
diff --git a/domokits/local/modules/HookProductsOffer/I18n/frontOffice/default/de_DE.php b/domokits/local/modules/HookProductsOffer/I18n/frontOffice/default/de_DE.php
new file mode 100644
index 0000000..5b64193
--- /dev/null
+++ b/domokits/local/modules/HookProductsOffer/I18n/frontOffice/default/de_DE.php
@@ -0,0 +1,16 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ '+ View All' => '+ Alle sehen',
+ 'Offers' => 'Angebote',
+];
diff --git a/domokits/local/modules/HookProductsOffer/I18n/frontOffice/default/en_US.php b/domokits/local/modules/HookProductsOffer/I18n/frontOffice/default/en_US.php
new file mode 100755
index 0000000..2bea270
--- /dev/null
+++ b/domokits/local/modules/HookProductsOffer/I18n/frontOffice/default/en_US.php
@@ -0,0 +1,16 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ '+ View All' => '+ View All',
+ 'Offers' => 'Offers',
+];
diff --git a/domokits/local/modules/HookProductsOffer/I18n/frontOffice/default/fr_FR.php b/domokits/local/modules/HookProductsOffer/I18n/frontOffice/default/fr_FR.php
new file mode 100755
index 0000000..b6ac60e
--- /dev/null
+++ b/domokits/local/modules/HookProductsOffer/I18n/frontOffice/default/fr_FR.php
@@ -0,0 +1,16 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ '+ View All' => '+ Tout voir',
+ 'Offers' => 'Promotions',
+];
diff --git a/domokits/local/modules/HookProductsOffer/I18n/frontOffice/default/it_IT.php b/domokits/local/modules/HookProductsOffer/I18n/frontOffice/default/it_IT.php
new file mode 100644
index 0000000..dee3d68
--- /dev/null
+++ b/domokits/local/modules/HookProductsOffer/I18n/frontOffice/default/it_IT.php
@@ -0,0 +1,16 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ '+ View All' => '+ Mostra tutto',
+ 'Offers' => 'Offerte',
+];
diff --git a/domokits/local/modules/HookProductsOffer/I18n/frontOffice/default/ru_RU.php b/domokits/local/modules/HookProductsOffer/I18n/frontOffice/default/ru_RU.php
new file mode 100755
index 0000000..5052d1a
--- /dev/null
+++ b/domokits/local/modules/HookProductsOffer/I18n/frontOffice/default/ru_RU.php
@@ -0,0 +1,16 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ '+ View All' => '+ Смотреть все',
+ 'Offers' => 'Предложения',
+];
diff --git a/domokits/local/modules/HookProductsOffer/I18n/frontOffice/default/tr_TR.php b/domokits/local/modules/HookProductsOffer/I18n/frontOffice/default/tr_TR.php
new file mode 100644
index 0000000..8ddc8ad
--- /dev/null
+++ b/domokits/local/modules/HookProductsOffer/I18n/frontOffice/default/tr_TR.php
@@ -0,0 +1,16 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ '+ View All' => '+ Hepsini gör',
+ 'Offers' => 'Teklifler',
+];
diff --git a/domokits/local/modules/HookProductsOffer/LICENSE.txt b/domokits/local/modules/HookProductsOffer/LICENSE.txt
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/domokits/local/modules/HookProductsOffer/LICENSE.txt
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/domokits/local/modules/HookProductsOffer/composer.json b/domokits/local/modules/HookProductsOffer/composer.json
new file mode 100644
index 0000000..8329abd
--- /dev/null
+++ b/domokits/local/modules/HookProductsOffer/composer.json
@@ -0,0 +1,11 @@
+{
+ "name": "thelia/hook-products-offer-module",
+ "license": "LGPL-3.0+",
+ "type": "thelia-module",
+ "require": {
+ "thelia/installer": "~1.1"
+ },
+ "extra": {
+ "installer-name": "HookProductsOffer"
+ }
+}
diff --git a/domokits/local/modules/HookProductsOffer/templates/frontOffice/default/home-body.html b/domokits/local/modules/HookProductsOffer/templates/frontOffice/default/home-body.html
new file mode 100644
index 0000000..462e775
--- /dev/null
+++ b/domokits/local/modules/HookProductsOffer/templates/frontOffice/default/home-body.html
@@ -0,0 +1,39 @@
+{ifloop rel="current-sales"}
+
+ {loop name="current-sales" type="sale" limit="2"}
+
+
+
+ {/loop}
+
+{/ifloop}
+{* Display "regular" promos, if any, only if we don't have active sales *}
+
+{elseloop rel="current-sales"}
+{ifloop rel="product_promo"}
+
+
+
+{/ifloop}
+{/elseloop}
diff --git a/domokits/local/modules/HookSearch/Config/config.xml b/domokits/local/modules/HookSearch/Config/config.xml
new file mode 100644
index 0000000..b5d60c6
--- /dev/null
+++ b/domokits/local/modules/HookSearch/Config/config.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/domokits/local/modules/HookSearch/Config/module.xml b/domokits/local/modules/HookSearch/Config/module.xml
new file mode 100644
index 0000000..3a915ce
--- /dev/null
+++ b/domokits/local/modules/HookSearch/Config/module.xml
@@ -0,0 +1,24 @@
+
+
+ HookSearch\HookSearch
+
+ Block Search
+
+
+ Bloc Recherche
+
+
+ en_US
+ fr_FR
+
+ 2.5.4
+
+ Julien Chanséaume
+ jchanseaume@openstudio.fr
+
+ classic
+ 2.5.4
+ alpha
+
diff --git a/domokits/local/modules/HookSearch/HookSearch.php b/domokits/local/modules/HookSearch/HookSearch.php
new file mode 100644
index 0000000..657cb1e
--- /dev/null
+++ b/domokits/local/modules/HookSearch/HookSearch.php
@@ -0,0 +1,19 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookSearch;
+
+use Thelia\Module\BaseModule;
+
+class HookSearch extends BaseModule
+{
+}
diff --git a/domokits/local/modules/HookSearch/I18n/frontOffice/default/de_DE.php b/domokits/local/modules/HookSearch/I18n/frontOffice/default/de_DE.php
new file mode 100644
index 0000000..4a04d27
--- /dev/null
+++ b/domokits/local/modules/HookSearch/I18n/frontOffice/default/de_DE.php
@@ -0,0 +1,18 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Minimum 2 characters.' => 'Mindestens 2 Zeichen.',
+ 'Search' => 'Suchen',
+ 'Search a product' => 'Ein Produkt suchen',
+ 'Search...' => 'Suchen ...',
+];
diff --git a/domokits/local/modules/HookSearch/I18n/frontOffice/default/en_US.php b/domokits/local/modules/HookSearch/I18n/frontOffice/default/en_US.php
new file mode 100644
index 0000000..cbf6af0
--- /dev/null
+++ b/domokits/local/modules/HookSearch/I18n/frontOffice/default/en_US.php
@@ -0,0 +1,18 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Minimum 2 characters.' => 'Minimum 2 characters.',
+ 'Search' => 'Search',
+ 'Search a product' => 'Search a product',
+ 'Search...' => 'Search...',
+];
diff --git a/domokits/local/modules/HookSearch/I18n/frontOffice/default/fr_FR.php b/domokits/local/modules/HookSearch/I18n/frontOffice/default/fr_FR.php
new file mode 100644
index 0000000..8a3c91c
--- /dev/null
+++ b/domokits/local/modules/HookSearch/I18n/frontOffice/default/fr_FR.php
@@ -0,0 +1,18 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Minimum 2 characters.' => '2 caractères minimum.',
+ 'Search' => 'Recherche',
+ 'Search a product' => 'Rechercher un produit',
+ 'Search...' => 'Rechercher...',
+];
diff --git a/domokits/local/modules/HookSearch/I18n/frontOffice/default/it_IT.php b/domokits/local/modules/HookSearch/I18n/frontOffice/default/it_IT.php
new file mode 100644
index 0000000..a99d65d
--- /dev/null
+++ b/domokits/local/modules/HookSearch/I18n/frontOffice/default/it_IT.php
@@ -0,0 +1,18 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Minimum 2 characters.' => 'Minimo 2 caratteri.',
+ 'Search' => 'Ricerca',
+ 'Search a product' => 'Ricerca un prodotto',
+ 'Search...' => 'Ricerca...',
+];
diff --git a/domokits/local/modules/HookSearch/I18n/frontOffice/default/ru_RU.php b/domokits/local/modules/HookSearch/I18n/frontOffice/default/ru_RU.php
new file mode 100644
index 0000000..b5d1754
--- /dev/null
+++ b/domokits/local/modules/HookSearch/I18n/frontOffice/default/ru_RU.php
@@ -0,0 +1,18 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Minimum 2 characters.' => 'Минимум 2 символа.',
+ 'Search' => 'Поиск',
+ 'Search a product' => 'Поиск товара',
+ 'Search...' => 'Поиск...',
+];
diff --git a/domokits/local/modules/HookSearch/I18n/frontOffice/default/tr_TR.php b/domokits/local/modules/HookSearch/I18n/frontOffice/default/tr_TR.php
new file mode 100644
index 0000000..ab844fd
--- /dev/null
+++ b/domokits/local/modules/HookSearch/I18n/frontOffice/default/tr_TR.php
@@ -0,0 +1,18 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Minimum 2 characters.' => 'En az 2 karakter.',
+ 'Search' => 'Arama',
+ 'Search a product' => 'Ürün ara',
+ 'Search...' => 'Arama...',
+];
diff --git a/domokits/local/modules/HookSearch/LICENSE.txt b/domokits/local/modules/HookSearch/LICENSE.txt
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/domokits/local/modules/HookSearch/LICENSE.txt
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/domokits/local/modules/HookSearch/composer.json b/domokits/local/modules/HookSearch/composer.json
new file mode 100644
index 0000000..9dfdcaf
--- /dev/null
+++ b/domokits/local/modules/HookSearch/composer.json
@@ -0,0 +1,11 @@
+{
+ "name": "thelia/hook-search-module",
+ "license": "LGPL-3.0+",
+ "type": "thelia-module",
+ "require": {
+ "thelia/installer": "~1.1"
+ },
+ "extra": {
+ "installer-name": "HookSearch"
+ }
+}
diff --git a/domokits/local/modules/HookSearch/templates/frontOffice/default/assets/css/styles.css b/domokits/local/modules/HookSearch/templates/frontOffice/default/assets/css/styles.css
new file mode 100644
index 0000000..74b1839
--- /dev/null
+++ b/domokits/local/modules/HookSearch/templates/frontOffice/default/assets/css/styles.css
@@ -0,0 +1,11 @@
+.header-container .search-container label,
+.header-container .search-container .btn-search>span {
+ position:absolute;
+ width:1px;
+ height:1px;
+ margin:-1px;
+ padding:0;
+ overflow:hidden;
+ clip:rect(0 0 0 0);
+ border:0
+}
\ No newline at end of file
diff --git a/domokits/local/modules/HookSearch/templates/frontOffice/default/main-navbar-primary.html b/domokits/local/modules/HookSearch/templates/frontOffice/default/main-navbar-primary.html
new file mode 100644
index 0000000..31c6afd
--- /dev/null
+++ b/domokits/local/modules/HookSearch/templates/frontOffice/default/main-navbar-primary.html
@@ -0,0 +1,11 @@
+
+
+
\ No newline at end of file
diff --git a/domokits/local/modules/HookSearch/templates/frontOffice/default/main-navbar-secondary.html b/domokits/local/modules/HookSearch/templates/frontOffice/default/main-navbar-secondary.html
new file mode 100644
index 0000000..40ba03a
--- /dev/null
+++ b/domokits/local/modules/HookSearch/templates/frontOffice/default/main-navbar-secondary.html
@@ -0,0 +1,7 @@
+
+
+
\ No newline at end of file
diff --git a/domokits/local/modules/HookSocial/Config/config.xml b/domokits/local/modules/HookSocial/Config/config.xml
new file mode 100644
index 0000000..f151f07
--- /dev/null
+++ b/domokits/local/modules/HookSocial/Config/config.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/domokits/local/modules/HookSocial/Config/module.xml b/domokits/local/modules/HookSocial/Config/module.xml
new file mode 100644
index 0000000..867247c
--- /dev/null
+++ b/domokits/local/modules/HookSocial/Config/module.xml
@@ -0,0 +1,24 @@
+
+
+ HookSocial\HookSocial
+
+ Block Social
+
+
+ Bloc Social
+
+
+ en_US
+ fr_FR
+
+ 2.5.4
+
+ Julien Chanséaume
+ jchanseaume@openstudio.fr
+
+ classic
+ 2.5.4
+ alpha
+
diff --git a/domokits/local/modules/HookSocial/Config/routing.xml b/domokits/local/modules/HookSocial/Config/routing.xml
new file mode 100644
index 0000000..769a2c4
--- /dev/null
+++ b/domokits/local/modules/HookSocial/Config/routing.xml
@@ -0,0 +1,10 @@
+
+
+
+
+ HookSocial\Controller\Configuration::saveAction
+
+
+
diff --git a/domokits/local/modules/HookSocial/Controller/Configuration.php b/domokits/local/modules/HookSocial/Controller/Configuration.php
new file mode 100644
index 0000000..7966457
--- /dev/null
+++ b/domokits/local/modules/HookSocial/Controller/Configuration.php
@@ -0,0 +1,60 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookSocial\Controller;
+
+use Symfony\Component\HttpFoundation\JsonResponse;
+use Thelia\Controller\Admin\BaseAdminController;
+use Thelia\Core\Security\AccessManager;
+use Thelia\Core\Security\Resource\AdminResources;
+use Thelia\Log\Tlog;
+use Thelia\Model\ConfigQuery;
+
+/**
+ * Class Configuration.
+ *
+ * @author Julien Chanséaume
+ */
+class Configuration extends BaseAdminController
+{
+ public function saveAction()
+ {
+ if (null !== $response = $this->checkAuth([AdminResources::MODULE], ['hooksocial'], AccessManager::UPDATE)) {
+ return $response;
+ }
+
+ $form = $this->createForm(\HookSocial\Form\Configuration::class);
+ $resp = [
+ 'error' => 0,
+ 'message' => '',
+ ];
+ $response = null;
+
+ try {
+ $vform = $this->validateForm($form);
+ $data = $vform->getData();
+
+ foreach ($data as $name => $value) {
+ if (!$form->isTemplateDefinedHiddenFieldName($name)) {
+ ConfigQuery::write('hooksocial_'.$name, $value, false, true);
+ }
+
+ Tlog::getInstance()->debug(sprintf('%s => %s', $name, $value));
+ }
+ } catch (\Exception $e) {
+ $resp['error'] = 1;
+ $resp['message'] = $e->getMessage();
+ }
+
+ return new JsonResponse($resp);
+ }
+}
diff --git a/domokits/local/modules/HookSocial/Form/Configuration.php b/domokits/local/modules/HookSocial/Form/Configuration.php
new file mode 100644
index 0000000..65c48e5
--- /dev/null
+++ b/domokits/local/modules/HookSocial/Form/Configuration.php
@@ -0,0 +1,85 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookSocial\Form;
+
+use Symfony\Component\Form\Extension\Core\Type\TextType;
+use Thelia\Core\Translation\Translator;
+use Thelia\Form\BaseForm;
+use Thelia\Model\ConfigQuery;
+
+/**
+ * Class Configuration.
+ *
+ * @author Julien Chanséaume
+ */
+class Configuration extends BaseForm
+{
+ protected function buildForm(): void
+ {
+ $form = $this->formBuilder;
+
+ $definitions = [
+ [
+ 'id' => 'twitter',
+ 'label' => Translator::getInstance()->trans('Twitter username', [], 'hooksocial'),
+ ],
+ [
+ 'id' => 'facebook',
+ 'label' => Translator::getInstance()->trans('Facebook username', [], 'hooksocial'),
+ ],
+ [
+ 'id' => 'google',
+ 'label' => Translator::getInstance()->trans('Google + username', [], 'hooksocial'),
+ ],
+ [
+ 'id' => 'instagram',
+ 'label' => Translator::getInstance()->trans('Instagram username', [], 'hooksocial'),
+ ],
+ [
+ 'id' => 'pinterest',
+ 'label' => Translator::getInstance()->trans('Pinterest username', [], 'hooksocial'),
+ ],
+ [
+ 'id' => 'youtube',
+ 'label' => Translator::getInstance()->trans('Youtube URL', [], 'hooksocial'),
+ ],
+ [
+ 'id' => 'rss',
+ 'label' => Translator::getInstance()->trans('RSS URL', [], 'hooksocial'),
+ ],
+ ];
+
+ foreach ($definitions as $field) {
+ $value = ConfigQuery::read('hooksocial_'.$field['id'], '');
+ $form->add(
+ $field['id'],
+ TextType::class,
+ [
+ 'data' => $value,
+ 'label' => $field['label'],
+ 'label_attr' => [
+ 'for' => $field['id'],
+ ],
+ ]
+ );
+ }
+ }
+
+ /**
+ * @return string the name of you form. This name must be unique
+ */
+ public static function getName()
+ {
+ return 'hooksocial';
+ }
+}
diff --git a/domokits/local/modules/HookSocial/Hook/FrontHook.php b/domokits/local/modules/HookSocial/Hook/FrontHook.php
new file mode 100644
index 0000000..c284f2c
--- /dev/null
+++ b/domokits/local/modules/HookSocial/Hook/FrontHook.php
@@ -0,0 +1,37 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookSocial\Hook;
+
+use Thelia\Core\Event\Hook\HookRenderBlockEvent;
+use Thelia\Core\Hook\BaseHook;
+
+/**
+ * Class FrontHook.
+ *
+ * @author Julien Chanséaume
+ */
+class FrontHook extends BaseHook
+{
+ public function onMainFooterBody(HookRenderBlockEvent $event): void
+ {
+ $content = trim($this->render('main-footer-body.html'));
+ if ('' != $content) {
+ $event->add([
+ 'id' => 'social-footer-body',
+ 'class' => 'social',
+ 'title' => $this->trans('Follow us', [], 'hooksocial'),
+ 'content' => $content,
+ ]);
+ }
+ }
+}
diff --git a/domokits/local/modules/HookSocial/HookSocial.php b/domokits/local/modules/HookSocial/HookSocial.php
new file mode 100644
index 0000000..e615459
--- /dev/null
+++ b/domokits/local/modules/HookSocial/HookSocial.php
@@ -0,0 +1,19 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace HookSocial;
+
+use Thelia\Module\BaseModule;
+
+class HookSocial extends BaseModule
+{
+}
diff --git a/domokits/local/modules/HookSocial/I18n/backOffice/default/de_DE.php b/domokits/local/modules/HookSocial/I18n/backOffice/default/de_DE.php
new file mode 100644
index 0000000..94582e3
--- /dev/null
+++ b/domokits/local/modules/HookSocial/I18n/backOffice/default/de_DE.php
@@ -0,0 +1,16 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'An error occured' => 'Ein Fehler ist aufgetreten',
+ 'Save' => 'Speichern',
+];
diff --git a/domokits/local/modules/HookSocial/I18n/backOffice/default/en_US.php b/domokits/local/modules/HookSocial/I18n/backOffice/default/en_US.php
new file mode 100755
index 0000000..0f1fc7d
--- /dev/null
+++ b/domokits/local/modules/HookSocial/I18n/backOffice/default/en_US.php
@@ -0,0 +1,17 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'An error occured' => 'An error occured',
+ 'Edit your social accounts.' => 'Edit your social accounts.',
+ 'Save' => 'Save',
+];
diff --git a/domokits/local/modules/HookSocial/I18n/backOffice/default/fr_FR.php b/domokits/local/modules/HookSocial/I18n/backOffice/default/fr_FR.php
new file mode 100644
index 0000000..7fd0d30
--- /dev/null
+++ b/domokits/local/modules/HookSocial/I18n/backOffice/default/fr_FR.php
@@ -0,0 +1,17 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'An error occured' => 'Une erreur est survenue',
+ 'Edit your social accounts.' => 'Modifier vos paramètres de réseaux sociaux.',
+ 'Save' => ' Enregistrer',
+];
diff --git a/domokits/local/modules/HookSocial/I18n/backOffice/default/it_IT.php b/domokits/local/modules/HookSocial/I18n/backOffice/default/it_IT.php
new file mode 100644
index 0000000..c4c1edc
--- /dev/null
+++ b/domokits/local/modules/HookSocial/I18n/backOffice/default/it_IT.php
@@ -0,0 +1,16 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Edit your social accounts.' => 'Modifica i tuoi account social.',
+ 'Save' => 'Salvare',
+];
diff --git a/domokits/local/modules/HookSocial/I18n/backOffice/default/ru_RU.php b/domokits/local/modules/HookSocial/I18n/backOffice/default/ru_RU.php
new file mode 100755
index 0000000..f2def80
--- /dev/null
+++ b/domokits/local/modules/HookSocial/I18n/backOffice/default/ru_RU.php
@@ -0,0 +1,17 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'An error occured' => 'Произошла ошибка',
+ 'Edit your social accounts.' => 'Редактировать ваши социальные аккаунты.',
+ 'Save' => 'Сохранить',
+];
diff --git a/domokits/local/modules/HookSocial/I18n/backOffice/default/tr_TR.php b/domokits/local/modules/HookSocial/I18n/backOffice/default/tr_TR.php
new file mode 100644
index 0000000..98a4654
--- /dev/null
+++ b/domokits/local/modules/HookSocial/I18n/backOffice/default/tr_TR.php
@@ -0,0 +1,17 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'An error occured' => 'Bir hata meydana geldi',
+ 'Edit your social accounts.' => 'Sosyal hesaplarınızı düzenleyin.',
+ 'Save' => 'kaydet',
+];
diff --git a/domokits/local/modules/HookSocial/I18n/de_DE.php b/domokits/local/modules/HookSocial/I18n/de_DE.php
new file mode 100644
index 0000000..53be417
--- /dev/null
+++ b/domokits/local/modules/HookSocial/I18n/de_DE.php
@@ -0,0 +1,22 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Facebook username' => 'Facebook Benutzername',
+ 'Follow us' => 'Folgen Sie uns',
+ 'Google + username' => 'Google+ Benutzername',
+ 'Instagram username' => 'Instagram Benutzername',
+ 'Pinterest username' => 'Pinterest Benutzername',
+ 'RSS URL' => 'RSS-URL',
+ 'Twitter username' => 'Twitter Benutzername',
+ 'Youtube URL' => 'YouTube-URL',
+];
diff --git a/domokits/local/modules/HookSocial/I18n/en_US.php b/domokits/local/modules/HookSocial/I18n/en_US.php
new file mode 100755
index 0000000..1752f26
--- /dev/null
+++ b/domokits/local/modules/HookSocial/I18n/en_US.php
@@ -0,0 +1,22 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Facebook username' => 'Facebook username',
+ 'Follow us' => 'Follow us',
+ 'Google + username' => 'Google + username',
+ 'Instagram username' => 'Instagram username',
+ 'Pinterest username' => 'Pinterest username',
+ 'RSS URL' => 'RSS URL',
+ 'Twitter username' => 'Twitter username',
+ 'Youtube URL' => 'Youtube URL',
+];
diff --git a/domokits/local/modules/HookSocial/I18n/fr_FR.php b/domokits/local/modules/HookSocial/I18n/fr_FR.php
new file mode 100755
index 0000000..dc7db56
--- /dev/null
+++ b/domokits/local/modules/HookSocial/I18n/fr_FR.php
@@ -0,0 +1,22 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Facebook username' => 'Nom d\'utilisateur Facebook',
+ 'Follow us' => 'Suivez-nous',
+ 'Google + username' => 'Nom d\'utilisateur Google +',
+ 'Instagram username' => 'Nom d\'utilisateur Instagram',
+ 'Pinterest username' => 'Nom d\'utilisateur Pinterest',
+ 'RSS URL' => 'URL du flux RSS',
+ 'Twitter username' => 'Nom d\'utilisateur Twitter',
+ 'Youtube URL' => 'URL Youtube',
+];
diff --git a/domokits/local/modules/HookSocial/I18n/frontOffice/default/de_DE.php b/domokits/local/modules/HookSocial/I18n/frontOffice/default/de_DE.php
new file mode 100644
index 0000000..12b828e
--- /dev/null
+++ b/domokits/local/modules/HookSocial/I18n/frontOffice/default/de_DE.php
@@ -0,0 +1,20 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Facebook' => 'Facebook',
+ 'Google+' => 'Google+',
+ 'Instagram' => 'Instagram',
+ 'RSS' => 'RSS-Feed',
+ 'Twitter' => 'Twitter',
+ 'Youtube' => 'YouTube',
+];
diff --git a/domokits/local/modules/HookSocial/I18n/frontOffice/default/en_US.php b/domokits/local/modules/HookSocial/I18n/frontOffice/default/en_US.php
new file mode 100755
index 0000000..7ca6666
--- /dev/null
+++ b/domokits/local/modules/HookSocial/I18n/frontOffice/default/en_US.php
@@ -0,0 +1,20 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Facebook' => 'Facebook',
+ 'Google+' => 'Google+',
+ 'Instagram' => 'Instagram',
+ 'RSS' => 'RSS Feed',
+ 'Twitter' => 'Twitter',
+ 'Youtube' => 'Youtube',
+];
diff --git a/domokits/local/modules/HookSocial/I18n/frontOffice/default/fr_FR.php b/domokits/local/modules/HookSocial/I18n/frontOffice/default/fr_FR.php
new file mode 100755
index 0000000..74465e0
--- /dev/null
+++ b/domokits/local/modules/HookSocial/I18n/frontOffice/default/fr_FR.php
@@ -0,0 +1,20 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Facebook' => 'Facebook',
+ 'Google+' => 'Google+',
+ 'Instagram' => 'Instagram',
+ 'RSS' => 'Flux RSS',
+ 'Twitter' => 'Twitter',
+ 'Youtube' => 'Youtube',
+];
diff --git a/domokits/local/modules/HookSocial/I18n/frontOffice/default/it_IT.php b/domokits/local/modules/HookSocial/I18n/frontOffice/default/it_IT.php
new file mode 100644
index 0000000..b089829
--- /dev/null
+++ b/domokits/local/modules/HookSocial/I18n/frontOffice/default/it_IT.php
@@ -0,0 +1,20 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Facebook' => 'Facebook',
+ 'Google+' => 'Google +',
+ 'Instagram' => 'Instagram',
+ 'RSS' => 'RSS Feed',
+ 'Twitter' => 'Twitter',
+ 'Youtube' => 'Youtube',
+];
diff --git a/domokits/local/modules/HookSocial/I18n/frontOffice/default/ru_RU.php b/domokits/local/modules/HookSocial/I18n/frontOffice/default/ru_RU.php
new file mode 100755
index 0000000..defbbbe
--- /dev/null
+++ b/domokits/local/modules/HookSocial/I18n/frontOffice/default/ru_RU.php
@@ -0,0 +1,21 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Facebook' => 'Facebook',
+ 'Google+' => 'Google+',
+ 'Instagram' => 'Instagram',
+ 'Pinterest' => 'Pinterest',
+ 'RSS' => 'RSS-канал',
+ 'Twitter' => 'Twitter',
+ 'Youtube' => 'Youtube',
+];
diff --git a/domokits/local/modules/HookSocial/I18n/frontOffice/default/tr_TR.php b/domokits/local/modules/HookSocial/I18n/frontOffice/default/tr_TR.php
new file mode 100644
index 0000000..351bff5
--- /dev/null
+++ b/domokits/local/modules/HookSocial/I18n/frontOffice/default/tr_TR.php
@@ -0,0 +1,20 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Facebook' => 'Facebook',
+ 'Google+' => 'Google +',
+ 'Instagram' => 'Instagram',
+ 'RSS' => 'RSS Beslemesi',
+ 'Twitter' => 'Twitter',
+ 'Youtube' => 'Youtube',
+];
diff --git a/domokits/local/modules/HookSocial/I18n/it_IT.php b/domokits/local/modules/HookSocial/I18n/it_IT.php
new file mode 100644
index 0000000..c652329
--- /dev/null
+++ b/domokits/local/modules/HookSocial/I18n/it_IT.php
@@ -0,0 +1,22 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Facebook username' => 'Nome utente Facebook',
+ 'Follow us' => 'Seguici',
+ 'Google + username' => 'Nome utente Google +',
+ 'Instagram username' => 'Nome utente Instagram',
+ 'Pinterest username' => 'Nome utente Pinterest',
+ 'RSS URL' => 'RSS URL',
+ 'Twitter username' => 'Nome utente Twitter',
+ 'Youtube URL' => 'Youtube URL',
+];
diff --git a/domokits/local/modules/HookSocial/I18n/ru_RU.php b/domokits/local/modules/HookSocial/I18n/ru_RU.php
new file mode 100755
index 0000000..2430ffc
--- /dev/null
+++ b/domokits/local/modules/HookSocial/I18n/ru_RU.php
@@ -0,0 +1,22 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Facebook username' => 'Имя пользователя Facebook',
+ 'Follow us' => 'Мы в соц сетях',
+ 'Google + username' => 'Имя пользователя Google +',
+ 'Instagram username' => 'Имя пользователя Instagram',
+ 'Pinterest username' => 'Имя пользователя Pinterest',
+ 'RSS URL' => 'RSS URL',
+ 'Twitter username' => 'Имя пользователя Twitter',
+ 'Youtube URL' => 'Youtube URL',
+];
diff --git a/domokits/local/modules/HookSocial/I18n/tr_TR.php b/domokits/local/modules/HookSocial/I18n/tr_TR.php
new file mode 100644
index 0000000..88310ac
--- /dev/null
+++ b/domokits/local/modules/HookSocial/I18n/tr_TR.php
@@ -0,0 +1,22 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+ 'Facebook username' => 'Facebook kullanıcı adı',
+ 'Follow us' => 'Bizi takip edin',
+ 'Google + username' => 'Google + kullanıcı adı',
+ 'Instagram username' => 'Google + kullanıcı adı',
+ 'Pinterest username' => 'Pinterest kullanıcı adı',
+ 'RSS URL' => 'RSS URL',
+ 'Twitter username' => 'Twitter kullanıcı adı',
+ 'Youtube URL' => 'YouTube URL',
+];
diff --git a/domokits/local/modules/HookSocial/LICENSE.txt b/domokits/local/modules/HookSocial/LICENSE.txt
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/domokits/local/modules/HookSocial/LICENSE.txt
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/domokits/local/modules/HookSocial/composer.json b/domokits/local/modules/HookSocial/composer.json
new file mode 100644
index 0000000..4a18288
--- /dev/null
+++ b/domokits/local/modules/HookSocial/composer.json
@@ -0,0 +1,11 @@
+{
+ "name": "thelia/hook-social-module",
+ "license": "LGPL-3.0+",
+ "type": "thelia-module",
+ "require": {
+ "thelia/installer": "~1.1"
+ },
+ "extra": {
+ "installer-name": "HookSocial"
+ }
+}
diff --git a/domokits/local/modules/HookSocial/templates/backOffice/default/assets/js/module-configuration.js b/domokits/local/modules/HookSocial/templates/backOffice/default/assets/js/module-configuration.js
new file mode 100644
index 0000000..5bf3dfc
--- /dev/null
+++ b/domokits/local/modules/HookSocial/templates/backOffice/default/assets/js/module-configuration.js
@@ -0,0 +1,28 @@
+$(document).ready(function() {
+ $("#hooksocial-form").on("submit", function(e, data){
+ e.preventDefault();
+ var form = $(this);
+
+ $('body').append('
\ No newline at end of file
diff --git a/domokits/local/modules/LocalPickup/.github/workflows/release.yml b/domokits/local/modules/LocalPickup/.github/workflows/release.yml
new file mode 100644
index 0000000..e880140
--- /dev/null
+++ b/domokits/local/modules/LocalPickup/.github/workflows/release.yml
@@ -0,0 +1,7 @@
+name: "Auto Release"
+on:
+ push:
+ branches: [ master, main ]
+jobs:
+ release:
+ uses: thelia-modules/ReusableWorkflow/.github/workflows/auto_release.yml@main
diff --git a/domokits/local/modules/LocalPickup/Config/config.xml b/domokits/local/modules/LocalPickup/Config/config.xml
new file mode 100644
index 0000000..57def57
--- /dev/null
+++ b/domokits/local/modules/LocalPickup/Config/config.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/domokits/local/modules/LocalPickup/Config/module.xml b/domokits/local/modules/LocalPickup/Config/module.xml
new file mode 100644
index 0000000..8423bf6
--- /dev/null
+++ b/domokits/local/modules/LocalPickup/Config/module.xml
@@ -0,0 +1,18 @@
+
+
+ LocalPickup\LocalPickup
+
+ Local Pickup
+
+
+ Retrait sur place
+
+ 2.0.5
+
+ Thelia
+ info@thelia.net
+
+ delivery
+ 2.5.0
+ alpha
+
diff --git a/domokits/local/modules/LocalPickup/Config/routing.xml b/domokits/local/modules/LocalPickup/Config/routing.xml
new file mode 100644
index 0000000..82816fd
--- /dev/null
+++ b/domokits/local/modules/LocalPickup/Config/routing.xml
@@ -0,0 +1,9 @@
+
+
+
+
+ LocalPickup\Controller\ConfigurationController::configure
+
+
diff --git a/domokits/local/modules/LocalPickup/Controller/ConfigurationController.php b/domokits/local/modules/LocalPickup/Controller/ConfigurationController.php
new file mode 100644
index 0000000..9958e4b
--- /dev/null
+++ b/domokits/local/modules/LocalPickup/Controller/ConfigurationController.php
@@ -0,0 +1,74 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/* Copyright (c) OpenStudio */
+/* email : dev@thelia.net */
+/* web : http://www.thelia.net */
+
+/* For the full copyright and license information, please view the LICENSE.txt */
+/* file that was distributed with this source code. */
+
+namespace LocalPickup\Controller;
+
+use LocalPickup\Form\ConfigurationForm;
+use LocalPickup\LocalPickup;
+use Symfony\Component\HttpFoundation\RedirectResponse;
+use Thelia\Controller\Admin\BaseAdminController;
+use Thelia\Core\Security\AccessManager;
+use Thelia\Core\Security\Resource\AdminResources;
+use Thelia\Form\Exception\FormValidationException;
+use Thelia\Tools\URL;
+
+/**
+ * Class ConfigurationController.
+ *
+ * @author Thelia
+ */
+class ConfigurationController extends BaseAdminController
+{
+ public function configure()
+ {
+ if (null !== $response = $this->checkAuth([AdminResources::MODULE], ['LocalPickup'], AccessManager::UPDATE)) {
+ return $response;
+ }
+
+ $form = $this->createForm(ConfigurationForm::getName());
+ $errmes = $ex = null;
+
+ try {
+ $vform = $this->validateForm($form);
+
+ $price = $vform->get('price')->getData();
+ $description = $vform->get('description')->getData();
+ $email = $vform->get('email')->getData();
+
+ LocalPickup::setConfigValue(LocalPickup::PRICE_VAR_NAME, (float) $price);
+ LocalPickup::setConfigValue(LocalPickup::DESCRIPTION_VAR_NAME, $description, $this->getCurrentEditionLocale());
+ LocalPickup::setConfigValue(LocalPickup::EMAIL_VAR_NAME, $email, $this->getCurrentEditionLocale());
+ } catch (FormValidationException $ex) {
+ $errmes = $this->createStandardFormValidationErrorMessage($ex);
+ } catch (\Exception $ex) {
+ $errmes = $ex->getMessage();
+ }
+
+ if (null !== $errmes && null !== $ex) {
+ $this->setupFormErrorContext(
+ 'configuration',
+ $errmes,
+ $form,
+ $ex
+ );
+ }
+
+ return new RedirectResponse(URL::getInstance()->absoluteUrl('/admin/module/LocalPickup'));
+ }
+}
diff --git a/domokits/local/modules/LocalPickup/EventListeners/APIListener.php b/domokits/local/modules/LocalPickup/EventListeners/APIListener.php
new file mode 100644
index 0000000..4e58ccc
--- /dev/null
+++ b/domokits/local/modules/LocalPickup/EventListeners/APIListener.php
@@ -0,0 +1,145 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace LocalPickup\EventListeners;
+
+use LocalPickup\LocalPickup;
+use OpenApi\Events\DeliveryModuleOptionEvent;
+use OpenApi\Events\OpenApiEvents;
+use OpenApi\Model\Api\DeliveryModuleOption;
+use OpenApi\Model\Api\ModelFactory;
+use Propel\Runtime\Exception\PropelException;
+use Symfony\Component\DependencyInjection\ContainerInterface;
+use Symfony\Component\EventDispatcher\EventSubscriberInterface;
+use Symfony\Component\HttpFoundation\RequestStack;
+use Thelia\Core\Event\TheliaEvents;
+use Thelia\Core\Event\Order\OrderEvent;
+use Thelia\Mailer\MailerFactory;
+use Thelia\Model\ModuleQuery;
+use Thelia\Model\OrderStatus;
+
+class APIListener implements EventSubscriberInterface
+{
+ /** @var ModelFactory */
+ protected $modelFactory;
+
+ /** @var RequestStack */
+ protected $requestStack;
+
+ /**
+ * @var MailerFactory
+ */
+ protected $mailer;
+
+ /**
+ * APIListener constructor.
+ *
+ * @param ContainerInterface $container We need the container because we use a service from another module
+ * which is not mandatory, and using its service without it being installed will crash
+ */
+ public function __construct(ModelFactory $modelFactory, RequestStack $requestStack, MailerFactory $mailer)
+ {
+ $this->modelFactory = $modelFactory;
+ $this->requestStack = $requestStack;
+ $this->mailer = $mailer;
+ }
+
+
+ public function getDeliveryModuleOptions(DeliveryModuleOptionEvent $deliveryModuleOptionEvent): void
+ {
+ $module = ModuleQuery::create()->findOneByCode(LocalPickup::getModuleCode());
+ if ($deliveryModuleOptionEvent->getModule()->getId() !== $module->getId()) {
+ return;
+ }
+
+ $isValid = true;
+ $locale = $this->requestStack->getCurrentRequest()->getSession()->getLang()->getLocale();
+
+ $postage = LocalPickup::getConfigValue(LocalPickup::PRICE_VAR_NAME, 0);
+ $commentary = LocalPickup::getConfigValue(
+ LocalPickup::DESCRIPTION_VAR_NAME,
+ '',
+ $locale
+ );
+
+ $postageTax = 0;
+
+ $minimumDeliveryDate = '';
+ $maximumDeliveryDate = '';
+
+ $images = $module->getModuleImages();
+ $imageId = 0;
+
+ $title = $module->setLocale($locale)->getTitle();
+
+ if ($images->count() > 0) {
+ $imageId = $images->getFirst()->getId();
+ }
+
+ /** @var DeliveryModuleOption $deliveryModuleOption */
+ $deliveryModuleOption = $this->modelFactory->buildModel('DeliveryModuleOption');
+ $deliveryModuleOption
+ ->setCode(LocalPickup::getModuleCode())
+ ->setValid($isValid)
+ ->setTitle($title)
+ ->setImage($imageId)
+ ->setMinimumDeliveryDate($minimumDeliveryDate)
+ ->setMaximumDeliveryDate($maximumDeliveryDate)
+ ->setPostage($postage)
+ ->setPostageTax($postageTax)
+ ->setPostageUntaxed($postage - $postageTax)
+ ;
+
+ // Pre-5.3.x compatibility
+ if (method_exists($deliveryModuleOption, 'setDescription')) {
+ $deliveryModuleOption->setDescription($commentary);
+ }
+
+ $deliveryModuleOptionEvent->appendDeliveryModuleOptions($deliveryModuleOption);
+ }
+
+ /**
+ * @throws PropelException
+ */
+ public function getOrderStatus(OrderEvent $orderEvent)
+ {
+ $order = $orderEvent->getOrder();
+
+ if ($order->getDeliveryModuleId() !== LocalPickup::getModuleId() || $order->getOrderStatus()->getCode() !== OrderStatus::CODE_SENT) {
+ return;
+ }
+
+ $this->mailer->sendEmailToCustomer(
+ LocalPickup::EMAIL_CUSTOM_LOCAL_PICKUP,
+ $order->getCustomer(),
+ [
+ 'order_id' => $order->getId(),
+ 'order_ref' => $order->getRef(),
+ 'comment' => LocalPickup::getConfigValue(LocalPickup::EMAIL_VAR_NAME, '', $order->getLang()->getLocale()),
+ ]
+ );
+ }
+
+ public static function getSubscribedEvents()
+ {
+ $listenedEvents = [];
+
+ /* Check for old versions of Thelia where the events used by the API didn't exists */
+ if (class_exists(DeliveryModuleOptionEvent::class)) {
+ $listenedEvents[OpenApiEvents::MODULE_DELIVERY_GET_OPTIONS] = ['getDeliveryModuleOptions', 129];
+ }
+
+ $listenedEvents[TheliaEvents::ORDER_UPDATE_STATUS] = ['getOrderStatus', 99];
+
+ return $listenedEvents;
+ }
+}
diff --git a/domokits/local/modules/LocalPickup/Form/ConfigurationForm.php b/domokits/local/modules/LocalPickup/Form/ConfigurationForm.php
new file mode 100644
index 0000000..79f9db3
--- /dev/null
+++ b/domokits/local/modules/LocalPickup/Form/ConfigurationForm.php
@@ -0,0 +1,84 @@
+formBuilder
+ ->add(
+ "price",
+ NumberType::class,
+ [
+ "required" => false,
+ "label"=>Translator::getInstance()->trans("Price", [], LocalPickup::DOMAIN_NAME),
+ "label_attr"=> [
+ "for"=>"pricefield"
+ ],
+ "constraints"=> [ new NotBlank(), new GreaterThanOrEqual([ 'value' => 0 ]) ]
+ ]
+ )
+ ->add(
+ "description",
+ TextareaType::class,
+ [
+ "required" => false,
+ "label"=> Translator::getInstance()->trans("Commentary local pickup", [], LocalPickup::DOMAIN_NAME),
+ 'attr' => [
+ 'rows' => 5,
+ ],
+ "label_attr"=> [
+ "for"=>"description"
+ ],
+ ]
+ )
+ ->add(
+ "email",
+ TextareaType::class,
+ [
+ "required" => false,
+ "label"=> Translator::getInstance()->trans("Commentary email", [], LocalPickup::DOMAIN_NAME),
+ 'attr' => [
+ 'rows' => 5,
+ ],
+ "label_attr"=> [
+ "for"=>"description"
+ ],
+ ]
+ )
+ ;
+ }
+
+ /**
+ * @return string the name of you form. This name must be unique
+ */
+ public static function getName()
+ {
+ return "config-localpickup";
+ }
+
+}
diff --git a/domokits/local/modules/LocalPickup/Hook/HookManager.php b/domokits/local/modules/LocalPickup/Hook/HookManager.php
new file mode 100644
index 0000000..d6a185b
--- /dev/null
+++ b/domokits/local/modules/LocalPickup/Hook/HookManager.php
@@ -0,0 +1,75 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/* Copyright (c) OpenStudio */
+/* email : dev@thelia.net */
+/* web : http://www.thelia.net */
+
+/* For the full copyright and license information, please view the LICENSE.txt */
+/* file that was distributed with this source code. */
+
+namespace LocalPickup\Hook;
+
+use LocalPickup\LocalPickup;
+use Thelia\Core\Event\Hook\HookRenderEvent;
+use Thelia\Core\Hook\BaseHook;
+
+/**
+ * Class HookManager.
+ *
+ * @author Thomas Arnaud
+ */
+class HookManager extends BaseHook
+{
+ public function onModuleConfiguration(HookRenderEvent $event): void
+ {
+ $locale = $this->getSession()->getAdminEditionLang()->getLocale();
+
+ $event->add(
+ $this->render(
+ 'module_configuration.html',
+ [
+ 'price' => (float) LocalPickup::getConfigValue(LocalPickup::PRICE_VAR_NAME, 0),
+ 'description' => LocalPickup::getConfigValue(LocalPickup::DESCRIPTION_VAR_NAME, '', $locale),
+ 'email' => LocalPickup::getConfigValue(LocalPickup::EMAIL_VAR_NAME, '', $locale),
+ ]
+ )
+ );
+ }
+
+ public function onOrderInvoiceDeliveryAddress(HookRenderEvent $event): void
+ {
+ // Show the local delivery template if we're the current delivery module.
+ if ((null !== $order = $this->getSession()->getOrder()) && $order->getDeliveryModuleId() == LocalPickup::getModuleId()) {
+ $event->add(
+ $this->render('localpickup/order-invoice-delivery-address.html', [
+ 'order_id' => $event->getArgument('order_id'),
+ ])
+ );
+ }
+ }
+
+ public function onOrderDeliveryExtra(HookRenderEvent $event): void
+ {
+ $event->add(
+ $this->render(
+ 'localpickup/delivery-address.html',
+ [
+ 'description' => LocalPickup::getConfigValue(
+ LocalPickup::DESCRIPTION_VAR_NAME, '',
+ $this->getSession()->getLang()->getLocale()
+ ),
+ ]
+ )
+ );
+ }
+}
diff --git a/domokits/local/modules/LocalPickup/I18n/backOffice/default/en_US.php b/domokits/local/modules/LocalPickup/I18n/backOffice/default/en_US.php
new file mode 100644
index 0000000..b43e799
--- /dev/null
+++ b/domokits/local/modules/LocalPickup/I18n/backOffice/default/en_US.php
@@ -0,0 +1,7 @@
+ 'Close',
+ 'Configure local pickup' => 'Configure local pickup',
+ 'Save changes' => 'Save changes ',
+);
diff --git a/domokits/local/modules/LocalPickup/I18n/backOffice/default/fr_FR.php b/domokits/local/modules/LocalPickup/I18n/backOffice/default/fr_FR.php
new file mode 100644
index 0000000..36cae13
--- /dev/null
+++ b/domokits/local/modules/LocalPickup/I18n/backOffice/default/fr_FR.php
@@ -0,0 +1,7 @@
+ 'Fermer',
+ 'Configure local pickup' => 'Configurer le retrait sur place',
+ 'Save changes' => 'Enregistrer les modifications',
+);
diff --git a/domokits/local/modules/LocalPickup/I18n/email/default/en_US.php b/domokits/local/modules/LocalPickup/I18n/email/default/en_US.php
new file mode 100644
index 0000000..f5db2f7
--- /dev/null
+++ b/domokits/local/modules/LocalPickup/I18n/email/default/en_US.php
@@ -0,0 +1,10 @@
+ 'Instructions',
+ 'Your order is available in store' => 'Your order is available in store',
+ 'Come pick up your order at the store' => 'Your order has been processed. You can collect it during store opening hours.',
+ 'Delivery address' => 'Delivery address',
+ 'Thanks' => 'Thanks',
+ 'The %store team.' => 'The %store team.',
+);
diff --git a/domokits/local/modules/LocalPickup/I18n/email/default/fr_FR.php b/domokits/local/modules/LocalPickup/I18n/email/default/fr_FR.php
new file mode 100644
index 0000000..d8e51d7
--- /dev/null
+++ b/domokits/local/modules/LocalPickup/I18n/email/default/fr_FR.php
@@ -0,0 +1,10 @@
+ 'Instructions',
+ 'Your order is available in store' => 'Votre commande est disponible en magasin',
+ 'Come pick up your order at the store' => "Votre commande a été traité, vous pouvez venir récupérer celle-ci en respectant les horaires d'ouverture du magasin.",
+ 'Delivery address' => 'Adresse de livraison',
+ 'Thanks' => 'Merci',
+ "The %store team." => "L'équipe %store."
+);
diff --git a/domokits/local/modules/LocalPickup/I18n/en_US.php b/domokits/local/modules/LocalPickup/I18n/en_US.php
new file mode 100644
index 0000000..bd1a3c0
--- /dev/null
+++ b/domokits/local/modules/LocalPickup/I18n/en_US.php
@@ -0,0 +1,8 @@
+ 'Write a comment visible for the user when selecting this delivery mode',
+ 'Commentary email' => 'Write a comment visible for the user in the email',
+ 'Price' => 'Price without taxes',
+ 'price must be a number !' => 'price must be a number !',
+);
diff --git a/domokits/local/modules/LocalPickup/I18n/fr_FR.php b/domokits/local/modules/LocalPickup/I18n/fr_FR.php
new file mode 100644
index 0000000..e8e520c
--- /dev/null
+++ b/domokits/local/modules/LocalPickup/I18n/fr_FR.php
@@ -0,0 +1,8 @@
+ 'Vous pouvez indiquer un commentaire qui sera affiché à vos client lors de la sélection de ce mode de livraison',
+ 'Commentary email' => 'Vous pouvez indiquer un commentaire qui sera affiché à vos client dans l\'email',
+ 'Price' => 'Prix HT',
+ 'price must be a number !' => 'Le prix doit être un nombre !',
+);
diff --git a/domokits/local/modules/LocalPickup/I18n/frontOffice/default/en_US.php b/domokits/local/modules/LocalPickup/I18n/frontOffice/default/en_US.php
new file mode 100644
index 0000000..9603813
--- /dev/null
+++ b/domokits/local/modules/LocalPickup/I18n/frontOffice/default/en_US.php
@@ -0,0 +1,8 @@
+ 'In-store pick-up',
+ 'Instructions'=> 'Instructions',
+ 'Your order is available in store' => 'Votre commande est disponible en magasin',
+ 'Come pick up your order at the store' => "Votre commande a été traité, vous pouvez venir récupérer celle-ci en respectant les horaires d'ouverture du magasin",
+);
diff --git a/domokits/local/modules/LocalPickup/I18n/frontOffice/default/fr_FR.php b/domokits/local/modules/LocalPickup/I18n/frontOffice/default/fr_FR.php
new file mode 100644
index 0000000..070779c
--- /dev/null
+++ b/domokits/local/modules/LocalPickup/I18n/frontOffice/default/fr_FR.php
@@ -0,0 +1,8 @@
+ 'Retrait en magasin',
+ 'Instructions'=> 'Instructions',
+ 'Your order is available in store' => 'Votre commande est disponible en magasin',
+ 'Come pick up your order at the store' => "Votre commande a été traité, vous pouvez venir récupérer celle-ci en respectant les horaires d'ouverture du magasin",
+);
diff --git a/domokits/local/modules/LocalPickup/LICENSE.txt b/domokits/local/modules/LocalPickup/LICENSE.txt
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/domokits/local/modules/LocalPickup/LICENSE.txt
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/domokits/local/modules/LocalPickup/Listener/UpdateDeliveryAddress.php b/domokits/local/modules/LocalPickup/Listener/UpdateDeliveryAddress.php
new file mode 100644
index 0000000..83ee53c
--- /dev/null
+++ b/domokits/local/modules/LocalPickup/Listener/UpdateDeliveryAddress.php
@@ -0,0 +1,109 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/* Copyright (c) OpenStudio */
+/* email : info@thelia.net */
+/* web : http://www.thelia.net */
+
+/* This program is free software; you can redistribute it and/or modify */
+/* it under the terms of the GNU General Public License as published by */
+/* the Free Software Foundation; either version 3 of the License */
+
+/* This program is distributed in the hope that it will be useful, */
+/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
+/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
+/* GNU General Public License for more details. */
+
+/* You should have received a copy of the GNU General Public License */
+/* along with this program. If not, see . */
+
+namespace LocalPickup\Listener;
+
+use LocalPickup\LocalPickup;
+use Symfony\Component\EventDispatcher\EventDispatcherInterface;
+use Symfony\Component\EventDispatcher\EventSubscriberInterface;
+use Thelia\Action\BaseAction;
+use Thelia\Core\Event\Order\OrderAddressEvent;
+use Thelia\Core\Event\Order\OrderEvent;
+use Thelia\Core\Event\TheliaEvents;
+use Thelia\Model\ConfigQuery;
+use Thelia\Model\OrderAddressQuery;
+
+/**
+ * Class UpdateDeliveryAddress.
+ *
+ * @contributor Thomas Arnaud
+ */
+class UpdateDeliveryAddress extends BaseAction implements EventSubscriberInterface
+{
+ /**
+ * @throws \Exception
+ */
+ public function updateAddress(OrderEvent $event, $eventName, EventDispatcherInterface $dispatcher): void
+ {
+ if ($event->getOrder()->getDeliveryModuleId() === LocalPickup::getModuleId()) {
+ $address_id = $event->getOrder()->getDeliveryOrderAddressId();
+ $address = OrderAddressQuery::create()->findPk($address_id);
+
+ if ($address !== null) {
+ $address1 = ConfigQuery::read('store_address1');
+ $address2 = ConfigQuery::read('store_address2');
+ $address3 = ConfigQuery::read('store_address3');
+ $zipcode = ConfigQuery::read('store_zipcode');
+ $city = ConfigQuery::read('store_city');
+ $country = ConfigQuery::read('store_country');
+ $name = ConfigQuery::read('store_name');
+
+ if ($address1 !== null && $zipcode !== null && $city !== null && $country !== null) {
+ $address_event = new OrderAddressEvent(
+ $address->getCustomerTitleId(),
+ $address->getFirstname(),
+ $address->getLastname(),
+ $address1,
+ $address2,
+ $address3,
+ $zipcode,
+ $city,
+ $country,
+ $address->getPhone(),
+ $name,
+ $address->getCellphone()
+ );
+
+ $address_event->setOrderAddress($address);
+ $address_event->setOrder($event->getOrder());
+ $dispatcher->dispatch($address_event, TheliaEvents::ORDER_UPDATE_ADDRESS);
+ }
+ } else {
+ throw new \Exception("Error: order delivery address doesn't exists");
+ }
+ }
+ }
+
+ public function setAddress(OrderEvent $event): void
+ {
+ if ($event->getOrder()->getDeliveryModuleId() === LocalPickup::getModuleId()) {
+ $event->setDeliveryAddress(null);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public static function getSubscribedEvents()
+ {
+ return [
+ TheliaEvents::ORDER_BEFORE_PAYMENT => ['updateAddress', 130],
+ TheliaEvents::ORDER_SET_DELIVERY_MODULE => ['setAddress', 128],
+ ];
+ }
+}
diff --git a/domokits/local/modules/LocalPickup/LocalPickup.php b/domokits/local/modules/LocalPickup/LocalPickup.php
new file mode 100644
index 0000000..933e81e
--- /dev/null
+++ b/domokits/local/modules/LocalPickup/LocalPickup.php
@@ -0,0 +1,119 @@
+. */
+/* */
+/*************************************************************************************/
+
+namespace LocalPickup;
+
+use Propel\Runtime\Connection\ConnectionInterface;
+use Symfony\Component\DependencyInjection\Loader\Configurator\ServicesConfigurator;
+use Thelia\Install\Database;
+use Thelia\Model\Country;
+use Thelia\Model\Message;
+use Thelia\Model\MessageQuery;
+use Thelia\Model\State;
+use Thelia\Module\AbstractDeliveryModuleWithState;
+
+/**
+ * Class LocalPickup
+ * @package LocalPickup
+ * @author Thelia
+ */
+class LocalPickup extends AbstractDeliveryModuleWithState
+{
+ const DOMAIN_NAME = 'localpickup';
+
+ const PRICE_VAR_NAME = 'price';
+ const DESCRIPTION_VAR_NAME = 'description';
+ const EMAIL_VAR_NAME = 'email';
+
+ const EMAIL_CUSTOM_LOCAL_PICKUP = 'email_custom_local_pickup';
+
+ /**
+ * @inheritdoc
+ */
+ public function getPostage(Country $country, State $state = null)
+ {
+ return $this->buildOrderPostage(self::getConfigValue(self::PRICE_VAR_NAME, 0), $country, $this->getRequest()->getSession()->getLang()->getLocale());
+ }
+
+ public function update($currentVersion, $newVersion, ConnectionInterface $con = null): void
+ {
+ if (null === MessageQuery::create()->findOneByName(self::EMAIL_CUSTOM_LOCAL_PICKUP)) {
+ $message = new Message();
+ $message
+ ->setName(self::EMAIL_CUSTOM_LOCAL_PICKUP)
+ ->setHtmlTemplateFileName('order_shipping.html')
+ ->setHtmlLayoutFileName('')
+ ->setTextTemplateFileName('order_shipping.txt')
+ ->setTextLayoutFileName('')
+ ->setSecured(0)
+ ->setLocale('fr_FR')
+ ->setTitle('Confirmation de vote commande')
+ ->setSubject('Commande à récupérer en magasin')
+ ->setLocale('en_GB')
+ ->setTitle('Order confirmation')
+ ->setSubject('Order to pick up in store')
+ ->setLocale('de_DE')
+ ->setTitle('Bestellbestätigung')
+ ->setSubject('Bestellung im Geschäft abholen')
+ ->save()
+ ;
+ }
+
+ if ($newVersion === '1.2') {
+ $db = new Database($con);
+
+ // Migrate previous price from database to module config
+ try {
+ $statement = $db->execute("select price from local_pickup_shipping order by id desc limit 1");
+
+ $price = (float)$statement->fetchColumn(0);
+
+ self::setConfigValue(self::PRICE_VAR_NAME, $price);
+ } catch (\Exception $ex) {
+ // Nothing special
+ }
+ }
+ }
+
+
+ /**
+ * @inheritdoc
+ */
+ public function isValidDelivery(Country $country, State $state = null)
+ {
+ return true;
+ }
+
+ public function getDeliveryMode()
+ {
+ return "localPickup";
+ }
+
+ public static function configureServices(ServicesConfigurator $servicesConfigurator): void
+ {
+ $servicesConfigurator->load(self::getModuleCode().'\\', __DIR__)
+ ->exclude([THELIA_MODULE_DIR . ucfirst(self::getModuleCode()). "/I18n/*"])
+ ->autowire(true)
+ ->autoconfigure(true);
+ }
+}
diff --git a/domokits/local/modules/LocalPickup/Loop/LocalAddress.php b/domokits/local/modules/LocalPickup/Loop/LocalAddress.php
new file mode 100644
index 0000000..7d07b8a
--- /dev/null
+++ b/domokits/local/modules/LocalPickup/Loop/LocalAddress.php
@@ -0,0 +1,132 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/* Copyright (c) OpenStudio */
+/* email : info@thelia.net */
+/* web : http://www.thelia.net */
+
+/* This program is free software; you can redistribute it and/or modify */
+/* it under the terms of the GNU General Public License as published by */
+/* the Free Software Foundation; either version 3 of the License */
+
+/* This program is distributed in the hope that it will be useful, */
+/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
+/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
+/* GNU General Public License for more details. */
+
+/* You should have received a copy of the GNU General Public License */
+/* along with this program. If not, see . */
+
+namespace LocalPickup\Loop;
+
+use Symfony\Component\Config\Definition\Exception\Exception;
+use Thelia\Core\Template\Element\ArraySearchLoopInterface;
+use Thelia\Core\Template\Element\BaseLoop;
+use Thelia\Core\Template\Element\LoopResult;
+use Thelia\Core\Template\Element\LoopResultRow;
+use Thelia\Core\Template\Loop\Argument\Argument;
+use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
+use Thelia\Model\AddressQuery;
+use Thelia\Model\ConfigQuery;
+
+/**
+ * Class LocalAddress.
+ *
+ * @author Thelia
+ *
+ * @method int getId()
+ */
+class LocalAddress extends BaseLoop implements ArraySearchLoopInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function buildArray()
+ {
+ $id = $this->getId();
+
+ /** @var \Thelia\Core\HttpFoundation\Session\Session $session */
+ $session = $this->requestStack->getCurrentRequest()->getSession();
+
+ $address = AddressQuery::create()
+ ->filterByCustomerId($session->getCustomerUser()->getId())
+ ->findPk($id);
+
+ if ($address === null) {
+ throw new Exception("The requested address doesn't exist");
+ }
+
+ /** @var \Thelia\Model\Customer $customer */
+ $customer = $session->getCustomerUser();
+
+ return [
+ 'Id' => 0,
+ 'Label' => $address->getLabel(),
+ 'CustomerId' => $address->getCustomerId(),
+ 'TitleId' => $address->getTitleId(),
+ 'Company' => ConfigQuery::read('store_name'),
+ 'Firstname' => $customer->getFirstname(),
+ 'Lastname' => $customer->getLastname(),
+ 'Address1' => ConfigQuery::read('store_address1'),
+ 'Address2' => ConfigQuery::read('store_address2'),
+ 'Address3' => ConfigQuery::read('store_address3'),
+ 'Zipcode' => ConfigQuery::read('store_zipcode'),
+ 'City' => ConfigQuery::read('store_city'),
+ 'CountryId' => ConfigQuery::read('store_country'),
+ 'Phone' => $address->getPhone(),
+ 'Cellphone' => $address->getCellphone(),
+ 'IsDefault' => 0,
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function parseResults(LoopResult $loopResult)
+ {
+ $address = $loopResult->getResultDataCollection();
+ $loopResultRow = new LoopResultRow($address);
+
+ $loopResultRow
+ ->set('ID', $address['Id'])
+ ->set('LABEL', $address['Label'])
+ ->set('CUSTOMER', $address['CustomerId'])
+ ->set('TITLE', $address['TitleId'])
+ ->set('COMPANY', $address['Company'])
+ ->set('FIRSTNAME', $address['Firstname'])
+ ->set('LASTNAME', $address['Lastname'])
+ ->set('ADDRESS1', $address['Address1'])
+ ->set('ADDRESS2', $address['Address2'])
+ ->set('ADDRESS3', $address['Address3'])
+ ->set('ZIPCODE', $address['Zipcode'])
+ ->set('CITY', $address['City'])
+ ->set('COUNTRY', $address['CountryId'])
+ ->set('PHONE', $address['Phone'])
+ ->set('CELLPHONE', $address['Cellphone'])
+ ->set('DEFAULT', $address['IsDefault'])
+ ;
+
+ $loopResult->addRow($loopResultRow);
+
+ return $loopResult;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function getArgDefinitions()
+ {
+ return new ArgumentCollection(
+ Argument::createIntTypeArgument('id', null, true)
+ );
+ }
+}
diff --git a/domokits/local/modules/LocalPickup/README.md b/domokits/local/modules/LocalPickup/README.md
new file mode 100644
index 0000000..c01a932
--- /dev/null
+++ b/domokits/local/modules/LocalPickup/README.md
@@ -0,0 +1,101 @@
+LocalPickup module
+==================
+author: Thelia
+
+Summary
+-------
+
+fr_FR:
+1. Installation
+2. Utilisation
+3. Boucles
+4. Intégration
+
+en_US:
+1. Install notes
+2. How to use
+3. Loops
+4. Integration
+
+fr_FR
+-----
+
+### Installation
+
+#### Manually
+
+* Copiez le module dans le dossier ```/local/modules/``` et assurez-vous que le nom du module est bien LocalPickup.
+* Activez le depuis votre interface d'administration Thelia.
+
+#### Composer
+
+Ajoutez le module à votre fichier composer.json principal :
+
+```
+composer require thelia/local-pickup-module:~1.0
+```
+
+### Utilisation
+
+Pour utiliser le module de retrait sur place, allez dans le back-office, onglet Modules, et activez le,
+puis cliquez sur "Configurer" sur la ligne du module. Renseignez le prix que vous souhaitez donner au retrait sur place
+et enregistrez.
+
+### Boucles
+
+1. `address.local`
+ Même sorties que la boucle `address`, mais avec l'adresse du magasin au lieu de celle du client.
+ - Arguments:
+ 1. id | obligatoire | id de l'adresse du client
+ - Sorties:
+ Les mêmes variables que la boucle address, mais l'adresse donnée est celle du magasin.
+ - Utilisation:
+ ```
+ {loop type="address.local" name="yourloopname" id="1"}
+
+ {/loop}```
+
+### Intégration
+
+L'integration utilise les hooks et ne nécessite pas de travaux particuliers.
+
+en_US
+-----
+
+### Installation notes
+
+#### Manually
+
+* Copy the module into ```/local/modules/``` directory and be sure that the name of the module is LocalPickup.
+* Activate it in your thelia administration panel
+
+#### Composer
+
+Add it in your main thelia composer.json file:
+
+```
+composer require thelia/local-pickup-module:~1.0
+```
+
+### Usage
+
+To use the module, you first need to activate it in the back-office, tab Modules, and click on "Configure" on the line
+of the module. Enter the price you want for local pickup and save.
+
+### Loops
+1. `address.local`
+ Same output as the `address` loop, with the store adresse instead of the customer address.
+ - Arguments:
+ 1. id | mandatory | id of the customer's address
+ - Output:
+ The same variables as address loop, but the given address is the store's address.
+ - Usage:
+ ```
+ {loop type="address.local" name="yourloopname" id="1"}
+
+ {/loop}
+ ```
+
+### Integration
+
+The modules uses hooks, and does not require specific work.
diff --git a/domokits/local/modules/LocalPickup/composer.json b/domokits/local/modules/LocalPickup/composer.json
new file mode 100644
index 0000000..5527cbf
--- /dev/null
+++ b/domokits/local/modules/LocalPickup/composer.json
@@ -0,0 +1,11 @@
+{
+ "name": "thelia/local-pickup-module",
+ "license": "LGPL-3.0+",
+ "type": "thelia-module",
+ "require": {
+ "thelia/installer": "~1.1"
+ },
+ "extra": {
+ "installer-name": "LocalPickup"
+ }
+}
\ No newline at end of file
diff --git a/domokits/local/modules/LocalPickup/templates/backOffice/default/module_configuration.html b/domokits/local/modules/LocalPickup/templates/backOffice/default/module_configuration.html
new file mode 100644
index 0000000..d36e1f4
--- /dev/null
+++ b/domokits/local/modules/LocalPickup/templates/backOffice/default/module_configuration.html
@@ -0,0 +1,53 @@
+{if isset($smarty.get.errmes) and !empty($smarty.get.errmes)}
+
+ {$smarty.get.errmes}
+
+{/if}
+
+
+
+
+ {intl l='Configure local pickup' d='localpickup.bo.default'}
+
+
+
+
+
+
+
+
+
diff --git a/domokits/local/modules/LocalPickup/templates/email/default/order_shipping.html b/domokits/local/modules/LocalPickup/templates/email/default/order_shipping.html
new file mode 100644
index 0000000..ff49f1b
--- /dev/null
+++ b/domokits/local/modules/LocalPickup/templates/email/default/order_shipping.html
@@ -0,0 +1,52 @@
+{extends file="email-layout.tpl"}
+
+{* Do not provide a "Open in browser" link *}
+{block name="browser"}{/block}
+{* No pre-header *}
+{block name="pre-header"}{/block}
+
+{* Subject *}
+{block name="email-subject"}{intl l="Your order confirmation Nº %ref" ref={$order_ref}}{/block}
+
+{* Title *}
+{block name="email-title"}
+ {default_translation_domain domain='localpickup.email.default'}
+ {intl l="Your order is available in store"}
+{/block}
+
+{* Content *}
+{block name="email-content"}
+ {default_translation_domain domain='localpickup.email.default'}
+
+
\ No newline at end of file
diff --git a/domokits/local/modules/PayPal/templates/backOffice/default/paypal/includes/paypal-log-row-js.html b/domokits/local/modules/PayPal/templates/backOffice/default/paypal/includes/paypal-log-row-js.html
new file mode 100644
index 0000000..c4fef9f
--- /dev/null
+++ b/domokits/local/modules/PayPal/templates/backOffice/default/paypal/includes/paypal-log-row-js.html
@@ -0,0 +1,11 @@
+
\ No newline at end of file
diff --git a/domokits/local/modules/PayPal/templates/backOffice/default/paypal/includes/paypal-log-row.html b/domokits/local/modules/PayPal/templates/backOffice/default/paypal/includes/paypal-log-row.html
new file mode 100644
index 0000000..7d7acd7
--- /dev/null
+++ b/domokits/local/modules/PayPal/templates/backOffice/default/paypal/includes/paypal-log-row.html
@@ -0,0 +1,20 @@
+
\ No newline at end of file
diff --git a/domokits/local/modules/PayPal/templates/backOffice/default/paypal/menu/menu.html b/domokits/local/modules/PayPal/templates/backOffice/default/paypal/menu/menu.html
new file mode 100644
index 0000000..213691f
--- /dev/null
+++ b/domokits/local/modules/PayPal/templates/backOffice/default/paypal/menu/menu.html
@@ -0,0 +1,6 @@
+
+
\ No newline at end of file
diff --git a/domokits/local/modules/PayPal/templates/backOffice/default/paypal/module-configuration.html b/domokits/local/modules/PayPal/templates/backOffice/default/paypal/module-configuration.html
new file mode 100644
index 0000000..781815a
--- /dev/null
+++ b/domokits/local/modules/PayPal/templates/backOffice/default/paypal/module-configuration.html
@@ -0,0 +1,236 @@
+
\ No newline at end of file
diff --git a/domokits/local/modules/PayPal/templates/backOffice/default/paypal/order-edit-js.html b/domokits/local/modules/PayPal/templates/backOffice/default/paypal/order-edit-js.html
new file mode 100644
index 0000000..3a1e2f3
--- /dev/null
+++ b/domokits/local/modules/PayPal/templates/backOffice/default/paypal/order-edit-js.html
@@ -0,0 +1 @@
+{include file = "paypal/includes/paypal-log-row-js.html"}
\ No newline at end of file
diff --git a/domokits/local/modules/PayPal/templates/backOffice/default/paypal/payment-information.html b/domokits/local/modules/PayPal/templates/backOffice/default/paypal/payment-information.html
new file mode 100644
index 0000000..52fda46
--- /dev/null
+++ b/domokits/local/modules/PayPal/templates/backOffice/default/paypal/payment-information.html
@@ -0,0 +1,18 @@
+
+ {intl l="This is where we log all the transactions made with PayPal. PayPal webhooks also automatically feed these logs." d="paypal.bo.default"}
+ {intl l="This informations can be found directly in concerned order details." d="paypal.bo.default"}
+
+ {intl l="This feature uses PayPal's Billing Plan and Agreement. It allows debiting a client recursively directly from PayPal." d="paypal.bo.default"}
+ {intl l="These planned payments will appear in step 4 of the purchase tunnel when selecting the payment method." d="paypal.bo.default"}
+
+{/block}
diff --git a/domokits/local/modules/PayPal/templates/email/default/paypal-payment-confirmation.txt b/domokits/local/modules/PayPal/templates/email/default/paypal-payment-confirmation.txt
new file mode 100644
index 0000000..491fe8b
--- /dev/null
+++ b/domokits/local/modules/PayPal/templates/email/default/paypal-payment-confirmation.txt
@@ -0,0 +1,9 @@
+{intl d='paypal.email.default' l='Dear customer'},
+
+{intl d='paypal.email.default' l='This is a confirmation of the payment of your order %ref via Paypal on our shop.' ref=$order_ref}
+
+{intl d='paypal.email.default' l='Your invoice is now available in your customer account at %url.'} url={config key="url_site"}}
+
+{intl d='paypal.email.default' l='Thank you again for your purchase.'}
+
+{intl d='paypal.email.default' l='The %store_name team.' store_name={config key="store_name"}}
\ No newline at end of file
diff --git a/domokits/local/modules/PayPal/templates/email/default/paypal-recursive-payment-confirmation.html b/domokits/local/modules/PayPal/templates/email/default/paypal-recursive-payment-confirmation.html
new file mode 100644
index 0000000..43c199b
--- /dev/null
+++ b/domokits/local/modules/PayPal/templates/email/default/paypal-recursive-payment-confirmation.html
@@ -0,0 +1,23 @@
+{extends file="email-layout.tpl"}
+
+{* Do not provide a "Open in browser" link *}
+{block name="browser"}{/block}
+{* No pre-header *}
+{block name="pre-header"}{/block}
+
+{* Subject *}
+{block name="email-subject"}{intl d='paypal.mail.default' l="Payment of your order %ref" ref={$order_ref}}{/block}
+
+{* Title *}
+{block name="email-title"}{intl d='paypal.mail.default' l="The payment of your order %ref is confirmed" ref={$order_ref}}{/block}
+
+{* Content *}
+{block name="email-content"}
+
+{/block}
diff --git a/domokits/local/modules/PayPal/templates/email/default/paypal-recursive-payment-confirmation.txt b/domokits/local/modules/PayPal/templates/email/default/paypal-recursive-payment-confirmation.txt
new file mode 100644
index 0000000..491fe8b
--- /dev/null
+++ b/domokits/local/modules/PayPal/templates/email/default/paypal-recursive-payment-confirmation.txt
@@ -0,0 +1,9 @@
+{intl d='paypal.email.default' l='Dear customer'},
+
+{intl d='paypal.email.default' l='This is a confirmation of the payment of your order %ref via Paypal on our shop.' ref=$order_ref}
+
+{intl d='paypal.email.default' l='Your invoice is now available in your customer account at %url.'} url={config key="url_site"}}
+
+{intl d='paypal.email.default' l='Thank you again for your purchase.'}
+
+{intl d='paypal.email.default' l='The %store_name team.' store_name={config key="store_name"}}
\ No newline at end of file
diff --git a/domokits/local/modules/PayPal/templates/frontOffice/default/assets/cards-logo.jpg b/domokits/local/modules/PayPal/templates/frontOffice/default/assets/cards-logo.jpg
new file mode 100644
index 0000000..962e7d3
Binary files /dev/null and b/domokits/local/modules/PayPal/templates/frontOffice/default/assets/cards-logo.jpg differ
diff --git a/domokits/local/modules/PayPal/templates/frontOffice/default/assets/ntimes-cards-logo.png b/domokits/local/modules/PayPal/templates/frontOffice/default/assets/ntimes-cards-logo.png
new file mode 100644
index 0000000..efef888
Binary files /dev/null and b/domokits/local/modules/PayPal/templates/frontOffice/default/assets/ntimes-cards-logo.png differ
diff --git a/domokits/local/modules/PayPal/templates/frontOffice/default/assets/paypal-logo.png b/domokits/local/modules/PayPal/templates/frontOffice/default/assets/paypal-logo.png
new file mode 100644
index 0000000..aab877a
Binary files /dev/null and b/domokits/local/modules/PayPal/templates/frontOffice/default/assets/paypal-logo.png differ
diff --git a/domokits/local/modules/PayPal/templates/frontOffice/default/paypal/cart-bottom.html b/domokits/local/modules/PayPal/templates/frontOffice/default/paypal/cart-bottom.html
new file mode 100644
index 0000000..7c8ef99
--- /dev/null
+++ b/domokits/local/modules/PayPal/templates/frontOffice/default/paypal/cart-bottom.html
@@ -0,0 +1,11 @@
+
+
+
diff --git a/domokits/local/modules/PayPal/templates/frontOffice/default/paypal/form/extra-credit-card.html b/domokits/local/modules/PayPal/templates/frontOffice/default/paypal/form/extra-credit-card.html
new file mode 100644
index 0000000..edfd5bb
--- /dev/null
+++ b/domokits/local/modules/PayPal/templates/frontOffice/default/paypal/form/extra-credit-card.html
@@ -0,0 +1,85 @@
+
\ No newline at end of file
diff --git a/domokits/local/modules/PayPal/templates/frontOffice/default/paypal/form/extra-paypal.html b/domokits/local/modules/PayPal/templates/frontOffice/default/paypal/form/extra-paypal.html
new file mode 100644
index 0000000..9ef809a
--- /dev/null
+++ b/domokits/local/modules/PayPal/templates/frontOffice/default/paypal/form/extra-paypal.html
@@ -0,0 +1,17 @@
+
\ No newline at end of file
diff --git a/domokits/local/modules/PayPal/templates/frontOffice/default/paypal/form/extra-planified-payment.html b/domokits/local/modules/PayPal/templates/frontOffice/default/paypal/form/extra-planified-payment.html
new file mode 100644
index 0000000..dccbed5
--- /dev/null
+++ b/domokits/local/modules/PayPal/templates/frontOffice/default/paypal/form/extra-planified-payment.html
@@ -0,0 +1,26 @@
+{assign var="methodName" value=$name}
+{form_field field='paypal_planified_payment'}
+ {if count($choices) > 0}
+
+ {/if}
+{/form_field}
+
diff --git a/domokits/local/modules/PayPal/templates/frontOffice/default/paypal/login-bottom.html b/domokits/local/modules/PayPal/templates/frontOffice/default/paypal/login-bottom.html
new file mode 100644
index 0000000..5710a61
--- /dev/null
+++ b/domokits/local/modules/PayPal/templates/frontOffice/default/paypal/login-bottom.html
@@ -0,0 +1,16 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/domokits/local/modules/PayPal/templates/frontOffice/default/paypal/order-delivery-bottom-js.html b/domokits/local/modules/PayPal/templates/frontOffice/default/paypal/order-delivery-bottom-js.html
new file mode 100644
index 0000000..cc14715
--- /dev/null
+++ b/domokits/local/modules/PayPal/templates/frontOffice/default/paypal/order-delivery-bottom-js.html
@@ -0,0 +1,7 @@
+
\ No newline at end of file
diff --git a/domokits/local/modules/PayPal/templates/frontOffice/default/paypal/order-delivery-bottom.html b/domokits/local/modules/PayPal/templates/frontOffice/default/paypal/order-delivery-bottom.html
new file mode 100644
index 0000000..00d5b4c
--- /dev/null
+++ b/domokits/local/modules/PayPal/templates/frontOffice/default/paypal/order-delivery-bottom.html
@@ -0,0 +1,4 @@
+
\ No newline at end of file
diff --git a/domokits/local/modules/PayPal/templates/frontOffice/default/paypal/order-invoice-bottom.html b/domokits/local/modules/PayPal/templates/frontOffice/default/paypal/order-invoice-bottom.html
new file mode 100644
index 0000000..e6b444a
--- /dev/null
+++ b/domokits/local/modules/PayPal/templates/frontOffice/default/paypal/order-invoice-bottom.html
@@ -0,0 +1,11 @@
+
+
+
diff --git a/domokits/local/modules/PayPal/templates/frontOffice/default/paypal/order-invoice-js.html b/domokits/local/modules/PayPal/templates/frontOffice/default/paypal/order-invoice-js.html
new file mode 100644
index 0000000..98a4a49
--- /dev/null
+++ b/domokits/local/modules/PayPal/templates/frontOffice/default/paypal/order-invoice-js.html
@@ -0,0 +1,58 @@
+
\ No newline at end of file
diff --git a/domokits/local/modules/PayPal/templates/frontOffice/default/paypal/order-invoice-payment-extra.html b/domokits/local/modules/PayPal/templates/frontOffice/default/paypal/order-invoice-payment-extra.html
new file mode 100644
index 0000000..3e394be
--- /dev/null
+++ b/domokits/local/modules/PayPal/templates/frontOffice/default/paypal/order-invoice-payment-extra.html
@@ -0,0 +1,21 @@
+{form name="thelia.order.payment"}
+
+ {intl l='Thank you and have a nice day.'}
+{/block}
diff --git a/domokits/local/modules/ResetPassword/templates/email/default/reset_password_message.html b/domokits/local/modules/ResetPassword/templates/email/default/reset_password_message.html
new file mode 100755
index 0000000..493d692
--- /dev/null
+++ b/domokits/local/modules/ResetPassword/templates/email/default/reset_password_message.html
@@ -0,0 +1,30 @@
+{default_translation_domain domain='resetpassword.email.default'}
+{extends file="email-layout.tpl"}
+
+{* Open in browser *}
+{block name="browser"}{/block}
+
+{* No big image header *}
+{block name="image-header"}{/block}
+
+{* No pre-header *}
+{block name="pre-header"}{/block}
+
+{* Subject *}
+{block name="email-subject"}{intl l="Your password reset link for %store" store={config key="store_name"}}{/block}
+
+{* Title *}
+{block name="email-title"}{/block}
+
+{* Content *}
+{block name="email-content"}
+ {intl l="Hello,"}
+ {intl l="You have requested a new password for your account at %store_name" store_name={config key="store_name"}}.
+ {intl l='Please click here to create a new password.' url={$tokenLink}}
+ {intl l="You can also paste the URL below in you browser's address bar : "}
+ {$tokenLink}
+
+
+ {intl l='If you don\'t requested a new password, please ignore this message.'}.
+ {intl l='Have a nice day'}
+{/block}
diff --git a/domokits/local/modules/ResetPassword/templates/email/default/reset_password_message.txt b/domokits/local/modules/ResetPassword/templates/email/default/reset_password_message.txt
new file mode 100755
index 0000000..28cd534
--- /dev/null
+++ b/domokits/local/modules/ResetPassword/templates/email/default/reset_password_message.txt
@@ -0,0 +1,10 @@
+{default_translation_domain domain='resetpassword.email.default'}
+{intl l="Hello,"}
+
+{intl l="You have requested a new password for your account at %store_name" store_name={config key="store_name"}}.
+
+{intl l="Please click here to define a new password: %url . You will be prompted to enter a new password." url={$tokenLink}}
+
+{intl l='If you don\'t requested a new password, please ignore this message.'}.
+
+{intl l='Have a nice day'}
diff --git a/domokits/local/modules/ResetPassword/templates/frontOffice/default/resetPassword/reset_password.html b/domokits/local/modules/ResetPassword/templates/frontOffice/default/resetPassword/reset_password.html
new file mode 100755
index 0000000..f5f1872
--- /dev/null
+++ b/domokits/local/modules/ResetPassword/templates/frontOffice/default/resetPassword/reset_password.html
@@ -0,0 +1,87 @@
+{extends file="layout.tpl"}
+
+{* Body Class *}
+{block name="body-class"}page-login{/block}
+
+{* Breadcrumb *}
+{block name='no-return-functions' append}
+ {$breadcrumbs = [
+ ['title' => {intl l="Reset password" d="resetpassword.fo.default"}, 'url'=>{url path="/reset_password"}]
+ ]}
+{/block}
+
+
+{block name="main-content"}
+
+ {* This page should not replace the current previous URL *}
+ {set_previous_url ignore_current="1"}
+
+
+{/block}
diff --git a/domokits/local/modules/RewriteUrl/.github/workflows/release.yml b/domokits/local/modules/RewriteUrl/.github/workflows/release.yml
new file mode 100644
index 0000000..e880140
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/.github/workflows/release.yml
@@ -0,0 +1,7 @@
+name: "Auto Release"
+on:
+ push:
+ branches: [ master, main ]
+jobs:
+ release:
+ uses: thelia-modules/ReusableWorkflow/.github/workflows/auto_release.yml@main
diff --git a/domokits/local/modules/RewriteUrl/AdminIncludes/brand-edit-js.html b/domokits/local/modules/RewriteUrl/AdminIncludes/brand-edit-js.html
new file mode 100755
index 0000000..9469412
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/AdminIncludes/brand-edit-js.html
@@ -0,0 +1 @@
+{include file="RewriteUrl/tab-module-js.html" viewName='brand' altViewName='brand'}
\ No newline at end of file
diff --git a/domokits/local/modules/RewriteUrl/AdminIncludes/brand-edit.html b/domokits/local/modules/RewriteUrl/AdminIncludes/brand-edit.html
new file mode 100755
index 0000000..6bdb055
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/AdminIncludes/brand-edit.html
@@ -0,0 +1 @@
+{include file="RewriteUrl/tab-module.html" viewName='brand' altViewName='brand'}
\ No newline at end of file
diff --git a/domokits/local/modules/RewriteUrl/AdminIncludes/category-edit-js.html b/domokits/local/modules/RewriteUrl/AdminIncludes/category-edit-js.html
new file mode 100755
index 0000000..c33264b
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/AdminIncludes/category-edit-js.html
@@ -0,0 +1 @@
+{include file="RewriteUrl/tab-module-js.html" viewName='category' altViewName='categories'}
\ No newline at end of file
diff --git a/domokits/local/modules/RewriteUrl/AdminIncludes/category-edit.html b/domokits/local/modules/RewriteUrl/AdminIncludes/category-edit.html
new file mode 100755
index 0000000..7d74e12
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/AdminIncludes/category-edit.html
@@ -0,0 +1 @@
+{include file="RewriteUrl/tab-module.html" viewName='category' altViewName='categories'}
\ No newline at end of file
diff --git a/domokits/local/modules/RewriteUrl/AdminIncludes/content-edit-js.html b/domokits/local/modules/RewriteUrl/AdminIncludes/content-edit-js.html
new file mode 100755
index 0000000..a07f810
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/AdminIncludes/content-edit-js.html
@@ -0,0 +1 @@
+{include file="RewriteUrl/tab-module-js.html" viewName='content' altViewName='content'}
\ No newline at end of file
diff --git a/domokits/local/modules/RewriteUrl/AdminIncludes/content-edit.html b/domokits/local/modules/RewriteUrl/AdminIncludes/content-edit.html
new file mode 100755
index 0000000..818780e
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/AdminIncludes/content-edit.html
@@ -0,0 +1 @@
+{include file="RewriteUrl/tab-module.html" viewName='content' altViewName='content'}
\ No newline at end of file
diff --git a/domokits/local/modules/RewriteUrl/AdminIncludes/folder-edit-js.html b/domokits/local/modules/RewriteUrl/AdminIncludes/folder-edit-js.html
new file mode 100755
index 0000000..ca64507
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/AdminIncludes/folder-edit-js.html
@@ -0,0 +1 @@
+{include file="RewriteUrl/tab-module-js.html" viewName='folder' altViewName='folders'}
\ No newline at end of file
diff --git a/domokits/local/modules/RewriteUrl/AdminIncludes/folder-edit.html b/domokits/local/modules/RewriteUrl/AdminIncludes/folder-edit.html
new file mode 100755
index 0000000..4eb674a
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/AdminIncludes/folder-edit.html
@@ -0,0 +1 @@
+{include file="RewriteUrl/tab-module.html" viewName='folder' altViewName='folders'}
\ No newline at end of file
diff --git a/domokits/local/modules/RewriteUrl/AdminIncludes/product-edit-js.html b/domokits/local/modules/RewriteUrl/AdminIncludes/product-edit-js.html
new file mode 100755
index 0000000..241a6a7
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/AdminIncludes/product-edit-js.html
@@ -0,0 +1 @@
+{include file="RewriteUrl/tab-module-js.html" viewName='product' altViewName='products'}
\ No newline at end of file
diff --git a/domokits/local/modules/RewriteUrl/AdminIncludes/product-edit.html b/domokits/local/modules/RewriteUrl/AdminIncludes/product-edit.html
new file mode 100755
index 0000000..e91997b
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/AdminIncludes/product-edit.html
@@ -0,0 +1 @@
+{include file="RewriteUrl/tab-module.html" viewName='product' altViewName='products'}
\ No newline at end of file
diff --git a/domokits/local/modules/RewriteUrl/Config/config.xml b/domokits/local/modules/RewriteUrl/Config/config.xml
new file mode 100755
index 0000000..8f495b2
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/Config/config.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/domokits/local/modules/RewriteUrl/Config/module.xml b/domokits/local/modules/RewriteUrl/Config/module.xml
new file mode 100755
index 0000000..be32ed4
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/Config/module.xml
@@ -0,0 +1,18 @@
+
+
+ RewriteUrl\RewriteUrl
+
+ Manage rewrite url
+
+
+ Gérer la réécriture d'url
+
+ 2.1.8
+
+ Vincent Lopes, Gilles Bourgeat, Tom Pradat
+ vlopes@openstudio.fr, gbourgeat@openstudio.fr, tpradat@openstudio.fr
+
+ classic
+ 2.5.0
+ prod
+
diff --git a/domokits/local/modules/RewriteUrl/Config/routing.xml b/domokits/local/modules/RewriteUrl/Config/routing.xml
new file mode 100755
index 0000000..e7ad916
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/Config/routing.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+ RewriteUrl\Controller\Admin\ModuleConfigController::getDatatableRules
+
+
+ RewriteUrl\Controller\Admin\ModuleConfigController::setRewritingEnableAction
+
+
+ RewriteUrl\Controller\Admin\ModuleConfigController::addRuleAction
+
+
+ RewriteUrl\Controller\Admin\ModuleConfigController::updateRuleAction
+
+
+ RewriteUrl\Controller\Admin\ModuleConfigController::removeRuleAction
+
+
+ RewriteUrl\Controller\Admin\ModuleConfigController::moveRulePositionAction
+
+
+
+ RewriteUrl\Controller\Admin\RewriteUrlAdminController::deleteAction
+
+
+ RewriteUrl\Controller\Admin\RewriteUrlAdminController::searchAction
+
+
+ RewriteUrl\Controller\Admin\RewriteUrlAdminController::existAction
+
+
+ RewriteUrl\Controller\Admin\RewriteUrlAdminController::addAction
+
+
+ RewriteUrl\Controller\Admin\RewriteUrlAdminController::setDefaultAction
+
+
+ RewriteUrl\Controller\Admin\RewriteUrlAdminController::reassignAction
+
+
+ RewriteUrl\Controller\Admin\RewriteUrlAdminController::changeRedirectTypeAction
+
+
+ RewriteUrl\Controller\Admin\NotRewritenUrlsAdminController::defaultAction
+
+
+
diff --git a/domokits/local/modules/RewriteUrl/Config/schema.xml b/domokits/local/modules/RewriteUrl/Config/schema.xml
new file mode 100644
index 0000000..83f3a36
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/Config/schema.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/domokits/local/modules/RewriteUrl/Config/thelia.sql b/domokits/local/modules/RewriteUrl/Config/thelia.sql
new file mode 100644
index 0000000..5dcfd32
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/Config/thelia.sql
@@ -0,0 +1,62 @@
+
+# This is a fix for InnoDB in MySQL >= 4.1.x
+# It "suspends judgement" for fkey relationships until are tables are set.
+SET FOREIGN_KEY_CHECKS = 0;
+
+-- ---------------------------------------------------------------------
+-- rewriting_redirect_type
+-- ---------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `rewriting_redirect_type`;
+
+CREATE TABLE `rewriting_redirect_type`
+(
+ `id` INTEGER NOT NULL,
+ `httpcode` INTEGER,
+ PRIMARY KEY (`id`),
+ CONSTRAINT `rewriting_redirect_type_FK_1`
+ FOREIGN KEY (`id`)
+ REFERENCES `rewriting_url` (`id`)
+ ON DELETE CASCADE
+) ENGINE=InnoDB;
+
+-- ---------------------------------------------------------------------
+-- rewriteurl_rule
+-- ---------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `rewriteurl_rule`;
+
+CREATE TABLE `rewriteurl_rule`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `rule_type` VARCHAR(64) NOT NULL,
+ `value` VARCHAR(255),
+ `only404` TINYINT(1) NOT NULL,
+ `redirect_url` VARCHAR(255) NOT NULL,
+ `position` INTEGER(255) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB;
+
+-- ---------------------------------------------------------------------
+-- rewriteurl_rule_param
+-- ---------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `rewriteurl_rule_param`;
+
+CREATE TABLE `rewriteurl_rule_param`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `id_rule` INTEGER NOT NULL,
+ `param_name` VARCHAR(255) NOT NULL,
+ `param_condition` VARCHAR(64) NOT NULL,
+ `param_value` VARCHAR(255),
+ PRIMARY KEY (`id`),
+ INDEX `rewriteurl_rule_rule_param_FI_id` (`id_rule`),
+ CONSTRAINT `rewriteurl_rule_rule_param_FK_id`
+ FOREIGN KEY (`id_rule`)
+ REFERENCES `rewriteurl_rule` (`id`)
+ ON DELETE CASCADE
+) ENGINE=InnoDB;
+
+# This restores the fkey checks, after having unset them earlier
+SET FOREIGN_KEY_CHECKS = 1;
diff --git a/domokits/local/modules/RewriteUrl/Config/update/1.4.8.sql b/domokits/local/modules/RewriteUrl/Config/update/1.4.8.sql
new file mode 100644
index 0000000..f5cf4ec
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/Config/update/1.4.8.sql
@@ -0,0 +1,22 @@
+
+# This is a fix for InnoDB in MySQL >= 4.1.x
+# It "suspends judgement" for fkey relationships until are tables are set.
+SET FOREIGN_KEY_CHECKS = 0;
+
+-- ---------------------------------------------------------------------
+-- rewriting_redirect_type
+-- ---------------------------------------------------------------------
+
+CREATE TABLE IF NOT EXISTS `rewriting_redirect_type`
+(
+ `id` INTEGER NOT NULL,
+ `httpcode` INTEGER,
+ PRIMARY KEY (`id`),
+ CONSTRAINT `rewriting_redirect_type_FK_1`
+ FOREIGN KEY (`id`)
+ REFERENCES `rewriting_url` (`id`)
+ ON DELETE CASCADE
+) ENGINE=InnoDB;
+
+# This restores the fkey checks, after having unset them earlier
+SET FOREIGN_KEY_CHECKS = 1;
\ No newline at end of file
diff --git a/domokits/local/modules/RewriteUrl/Config/update/1.5.0.sql b/domokits/local/modules/RewriteUrl/Config/update/1.5.0.sql
new file mode 100644
index 0000000..00778a8
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/Config/update/1.5.0.sql
@@ -0,0 +1,45 @@
+
+# This is a fix for InnoDB in MySQL >= 4.1.x
+# It "suspends judgement" for fkey relationships until are tables are set.
+SET FOREIGN_KEY_CHECKS = 0;
+
+-- ---------------------------------------------------------------------
+-- rewriteurl_rule
+-- ---------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `rewriteurl_rule`;
+
+CREATE TABLE `rewriteurl_rule`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `rule_type` VARCHAR(64) NOT NULL,
+ `value` VARCHAR(255),
+ `only404` TINYINT(1) NOT NULL,
+ `redirect_url` VARCHAR(255) NOT NULL,
+ `position` INTEGER(255) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB;
+
+-- ---------------------------------------------------------------------
+-- rewriteurl_rule_param
+-- ---------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `rewriteurl_rule_param`;
+
+CREATE TABLE `rewriteurl_rule_param`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `id_rule` INTEGER NOT NULL,
+ `param_name` VARCHAR(255) NOT NULL,
+ `param_condition` VARCHAR(64) NOT NULL,
+ `param_value` VARCHAR(255),
+ PRIMARY KEY (`id`),
+ INDEX `rewriteurl_rule_rule_param_FI_id` (`id_rule`),
+ CONSTRAINT `rewriteurl_rule_rule_param_FK_id`
+ FOREIGN KEY (`id_rule`)
+ REFERENCES `rewriteurl_rule` (`id`)
+ ON DELETE CASCADE
+) ENGINE=InnoDB;
+
+# This restores the fkey checks, after having unset them earlier
+SET FOREIGN_KEY_CHECKS = 1;
\ No newline at end of file
diff --git a/domokits/local/modules/RewriteUrl/Controller/Admin/ModuleConfigController.php b/domokits/local/modules/RewriteUrl/Controller/Admin/ModuleConfigController.php
new file mode 100644
index 0000000..9f25b7d
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/Controller/Admin/ModuleConfigController.php
@@ -0,0 +1,321 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace RewriteUrl\Controller\Admin;
+
+use Propel\Runtime\ActiveQuery\Criteria;
+use RewriteUrl\Model\RewriteurlRule;
+use RewriteUrl\Model\RewriteurlRuleParam;
+use RewriteUrl\Model\RewriteurlRuleQuery;
+use RewriteUrl\RewriteUrl;
+use Thelia\Controller\Admin\BaseAdminController;
+use Thelia\Core\HttpFoundation\JsonResponse;
+use Thelia\Core\HttpFoundation\Request;
+use Thelia\Core\HttpFoundation\Response;
+use Thelia\Core\Security\AccessManager;
+use Thelia\Core\Security\Resource\AdminResources;
+use Thelia\Core\Translation\Translator;
+use Thelia\Exception\TheliaProcessException;
+use Thelia\Model\ConfigQuery;
+
+class ModuleConfigController extends BaseAdminController
+{
+ public function viewConfigAction()
+ {
+ if (null !== $response = $this->checkAuth([AdminResources::MODULE], 'RewriteUrl', AccessManager::VIEW)) {
+ return $response;
+ }
+
+ $isRewritingEnabled = ConfigQuery::isRewritingEnable();
+
+ return $this->render(
+ 'RewriteUrl/module-configuration',
+ [
+ 'isRewritingEnabled' => $isRewritingEnabled,
+ ]
+ );
+ }
+
+ public function getDatatableRules(Request $request)
+ {
+ $requestSearchValue = $request->get('search') ? '%' . $request->get('search')['value'] . '%' : '';
+ $recordsTotal = RewriteurlRuleQuery::create()->count();
+ $search = RewriteurlRuleQuery::create();
+ if ('' !== $requestSearchValue) {
+ $search
+ ->filterByValue($requestSearchValue, Criteria::LIKE)
+ ->_or()
+ ->filterByRedirectUrl($requestSearchValue);
+ }
+
+ $recordsFiltered = $search->count();
+
+ $orderColumn = $request->get('order')[0]['column'];
+ $orderDirection = $request->get('order')[0]['dir'];
+ switch ($orderColumn) {
+ case '0':
+ $search->orderByRuleType($orderDirection);
+ break;
+ case '1':
+ $search->orderByValue($orderDirection);
+ break;
+ case '2':
+ $search->orderByOnly404($orderDirection);
+ break;
+ case '3':
+ $search->orderByRedirectUrl($orderDirection);
+ break;
+ case '4':
+ $search->orderByPosition($orderDirection);
+ break;
+ default:
+ $search->orderByPosition();
+ break;
+ }
+
+ $search
+ ->offset($request->get('start'))
+ ->limit($request->get('length'));
+ $searchArray = $search->find()->toArray();
+
+ $resultsArray = [];
+ foreach ($searchArray as $row) {
+ $id = $row['Id'];
+ $isRegexSelected = $row['RuleType'] === RewriteurlRule::TYPE_REGEX ? 'selected' : '';
+ $isParamsSelected = $row['RuleType'] === RewriteurlRule::TYPE_GET_PARAMS ? 'selected' : '';
+ $isRegexParamsSelected = $row['RuleType'] === RewriteurlRule::TYPE_REGEX_GET_PARAMS ? 'selected' : '';
+ $isTextParamsSelected = $row['RuleType'] === RewriteurlRule::TYPE_TEXT ? 'selected' : '';
+ $isOnly404Checked = $row['Only404'] ? 'checked' : '';
+ $rewriteUrlRuleParams = RewriteurlRuleQuery::create()->findPk($row['Id'])->getRewriteUrlParamCollection();
+ $resultsArray[] = [
+ 'Id' => $row['Id'],
+ 'RuleType' => '',
+ 'Value' => $this->renderRaw(
+ 'RewriteUrl/tab-value-render',
+ [
+ 'ID' => $row['Id'],
+ 'REWRITE_URL_PARAMS' => $rewriteUrlRuleParams,
+ 'VALUE' => $row['Value'],
+ ]
+ ),
+ 'Only404' => '',
+ 'RedirectUrl' => '
+
+
',
+ 'Position' => '
+ ' . $row['Position'] . '
+ ',
+ 'Actions' => '
+
+',
+ ];
+ }
+
+ return new JsonResponse([
+ 'draw' => $request->get('draw'),
+ 'recordsTotal' => $recordsTotal,
+ 'recordsFiltered' => $recordsFiltered,
+ 'data' => $resultsArray,
+ ]);
+ }
+
+ public function setRewritingEnableAction(Request $request): Response
+ {
+ $isRewritingEnable = $request->get('rewriting_enable', null);
+
+ if ($isRewritingEnable !== null) {
+ ConfigQuery::write('rewriting_enable', $isRewritingEnable ? 1 : 0);
+
+ return $this->jsonResponse(json_encode(['state' => 'Success']), 200);
+ }
+
+ return $this->jsonResponse(Translator::getInstance()->trans(
+ 'Unable to change the configuration variable.',
+ [],
+ RewriteUrl::MODULE_DOMAIN
+ ), 500);
+ }
+
+ public function addRuleAction(Request $request)
+ {
+ try {
+ $rule = new RewriteurlRule();
+
+ $this->fillRuleObjectFields($rule, $request);
+ } catch (\Exception $ex) {
+ return $this->jsonResponse($ex->getMessage(), 500);
+ }
+
+ return $this->jsonResponse(json_encode(['state' => 'Success']), 200);
+ }
+
+ public function updateRuleAction(Request $request)
+ {
+ try {
+ $rule = RewriteurlRuleQuery::create()->findOneById($request->get('id'));
+
+ if ($rule === null) {
+ throw new \Exception(Translator::getInstance()->trans(
+ 'Unable to find rule to update.',
+ [],
+ RewriteUrl::MODULE_DOMAIN
+ ));
+ }
+
+ $this->fillRuleObjectFields($rule, $request);
+ } catch (\Exception $ex) {
+ return $this->jsonResponse($ex->getMessage(), 500);
+ }
+
+ return $this->jsonResponse(json_encode(['state' => 'Success']), 200);
+ }
+
+ public function removeRuleAction(Request $request)
+ {
+ try {
+ $rule = RewriteurlRuleQuery::create()->findOneById($request->get('id'));
+
+ if ($rule === null) {
+ throw new \Exception(Translator::getInstance()->trans(
+ 'Unable to find rule to remove.',
+ [],
+ RewriteUrl::MODULE_DOMAIN
+ ));
+ }
+
+ $rule->delete();
+ } catch (\Exception $ex) {
+ return $this->jsonResponse($ex->getMessage(), 500);
+ }
+
+ return $this->jsonResponse(json_encode(['state' => 'Success']), 200);
+ }
+
+ public function moveRulePositionAction(Request $request)
+ {
+ try {
+ $rule = RewriteurlRuleQuery::create()->findOneById($request->get('id'));
+
+ if ($rule === null) {
+ throw new \Exception(Translator::getInstance()->trans(
+ 'Unable to find rule to change position.',
+ [],
+ RewriteUrl::MODULE_DOMAIN
+ ));
+ }
+
+ $type = $request->get('type', null);
+
+ if ($type === 'up') {
+ $rule->movePositionUp();
+ } elseif ($type === 'down') {
+ $rule->movePositionDown();
+ } elseif ($type === 'absolute') {
+ $position = $request->get('position', null);
+ if (!empty($position)) {
+ $rule->changeAbsolutePosition($position);
+ }
+ }
+ } catch (\Exception $ex) {
+ return $this->jsonResponse($ex->getMessage(), 500);
+ }
+
+ return $this->jsonResponse(json_encode(['state' => 'Success']), 200);
+ }
+
+ /**
+ * @throws \Propel\Runtime\Exception\PropelException
+ */
+ protected function fillRuleObjectFields(RewriteurlRule $rule, Request $request): void
+ {
+ $ruleType = $request->get('ruleType', null);
+
+ $isParamRule = $ruleType === RewriteurlRule::TYPE_GET_PARAMS || $ruleType === RewriteurlRule::TYPE_REGEX_GET_PARAMS;
+ $isRegexRule = $ruleType === RewriteurlRule::TYPE_REGEX || $ruleType === RewriteurlRule::TYPE_REGEX_GET_PARAMS;
+ $isTextRule = $ruleType === RewriteurlRule::TYPE_TEXT;
+
+ if (!($isParamRule || $isRegexRule || $isTextRule)) {
+ throw new TheliaProcessException(Translator::getInstance()->trans('Unknown rule type.', [], RewriteUrl::MODULE_DOMAIN));
+ }
+
+ if ($isTextRule && !$textValue = $request->get('textValue', null)) {
+ throw new TheliaProcessException(Translator::getInstance()->trans('Text value cannot be empty.', [], RewriteUrl::MODULE_DOMAIN));
+ }
+
+ $regexValue = $request->get('value', null);
+
+ if ($isRegexRule && empty($regexValue)) {
+ throw new TheliaProcessException(Translator::getInstance()->trans('Regex value cannot be empty.', [], RewriteUrl::MODULE_DOMAIN));
+ }
+
+ $redirectUrl = $request->get('redirectUrl', null);
+
+ if (empty($redirectUrl)) {
+ throw new TheliaProcessException(Translator::getInstance()->trans('Redirect url cannot be empty.', [], RewriteUrl::MODULE_DOMAIN));
+ }
+
+ $value = $isTextRule ? $textValue : $regexValue;
+
+ $paramRuleArray = [];
+
+ if ($isParamRule) {
+ $paramRuleArray = $request->get('paramRules', null);
+ if (empty($paramRuleArray)) {
+ throw new TheliaProcessException(Translator::getInstance()->trans('At least one GET parameter is required.', [], RewriteUrl::MODULE_DOMAIN));
+ }
+ }
+
+ $rule->setRuleType($ruleType)
+ ->setValue($value)
+ ->setOnly404($request->get('only404', 1))
+ ->setRedirectUrl($redirectUrl);
+
+ if (empty($rule->getPosition())) {
+ $rule->setPosition($rule->getNextPosition());
+ }
+
+ $rule->deleteAllRelatedParam();
+
+ $rule->save();
+
+ if ($isParamRule) {
+ foreach ($paramRuleArray as $paramRule) {
+ if (!\array_key_exists('paramName', $paramRule) || empty($paramRule['paramName'])) {
+ throw new TheliaProcessException(Translator::getInstance()->trans(
+ 'Param name is empty.',
+ [],
+ RewriteUrl::MODULE_DOMAIN
+ ));
+ }
+ if (!\array_key_exists('condition', $paramRule) || empty($paramRule['condition'])) {
+ throw new TheliaProcessException(Translator::getInstance()->trans(
+ 'Param condition is empty.',
+ [],
+ RewriteUrl::MODULE_DOMAIN
+ ));
+ }
+
+ (new RewriteurlRuleParam())
+ ->setParamName($paramRule['paramName'])
+ ->setParamCondition($paramRule['condition'])
+ ->setParamValue($paramRule['paramValue'])
+ ->setIdRule($rule->getId())
+ ->save();
+ }
+ }
+ }
+}
diff --git a/domokits/local/modules/RewriteUrl/Controller/Admin/NotRewritenUrlsAdminController.php b/domokits/local/modules/RewriteUrl/Controller/Admin/NotRewritenUrlsAdminController.php
new file mode 100644
index 0000000..4b6a80a
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/Controller/Admin/NotRewritenUrlsAdminController.php
@@ -0,0 +1,39 @@
+
+ */
+class NotRewritenUrlsAdminController extends AdminController
+{
+ public function defaultAction(Request $request)
+ {
+ return $this->render(
+ 'list-notrewritenurls',
+ array(
+ 'current_tab' => $request->get('current_tab', 'categories'),
+ 'page_category' => $request->get('page_category', 1),
+ 'page_product' => $request->get('page_product', 1),
+ 'page_brand' => $request->get('page_brand', 1),
+ 'page_folder' => $request->get('page_folder', 1),
+ 'page_content' => $request->get('page_content', 1),
+ )
+ );
+ }
+}
diff --git a/domokits/local/modules/RewriteUrl/Controller/Admin/RewriteUrlAdminController.php b/domokits/local/modules/RewriteUrl/Controller/Admin/RewriteUrlAdminController.php
new file mode 100755
index 0000000..15c65b5
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/Controller/Admin/RewriteUrlAdminController.php
@@ -0,0 +1,480 @@
+
+ * @author Gilles Bourgeat
+ */
+class RewriteUrlAdminController extends BaseAdminController
+{
+ /** @var array */
+ private $correspondence = array(
+ 'brand' => 'brand',
+ 'category' => 'categories',
+ 'content' => 'content',
+ 'folder' => 'folders',
+ 'product' => 'products'
+ );
+
+ /**
+ * @return mixed
+ */
+ public function deleteAction(
+ Request $request,
+ EventDispatcherInterface $dispatcher
+ ) {
+ if (null !== $response = $this->checkAuth(array(AdminResources::MODULE), 'RewriteUrl', AccessManager::DELETE)) {
+ return $response;
+ }
+
+ $urlId = $request->request->get('id_url');
+ $rewritingUrl = RewritingUrlQuery::create()->findOneById($urlId);
+
+ if ($rewritingUrl !== null) {
+ $event = new RewriteUrlEvent($rewritingUrl);
+ $dispatcher->dispatch($event,RewriteUrlEvents::REWRITEURL_DELETE);
+ }
+
+ return $this->generateRedirectFromRoute(
+ 'admin.'.$this->correspondence[$rewritingUrl->getView()].'.update',
+ [
+ $rewritingUrl->getView().'_id'=>$rewritingUrl->getViewId(),
+ 'current_tab' => 'modules'
+ ],
+ [
+ $rewritingUrl->getView().'_id'=>$rewritingUrl->getViewId()
+ ]
+ );
+ }
+
+ /**
+ * @return mixed
+ */
+ public function addAction(EventDispatcherInterface $dispatcher, ParserContext $parserContext)
+ {
+ $message = null;
+ $exception = null;
+
+ if (null !== $response = $this->checkAuth(array(AdminResources::MODULE), 'RewriteUrl', AccessManager::CREATE)) {
+ return $response;
+ }
+
+ $addForm = $this->createForm(AddUrlForm::getName());
+
+ try {
+ $form = $this->validateForm($addForm);
+ $data = $form->getData();
+
+ $findExist = RewritingUrlQuery::create()->findOneByUrl(($data['url']));
+
+ if ($findExist !== null && !in_array($findExist->getView(), RewriteUrl::getUnknownSources()) && $findExist->getView() !== '') {
+ $url = $this->generateUrlByRewritingUrl($findExist);
+
+ throw new \Exception(
+ Translator::getInstance()->trans(
+ "This url is already used here %url.",
+ ['%url' => '' . $url . ''],
+ RewriteUrl::MODULE_DOMAIN
+ )
+ );
+ }
+
+ $rewriting = $findExist !== null ? $findExist : new RewritingUrlOverride();
+ $rewriting->setUrl($data['url'])
+ ->setView($data['view'])
+ ->setViewId($data['view-id'])
+ ->setViewLocale($data['locale']);
+
+ $rewriteDefault = RewritingUrlQuery::create()
+ ->filterByView($rewriting->getView())
+ ->filterByViewId($rewriting->getViewId())
+ ->filterByViewLocale($rewriting->getViewLocale())
+ ->findOneByRedirected(null);
+
+ $redirectType = null;
+
+ if ($data['default'] == 1) {
+ $rewriting->setRedirected(null);
+ } else {
+ if ($rewriteDefault !== null) {
+ $rewriting->setRedirected($rewriteDefault->getId());
+ $redirectType = RewritingRedirectTypeQuery::create()
+ ->filterById($rewriting->getId())
+ ->findOneOrCreate();
+ $redirectType->setHttpcode($data['httpcode']);
+ } else {
+ $rewriting->setRedirected(null);
+ }
+ }
+
+ $dispatcher->dispatch(
+ new RewriteUrlEvent($rewriting, $redirectType),
+ RewriteUrlEvents::REWRITEURL_ADD
+ );
+
+ return $this->generateSuccessRedirect($addForm);
+ } catch (FormValidationException $exception) {
+ $message = $this->createStandardFormValidationErrorMessage($exception);
+ } catch (\Exception $exception) {
+ $message = $exception->getMessage();
+ }
+
+ if ($message !== null && $exception !== null) {
+ Tlog::getInstance()->error(sprintf("Error during order delivery process : %s. Exception was %s", $message, $exception->getMessage()));
+
+ $addForm->setErrorMessage($message);
+
+ $parserContext
+ ->addForm($addForm)
+ ->setGeneralError($message);
+ }
+
+ return $this->generateSuccessRedirect($addForm);
+ }
+
+ /**
+ * @return mixed
+ */
+ public function setDefaultAction(Request $request, EventDispatcherInterface $dispatcher)
+ {
+ if (null !== $response = $this->checkAuth(AdminResources::MODULE, 'RewriteUrl', AccessManager::UPDATE)) {
+ return $response;
+ }
+
+ $urlId = $request->request->get('id_url');
+ $rewritingUrl = RewritingUrlQuery::create()->findOneById($urlId);
+
+ if ($rewritingUrl !== null) {
+ $event = new RewriteUrlEvent($rewritingUrl);
+ $dispatcher->dispatch($event,RewriteUrlEvents::REWRITEURL_SET_DEFAULT);
+ }
+
+ return $this->generateRedirectFromRoute(
+ 'admin.'.$this->correspondence[$rewritingUrl->getView()].'.update',
+ [
+ $rewritingUrl->getView().'_id'=>$rewritingUrl->getViewId(),
+ 'current_tab' => 'modules'
+ ],
+ [
+ $rewritingUrl->getView().'_id'=>$rewritingUrl->getViewId()
+ ]
+ );
+ }
+
+
+ public function changeRedirectTypeAction(Request $request, EventDispatcherInterface $dispatcher)
+ {
+ if (null !== $response = $this->checkAuth(AdminResources::MODULE, 'RewriteUrl', AccessManager::UPDATE)) {
+ return $response;
+ }
+
+ $urlId = $request->get('id_url');
+ $httpcode = $request->get('httpcode');
+ $rewritingUrl = RewritingUrlQuery::create()->findOneById($urlId);
+
+ if ($rewritingUrl !== null) {
+ $rewritingRedirectType = RewritingRedirectTypeQuery::create()
+ ->filterById($urlId)
+ ->findOneOrCreate();
+ $rewritingRedirectType->setHttpcode($httpcode);
+
+ $event = new RewriteUrlEvent($rewritingUrl, $rewritingRedirectType);
+ $dispatcher->dispatch($event,RewriteUrlEvents::REWRITEURL_UPDATE);
+ }
+
+ return new Response("", Response::HTTP_OK);
+ }
+
+ /**
+ * @return mixed
+ */
+ public function reassignAction(EventDispatcherInterface $dispatcher, ParserContext $parserContext)
+ {
+ if (null !== $response = $this->checkAuth(AdminResources::MODULE, 'RewriteUrl', AccessManager::UPDATE)) {
+ return $response;
+ }
+
+ $reassignForm = $this->createForm(ReassignForm::getName());
+
+ try {
+ $form = $this->validateForm($reassignForm);
+ $data = $form->getData();
+
+ $all = $data['all'];
+ $newRewrite = explode('::', $data['select-reassign']);
+ $rewriteId = $data['rewrite-id'];
+ $newView = $newRewrite[1];
+ $newViewId = $newRewrite[0];
+
+ if ($all === 1) {
+ self::allReassign($dispatcher, $rewriteId, $newView, $newViewId);
+ } else {
+ self::simpleReassign($dispatcher, $rewriteId, $newView, $newViewId);
+ }
+
+ return $this->generateSuccessRedirect($reassignForm);
+ } catch (FormValidationException $e) {
+ $message = $this->createStandardFormValidationErrorMessage($e);
+ } catch (\Exception $e) {
+ $message = $e->getMessage();
+ }
+
+ $reassignForm->setErrorMessage($message);
+
+ $parserContext
+ ->addForm($reassignForm)
+ ->setGeneralError($message)
+ ;
+
+ return $this->generateSuccessRedirect($reassignForm);
+ }
+
+ /**
+ * @return mixed|\Thelia\Core\HttpFoundation\Response
+ */
+ public function existAction(Request $request)
+ {
+ if (null !== $response = $this->checkAuth(array(AdminResources::MODULE), 'RewriteUrl', AccessManager::VIEW)) {
+ return $response;
+ }
+
+ $search = $request->query->get('q');
+
+ $rewritingUrl = RewritingUrlQuery::create()
+ ->filterByView(RewriteUrl::getUnknownSources(), Criteria::NOT_IN)
+ ->findOneByUrl($search);
+
+ if ($rewritingUrl !== null) {
+ if (!in_array($rewritingUrl->getView(), $this->correspondence)) {
+ return $this->jsonResponse(json_encode(false));
+ }
+
+ $rewritingUrlArray = ["reassignUrl" => $this->generateUrlByRewritingUrl($rewritingUrl)];
+
+ return $this->jsonResponse(json_encode($rewritingUrlArray));
+ } else {
+ return $this->jsonResponse(json_encode(false));
+ }
+ }
+
+ /**
+ * @return mixed|\Thelia\Core\HttpFoundation\Response
+ * @throws \Propel\Runtime\Exception\PropelException
+ */
+ public function searchAction(Request $request)
+ {
+ if (null !== $response = $this->checkAuth(array(AdminResources::MODULE), 'RewriteUrl', AccessManager::VIEW)) {
+ return $response;
+ }
+
+ $search = '%'.$request->query->get('q').'%';
+
+ $resultArray = array();
+
+ $categoriesI18n = CategoryI18nQuery::create()->filterByTitle($search, Criteria::LIKE)->limit(10);
+ $contentsI18n = ContentI18nQuery::create()->filterByTitle($search, Criteria::LIKE)->limit(10);
+ $foldersI18n = FolderI18nQuery::create()->filterByTitle($search, Criteria::LIKE)->limit(10);
+ $brandsI18n = BrandI18nQuery::create()->filterByTitle($search, Criteria::LIKE)->limit(10);
+
+ $productsI18n = ProductI18nQuery::create()->filterByTitle($search, Criteria::LIKE)->limit(10);
+ $productsRef = ProductQuery::create()->filterByRef($search, Criteria::LIKE)->limit(10);
+
+ /** @var \Thelia\Model\CategoryI18n $categoryI18n */
+ foreach ($categoriesI18n as $categoryI18n) {
+ $category = $categoryI18n->getCategory();
+ $resultArray['category'][$category->getId()] = $categoryI18n->getTitle();
+ }
+
+ /** @var \Thelia\Model\ContentI18n $contentI18n */
+ foreach ($contentsI18n as $contentI18n) {
+ $content = $contentI18n->getContent();
+ $resultArray['content'][$content->getId()] = $contentI18n->getTitle();
+ }
+
+ /** @var \Thelia\Model\FolderI18n $folderI18n */
+ foreach ($foldersI18n as $folderI18n) {
+ $folder = $folderI18n->getFolder();
+ $resultArray['folder'][$folder->getId()] = $folderI18n->getTitle();
+ }
+
+ /** @var \Thelia\Model\BrandI18n $brandI18n */
+ foreach ($brandsI18n as $brandI18n) {
+ $brand = $brandI18n->getBrand();
+ $resultArray['brand'][$brand->getId()] = $brandI18n->getTitle();
+ }
+
+ /** @var \Thelia\Model\ProductI18n $productI18n */
+ foreach ($productsI18n as $productI18n) {
+ $product = $productI18n->getProduct();
+ $resultArray['product'][$product->getId()] = $product->getRef().' : '.$productI18n->getTitle();
+ }
+
+ /** @var \Thelia\Model\Product $product */
+ foreach ($productsRef as $product) {
+ $productI18n = ProductI18nQuery::create()->filterByProduct($product)->findOne();
+ $resultArray['product'][$product->getId()] = $productI18n->getTitle();
+ }
+
+ return $this->jsonResponse(json_encode($resultArray));
+ }
+
+ /**
+ * @param int $rewriteId
+ * @param string $newView
+ * @param int $newViewId
+ */
+ protected function allReassign(
+ EventDispatcherInterface $dispatcher,
+ $rewriteId,
+ $newView,
+ $newViewId
+ ) {
+ $origin = RewritingUrlQuery::create()->findOneById($rewriteId);
+
+ $rewrites = RewritingUrlQuery::create()
+ ->filterByView($origin->getView())
+ ->filterByViewId($origin->getViewId())
+ ->find();
+
+ /** @var RewritingUrl $rewrite */
+ foreach ($rewrites as $rewrite) {
+ $destination = RewritingUrlQuery::create()
+ ->filterByView($newView)
+ ->filterByViewId($newViewId)
+ ->filterByViewLocale($rewrite->getViewLocale())
+ ->filterByRedirected(null)
+ ->findOne();
+
+ $rewrite
+ ->setView($newView)
+ ->setViewId($newViewId)
+ ->setRedirected(($destination === null) ? null : $destination->getId());
+
+ $dispatcher->dispatch(
+ new RewriteUrlEvent($rewrite),
+ RewriteUrlEvents::REWRITEURL_UPDATE
+ );
+ }
+ }
+
+ /**
+ * @param int $rewriteId
+ * @param string $newView
+ * @param int $newViewId
+ */
+ protected function simpleReassign(
+ EventDispatcherInterface $dispatcher,
+ $rewriteId,
+ $newView,
+ $newViewId
+ ) {
+ $rewrite = RewritingUrlQuery::create()->findOneById($rewriteId);
+
+ // add new default url
+ if (null !== $newDefault = RewritingUrlQuery::create()->findOneByRedirected($rewrite->getId())) {
+ $dispatcher->dispatch(
+ new RewriteUrlEvent(
+ $newDefault->setRedirected(null)
+ ),
+ RewriteUrlEvents::REWRITEURL_UPDATE
+ );
+ }
+
+ //Update urls who redirected to updated URL
+ if (null !== $isRedirection = RewritingUrlQuery::create()->findByRedirected($rewrite->getId())) {
+ /** @var \Thelia\Model\RewritingUrl $redirected */
+ foreach ($isRedirection as $redirected) {
+ $dispatcher->dispatch(
+ new RewriteUrlEvent(
+ $redirected->setRedirected(
+ ($newDefault !== null) ? $newDefault->getId() : $rewrite->getRedirected()
+ )
+ ),
+ RewriteUrlEvents::REWRITEURL_UPDATE
+ );
+ }
+ }
+
+ $rewrite->setView($newView)
+ ->setViewId($newViewId);
+
+ //Check if default url already exist for the view with the locale
+ $rewriteDefault = RewritingUrlQuery::create()
+ ->filterByView($newView)
+ ->filterByViewId($newViewId)
+ ->filterByViewLocale($rewrite->getViewLocale())
+ ->findOneByRedirected(null);
+
+ if ($rewriteDefault !== null) {
+ $rewrite->setRedirected($rewriteDefault->getId());
+ } else {
+ $rewrite->setRedirected(null);
+ }
+
+ $event = new RewriteUrlEvent($rewrite);
+ $dispatcher->dispatch($event,RewriteUrlEvents::REWRITEURL_UPDATE);
+ }
+
+ /**
+ * @param RewritingUrl $rewritingUrl
+ * @return null|string url
+ */
+ protected function generateUrlByRewritingUrl(RewritingUrl $rewritingUrl)
+ {
+ if (isset($this->correspondence[$rewritingUrl->getView()])) {
+ $route = $this->getRoute(
+ "admin.".$this->correspondence[$rewritingUrl->getView()] . ".update",
+ [$rewritingUrl->getView().'_id' => $rewritingUrl->getViewId()]
+ );
+ return URL::getInstance()->absoluteUrl(
+ $route,
+ [$rewritingUrl->getView().'_id' => $rewritingUrl->getViewId(), 'current_tab' => 'modules']
+ );
+ }
+
+ return null;
+ }
+}
diff --git a/domokits/local/modules/RewriteUrl/Event/RewriteUrlEvent.php b/domokits/local/modules/RewriteUrl/Event/RewriteUrlEvent.php
new file mode 100755
index 0000000..c5e9543
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/Event/RewriteUrlEvent.php
@@ -0,0 +1,211 @@
+
+ * @author Gilles Bourgeat
+ */
+class RewriteUrlEvent extends ActionEvent
+{
+ /** @var int|null */
+ protected $id;
+
+ /** @var string */
+ protected $url;
+
+ /** @var string */
+ protected $view;
+
+ /** @var string */
+ protected $viewLocale;
+
+ /** @var int|null */
+ protected $redirected;
+
+ /** @var RewritingUrl */
+ private $rewritingUrl;
+
+ /** @var RewritingRedirectType */
+ private $redirectType;
+
+ /**
+ * @param RewritingUrl $rewritingUrl
+ * @param RewritingRedirectType $redirectType
+ */
+ public function __construct(RewritingUrl $rewritingUrl, RewritingRedirectType $redirectType = null)
+ {
+ $this->id = $rewritingUrl->getId();
+ $this->url = $rewritingUrl->getUrl();
+ $this->view = $rewritingUrl->getView();
+ $this->viewLocale = $rewritingUrl->getViewLocale();
+ $this->redirected = $rewritingUrl->getRedirected();
+ $this->rewritingUrl = $rewritingUrl;
+ $this->redirectType = $redirectType;
+ }
+
+ /**
+ * @return RewritingUrl
+ */
+ public function getRewritingUrl()
+ {
+ return $this->rewritingUrl;
+ }
+
+ /**
+ * @return RewritingRedirectType
+ */
+ public function getRedirectType()
+ {
+ return $this->redirectType;
+ }
+
+ /**
+ * @param int $id|null
+ * @return $this
+ */
+ public function setId($id)
+ {
+ $this->id = $id;
+
+ return $this;
+ }
+
+ /**
+ * @return int
+ */
+ public function getId()
+ {
+ return $this->id;
+ }
+
+ /**
+ * @param array $parameters
+ * @return $this
+ */
+ public function setParameters(array $parameters)
+ {
+ $this->parameters = $parameters;
+
+ return $this;
+ }
+
+ /**
+ * @return array
+ */
+ public function getParameters()
+ {
+ return $this->parameters;
+ }
+
+ /**
+ * @param boolean $propagationStopped
+ * @return $this
+ */
+ public function setPropagationStopped($propagationStopped)
+ {
+ $this->propagationStopped = boolval($propagationStopped);
+
+ return $this;
+ }
+
+ /**
+ * @return boolean
+ */
+ public function getPropagationStopped()
+ {
+ return $this->propagationStopped;
+ }
+
+ /**
+ * @param null|int $redirected
+ * @return $this
+ */
+ public function setRedirected($redirected)
+ {
+ $this->redirected = $redirected;
+
+ return $this;
+ }
+
+ /**
+ * @return null|int
+ */
+ public function getRedirected()
+ {
+ return $this->redirected;
+ }
+
+ /**
+ * @param string $url
+ * @return $this
+ */
+ public function setUrl($url)
+ {
+ $this->url = $url;
+
+ return $this;
+ }
+
+ /**
+ * @return null|int
+ */
+ public function getUrl()
+ {
+ return $this->url;
+ }
+
+ /**
+ * @param $view
+ * @return $this
+ */
+ public function setView($view)
+ {
+ $this->view = $view;
+
+ return $this;
+ }
+
+ /**
+ * @return null
+ */
+ public function getView()
+ {
+ return $this->view;
+ }
+
+ /**
+ * @param string $view_locale
+ * @return $this
+ */
+ public function setViewLocale($view_locale)
+ {
+ $this->viewLocale = $view_locale;
+
+ return $this;
+ }
+
+ /**
+ * @return null
+ */
+ public function getViewLocale()
+ {
+ return $this->viewLocale;
+ }
+}
diff --git a/domokits/local/modules/RewriteUrl/Event/RewriteUrlEvents.php b/domokits/local/modules/RewriteUrl/Event/RewriteUrlEvents.php
new file mode 100755
index 0000000..d009f8a
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/Event/RewriteUrlEvents.php
@@ -0,0 +1,26 @@
+
+ */
+class RewriteUrlEvents
+{
+ const REWRITEURL_ADD = 'rewriteurl.action.add';
+ const REWRITEURL_DELETE = "rewriteurl.action.delete";
+ const REWRITEURL_UPDATE = "rewriteurl.action.update";
+ const REWRITEURL_SET_DEFAULT = "rewriteurl.action.setdefault";
+}
diff --git a/domokits/local/modules/RewriteUrl/EventListeners/KernelExceptionListener.php b/domokits/local/modules/RewriteUrl/EventListeners/KernelExceptionListener.php
new file mode 100644
index 0000000..af160d9
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/EventListeners/KernelExceptionListener.php
@@ -0,0 +1,69 @@
+requestStack = $requestStack;
+ }
+
+
+ public static function getSubscribedEvents()
+ {
+ return [
+ KernelEvents::EXCEPTION => ['onKernelHttpNotFoundException', 300],
+ ];
+ }
+
+ public function onKernelHttpNotFoundException(ExceptionEvent $event)
+ {
+ if ($event->getThrowable() instanceof NotFoundHttpException) {
+ $urlTool = URL::getInstance();
+
+ $request = $this->requestStack->getCurrentRequest();
+ $pathInfo = $request instanceof TheliaRequest ? $request->getRealPathInfo() : $request->getPathInfo();
+
+ // Check RewriteUrl text rules
+ $textRule = RewriteurlRuleQuery::create()
+ ->filterByOnly404(0)
+ ->filterByValue(ltrim($pathInfo, '/'))
+ ->filterByRuleType('text')
+ ->orderByPosition()
+ ->findOne();
+
+ if ($textRule) {
+ $event->setThrowable(new RedirectException($urlTool->absoluteUrl($textRule->getRedirectUrl()), 301));
+ }
+
+ $ruleCollection = RewriteurlRuleQuery::create()
+ ->filterByOnly404(1)
+ ->orderByPosition()
+ ->find();
+
+ /** @var RewriteurlRule $rule */
+ foreach ($ruleCollection as $rule) {
+ if ($rule->isMatching($pathInfo, $request->query->all())) {
+ $event->setThrowable(new RedirectException($urlTool->absoluteUrl($rule->getRedirectUrl()), 301));
+ return;
+ }
+ }
+ }
+ }
+}
diff --git a/domokits/local/modules/RewriteUrl/EventListeners/RewriteUrlListener.php b/domokits/local/modules/RewriteUrl/EventListeners/RewriteUrlListener.php
new file mode 100755
index 0000000..818a588
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/EventListeners/RewriteUrlListener.php
@@ -0,0 +1,161 @@
+
+ */
+class RewriteUrlListener implements EventSubscriberInterface
+{
+ protected $dispatcher;
+
+ /**
+ * RewriteUrlListener constructor.
+ * @param EventDispatcherInterface $dispatcher
+ */
+ public function __construct(EventDispatcherInterface $dispatcher)
+ {
+ $this->dispatcher = $dispatcher;
+ }
+
+ /**
+ * @return array
+ */
+ public static function getSubscribedEvents()
+ {
+ return [
+ RewriteUrlEvents::REWRITEURL_DELETE =>['deleteRewrite'],
+ RewriteUrlEvents::REWRITEURL_UPDATE =>['updateRewrite'],
+ RewriteUrlEvents::REWRITEURL_ADD =>['addRewrite'],
+ RewriteUrlEvents::REWRITEURL_SET_DEFAULT =>['setDefaultRewrite']
+ ];
+ }
+
+ /**
+ * @param RewriteUrlEvent $event
+ */
+ public function deleteRewrite(RewriteUrlEvent $event)
+ {
+ $rewritingUrl = $event->getRewritingUrl();
+
+ $newDefault = null;
+
+ // test if default url
+ if ($event->getRewritingUrl()->getRedirected() === null) {
+ // add new default url
+ if (null !== $newDefault = RewritingUrlQuery::create()->findOneByRedirected($rewritingUrl->getId())) {
+ $this->dispatcher->dispatch(
+ new RewriteUrlEvent(
+ $newDefault->setRedirected(null)
+ ),
+ RewriteUrlEvents::REWRITEURL_UPDATE
+ );
+ }
+ }
+
+ $isRedirection = RewritingUrlQuery::create()->findByRedirected($rewritingUrl->getId());
+
+ //Update urls who redirected to deleted URL
+ /** @var \Thelia\Model\RewritingUrl $redirected */
+ foreach ($isRedirection as $redirected) {
+ $this->dispatcher->dispatch(
+ new RewriteUrlEvent(
+ $redirected->setRedirected(
+ ($newDefault !== null) ? $newDefault->getId() : $rewritingUrl->getRedirected()
+ )
+ ),
+ RewriteUrlEvents::REWRITEURL_UPDATE
+ );
+ }
+
+ $rewritingUrl->delete();
+ }
+
+ /**
+ * @param RewriteUrlEvent $event
+ * @throws \Exception
+ * @throws \Propel\Runtime\Exception\PropelException
+ */
+ public function addRewrite(RewriteUrlEvent $event)
+ {
+ $rewritingUrl = $event->getRewritingUrl();
+ $rewritingUrl->save();
+
+ if ($rewritingUrl->getRedirected() === null) {
+ //check if the new redirect is set to default if yes redirect all to the new one
+ RewritingUrlQuery::create()
+ ->filterByView($rewritingUrl->getView())
+ ->filterByViewId($rewritingUrl->getViewId())
+ ->filterByViewLocale($rewritingUrl->getViewLocale())
+ ->update(array(
+ "Redirected" => $rewritingUrl->getId()
+ ));
+
+ //Re set new url to default
+ $rewritingDefault = RewritingUrlQuery::create()->findOneById($rewritingUrl->getId());
+ $rewritingDefault->setRedirected(null);
+ $rewritingDefault->save();
+ } else {
+ $redirectType = $event->getRedirectType();
+ if ($redirectType !== null) {
+ $redirectType->setId($rewritingUrl->getId());
+ $redirectType->save();
+ }
+ }
+ }
+
+ /**
+ * @param RewriteUrlEvent $event
+ * @throws \Exception
+ * @throws \Propel\Runtime\Exception\PropelException
+ */
+ public function setDefaultRewrite(RewriteUrlEvent $event)
+ {
+ $rewritingUrl = $event->getRewritingUrl();
+
+ //redirect all url to the new one
+ RewritingUrlQuery::create()
+ ->filterByView($rewritingUrl->getView())
+ ->filterByViewId($rewritingUrl->getViewId())
+ ->filterByViewLocale($rewritingUrl->getViewLocale())
+ ->update(array(
+ "Redirected" => $rewritingUrl->getId()
+ ));
+
+ //Re set new url to default
+ $rewritingUrl->setRedirected(null);
+ $rewritingUrl->save();
+ }
+
+ /**
+ * @param RewriteUrlEvent $event
+ * @throws \Exception
+ * @throws \Propel\Runtime\Exception\PropelException
+ */
+ public function updateRewrite(RewriteUrlEvent $event)
+ {
+ $event->getRewritingUrl()->save();
+ $redirectType = $event->getRedirectType();
+ if ($redirectType !== null) {
+ $redirectType->save();
+ }
+ }
+}
diff --git a/domokits/local/modules/RewriteUrl/Form/AddUrlForm.php b/domokits/local/modules/RewriteUrl/Form/AddUrlForm.php
new file mode 100755
index 0000000..0eef997
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/Form/AddUrlForm.php
@@ -0,0 +1,87 @@
+
+ */
+class AddUrlForm extends BaseForm
+{
+ /**
+ * @return string
+ */
+ public static function getName()
+ {
+ return "rewriteurl_add_form";
+ }
+
+ public function buildForm()
+ {
+ $this->formBuilder
+ ->add(
+ 'view',
+ TextType::class,
+ array(
+ 'constraints' => array(new NotBlank()),
+ 'required' => true
+ )
+ )
+ ->add(
+ 'view-id',
+ TextType::class,
+ array(
+ 'constraints' => array(new NotBlank()),
+ 'required' => true
+ )
+ )
+ ->add(
+ 'url',
+ TextType::class,
+ array(
+ 'constraints' => array(new NotBlank()),
+ 'required' => true
+ )
+ )
+ ->add(
+ 'default',
+ TextType::class,
+ array(
+ 'constraints' => array(new NotBlank()),
+ 'required' => true
+ )
+ )
+ ->add(
+ 'locale',
+ TextType::class,
+ array(
+ 'constraints' => array(new NotBlank()),
+ 'required' => true
+ )
+ )
+ ->add(
+ 'httpcode',
+ TextType::class,
+ array(
+ 'constraints' => array(new NotBlank()),
+ 'required' => true
+ )
+ )
+ ;
+ }
+}
diff --git a/domokits/local/modules/RewriteUrl/Form/ReassignForm.php b/domokits/local/modules/RewriteUrl/Form/ReassignForm.php
new file mode 100755
index 0000000..1d2b2e6
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/Form/ReassignForm.php
@@ -0,0 +1,62 @@
+
+ */
+class ReassignForm extends BaseForm
+{
+ /**
+ * @return string
+ */
+ public static function getName()
+ {
+ return "rewriteurl_reassign_form";
+ }
+
+ protected function buildForm()
+ {
+ $this->formBuilder
+ ->add(
+ 'rewrite-id',
+ IntegerType::class,
+ array(
+ 'required' => true
+ )
+ )
+ ->add(
+ 'select-reassign',
+ TextType::class,
+ array(
+ 'constraints' => array(new NotBlank()),
+ 'required' => true
+ )
+ )
+ ->add(
+ 'all',
+ IntegerType::class,
+ array(
+ 'required' => true
+ )
+ )
+ ;
+ }
+}
diff --git a/domokits/local/modules/RewriteUrl/Form/SetDefaultForm.php b/domokits/local/modules/RewriteUrl/Form/SetDefaultForm.php
new file mode 100755
index 0000000..b548f9c
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/Form/SetDefaultForm.php
@@ -0,0 +1,46 @@
+
+ */
+class SetDefaultForm extends BaseForm
+{
+ /**
+ * @return string
+ */
+ public static function getName()
+ {
+ return "rewriteurl_setdefault_form";
+ }
+
+ protected function buildForm()
+ {
+ $this->formBuilder
+ ->add(
+ 'rewrite-id',
+ TextType::class,
+ array(
+ 'constraints' => array(new NotBlank()),
+ 'required' => true
+ )
+ );
+ }
+}
diff --git a/domokits/local/modules/RewriteUrl/Hook/ConfigurationHook.php b/domokits/local/modules/RewriteUrl/Hook/ConfigurationHook.php
new file mode 100644
index 0000000..6bffeb0
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/Hook/ConfigurationHook.php
@@ -0,0 +1,72 @@
+
+ */
+class ConfigurationHook extends BaseHook
+{
+ public function onModuleConfiguration(HookRenderEvent $event)
+ {
+ $event->add(
+ $this->render(
+ 'RewriteUrl/module-configuration.html',
+ [
+ "isRewritingEnabled" => ConfigQuery::isRewritingEnable()
+ ]
+ )
+ );
+ }
+
+ public function onModuleConfigurationJavascript(HookRenderEvent $event)
+ {
+ $event->add(
+ $this->render(
+ 'RewriteUrl/module-configuration-js.html',
+ [
+ "isRewritingEnabled" => ConfigQuery::isRewritingEnable()
+ ]
+ )
+ );
+ }
+
+ public function onConfigurationCatalogTop(HookRenderEvent $event)
+ {
+ $event->add($this->render(
+ 'configuration-catalog.html'
+ ));
+ }
+
+ public function onMainTopMenuTools(HookRenderBlockEvent $event)
+ {
+ $event->add(
+ [
+ 'id' => 'tools_menu_rewriteutl',
+ 'class' => '',
+ 'url' => URL::getInstance()->absoluteUrl('/admin/module/RewriteUrl'),
+ 'title' => $this->trans('Global URL Rewriting', [], RewriteUrl::MODULE_DOMAIN),
+ ]
+ );
+ }
+}
diff --git a/domokits/local/modules/RewriteUrl/I18n/backOffice/default/fr_FR.php b/domokits/local/modules/RewriteUrl/I18n/backOffice/default/fr_FR.php
new file mode 100755
index 0000000..14aca64
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/I18n/backOffice/default/fr_FR.php
@@ -0,0 +1,86 @@
+ '404 uniquement',
+ 'Actions' => 'Actions',
+ 'All your brands have rewriten urls' => 'Toutes vos marques ont des urls réécrites',
+ 'All your categories have rewriten urls' => 'Toutes vos rubriques ont des urls réécrites',
+ 'All your contents have rewriten urls' => 'Tous vos contenus ont des urls réécrites',
+ 'All your folders have rewriten urls' => 'Tous vos dossiers ont des urls réécrites',
+ 'All your products have rewriten urls' => 'Tous vos produits ont des urls réécrites',
+ 'Brand' => 'Marque',
+ 'Brands' => 'Marques',
+ 'Categories' => 'Rubriques',
+ 'Category' => 'Catégorie',
+ 'Change this category' => 'Modifier cette rubrique',
+ 'Change this content' => 'Modifier ce contenu',
+ 'Change this folder' => 'Modifier ce dossier',
+ 'Change this product' => 'Modifier ce produit',
+ 'Close' => 'Fermer',
+ 'Condition' => 'Condition',
+ 'Configuration' => 'Configuration',
+ 'Contents' => 'Contenus',
+ 'Currently enabled rules' => 'Règles activées',
+ 'Default' => 'Url par défaut',
+ 'Default Url' => 'URL par défaut',
+ 'Default url' => 'Url par défaut',
+ 'Delete Url' => 'Supprimer une Url',
+ 'Delete this redirect' => 'Supprimer cette redirection',
+ 'Do you really want to delete the url %html ?' => 'Voulez-vous vraiment supprimer l\'url %html ?',
+ 'Do you really want to set the url %html as default ?' => 'Définir %html comme URL part défaut ?',
+ 'Edit information in %lng' => 'Modifier l\'information en %lng',
+ 'Enable URL rewriting' => 'Activer la réécriture d\'URL',
+ 'Enter a URL with a leading \'/\' and no domain name. Ex : for \'www.mysite.com/one/two\', enter \'/one/two\'.' => 'Saisissez une URL commençant par un \'/\' et sans nom de domaine. Ex : pour \'www.monsite.com/un/deux\', saisissez \'/un/deux\'.',
+ 'Enter new rule position' => 'Saisir une nouvelle position de règle',
+ 'Error this url already exist you can reassign by follow this ' => 'Erreur cette url existe déjà, vous pouvez la réassigner en suivant ce ',
+ 'Folder' => 'Dossier',
+ 'Folders' => 'Dossiers',
+ 'For questions or bug reporting, thank you to use %url.' => 'Pour toutes questions ou déclaration de bug, merci d\'utiliser %url',
+ 'For the regex, your input is compare to URL without the domain name and without any GET params. Ex : for \'www.mysite.com/one/two?three=four\', your regex will be compare to \'/one/two\'.' => 'Pour une regex, votre expression régulière sera comparée aux URLs sans nom de domaine et sans paramètres GET. Ex : pour \'www.monsite.com/un/deux?trois=quatre\', votre regex sera comparée à \'/un/deux\'.',
+ 'GET params' => 'Paramètres GET',
+ 'Global URL Rewriting' => 'Ré-écritures URL globales',
+ 'Home' => 'Accueil',
+ 'ID' => 'ID',
+ 'List of not rewriten urls' => 'Liste des urls non réécrites',
+ 'Name' => 'Nom',
+ 'New url' => 'Nouvelle url',
+ 'No redirected url.' => 'Pas de redirection',
+ 'No results found for your search.' => 'Aucun resultat trouvé pour votre recherche.',
+ 'Not rewriten urls' => 'Urls non réécrites',
+ 'Permanent redirect' => 'Redirection permanente',
+ 'Please wait ...' => 'Veuillez patienter ...',
+ 'Position' => 'Position',
+ 'Product' => 'Produit',
+ 'Products' => 'Produits',
+ 'Reassign all urls' => 'Ré-attribuer toutes les urls',
+ 'Reassign the url' => 'Ré-attribuer l\'url',
+ 'Reassign this redirect' => 'Réassigner cette redirection',
+ 'Redirect all urls' => 'Rediriger toutes les urls',
+ 'Redirect all urls on a (category, product, folder, content, brand).' => 'Rediriger toutes les urls sur un/une (catégorie, produit, dossier, contenu, marque).',
+ 'Redirect the url %html on :' => 'Rediriger l\'url %html sur :',
+ 'Redirect to' => 'Rediriger vers',
+ 'Redirect to default' => 'Rediriger sur l\'url par défaut',
+ 'Redirected' => 'Redirigé vers',
+ 'Reference' => 'Référence',
+ 'Regex' => 'Regex',
+ 'Regex and GET params' => 'Expr. régulière + Param. GET',
+ 'Rule management' => 'Gestion des règles de redirection',
+ 'Rule type' => 'Type de règle',
+ 'Search' => 'Rechercher',
+ 'Set the config variable \'rewriting_enable\'' => 'Définit la valeur de la variable \'rewriting_enable\'.',
+ 'Set this redirect to default' => 'Mettre cette url par défaut',
+ 'Temporary redirect' => 'Redirection temporaire',
+ 'This action is irreversible after confirmation.' => 'Cette action est irréversible après confirmation.',
+ 'Title, Ref ...' => 'Titre, Ref ...',
+ 'Type' => 'Type',
+ 'Url' => 'Url',
+ 'Url redirected' => 'Url de redirection',
+ 'Validate' => 'Valider',
+ 'View locale' => 'Langue',
+ 'content' => 'Contenu',
+ 'exists' => 'existe',
+ 'is empty' => 'est vide',
+ 'is missing' => 'est manquante',
+ 'is not empty' => 'n\'est pas vide',
+ 'link' => 'lien',
+);
diff --git a/domokits/local/modules/RewriteUrl/I18n/fr_FR.php b/domokits/local/modules/RewriteUrl/I18n/fr_FR.php
new file mode 100644
index 0000000..f9a53ca
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/I18n/fr_FR.php
@@ -0,0 +1,19 @@
+ 'Au moins un paramètre GET est requis.',
+ 'Get Params' => 'Paramètres GET',
+ 'Global URL Rewriting' => 'Ré-écritures URL globales',
+ 'Param condition is empty.' => 'Une des conditions d\'un paramètre GET est vide.',
+ 'Param name is empty.' => 'Le nom d\'un paramètre GET est vide.',
+ 'Redirect url cannot be empty.' => 'L URL redirigée ne peut pas être vide.',
+ 'Regex' => 'Expression régulière',
+ 'Regex and Get Params' => 'Expr. régulière + Param. GET',
+ 'Regex value cannot be empty.' => 'La valeur de l\'expression régulière ne peut pas être vide.',
+ 'This url is already used here %url.' => 'L URL est déjà utilisée ici : %url',
+ 'Unable to change the configuration variable.' => 'Impossible de changer la variable de configuration.',
+ 'Unable to find rule to change position.' => 'Impossible de trouver la règle pour le changement de position.',
+ 'Unable to find rule to remove.' => 'La règle à supprimer n a pas pu être trouvée.',
+ 'Unable to find rule to update.' => 'La règle à modifier n a pas pu être trouvée.',
+ 'Unknown rule type.' => 'Type de règle inconnu.',
+);
diff --git a/domokits/local/modules/RewriteUrl/LICENSE.txt b/domokits/local/modules/RewriteUrl/LICENSE.txt
new file mode 100755
index 0000000..65c5ca8
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/LICENSE.txt
@@ -0,0 +1,165 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
diff --git a/domokits/local/modules/RewriteUrl/Loop/NotRewritenUrlCategoryLoop.php b/domokits/local/modules/RewriteUrl/Loop/NotRewritenUrlCategoryLoop.php
new file mode 100644
index 0000000..c86160c
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/Loop/NotRewritenUrlCategoryLoop.php
@@ -0,0 +1,106 @@
+
+ * @author Gilles Bourgeat
+ *
+ * @method string getView()
+ */
+class NotRewritenUrlCategoryLoop extends BaseI18nLoop implements PropelSearchLoopInterface
+{
+ protected static $cacheRewritingUrl = [];
+
+ protected function getArgDefinitions()
+ {
+ return new ArgumentCollection(
+ Argument::createEnumListTypeArgument(
+ 'view',
+ ['product', 'category', 'folder', 'content', 'brand']
+ )
+ );
+ }
+
+ public function buildModelCriteria()
+ {
+ $view = $this->getView()[0];
+
+ $rewritingUrlQuery = RewritingUrlQuery::create();
+
+ $class = 'Thelia\Model\\' . ucfirst($view) . 'Query';
+ /** @var CategoryQuery|ProductQuery|FolderQuery|ContentQuery|BrandQuery $objectQuery */
+ $objectQuery = $class::create();
+
+ $localeSearch = LangQuery::create()->findByIdOrLocale($this->getLang());
+
+ $rewritingUrlQuery->filterByView($view)->filterByViewLocale(
+ $localeSearch !== null ? $localeSearch->getLocale() : 'en_US'
+ );
+
+ if (!isset(static::$cacheRewritingUrl[$view])) {
+ static::$cacheRewritingUrl[$view] = $rewritingUrlQuery
+ ->select([RewritingUrlTableMap::VIEW_ID])
+ ->groupBy(RewritingUrlTableMap::VIEW_ID)
+ ->find();
+ }
+
+ $query = $objectQuery
+ ->filterById(static::$cacheRewritingUrl[$view]->getData(), Criteria::NOT_IN);
+
+ /* manage translations */
+ $this->configureI18nProcessing($query, ['TITLE']);
+
+ return $query;
+ }
+
+ public function parseResults(LoopResult $loopResult)
+ {
+ /** @var Category|Product|Folder|Content|Brand $category */
+ foreach ($loopResult->getResultDataCollection() as $category) {
+ $loopResultRow = (new LoopResultRow($category))
+ ->set('ID', $category->getId())
+ ->set('NAME', $category->getVirtualColumn('i18n_TITLE'));
+
+ if (property_exists($category, 'ref')) {
+ $loopResultRow->set('REF', $category->getRef());
+ }
+ $loopResult->addRow($loopResultRow);
+ }
+
+ return $loopResult;
+ }
+}
diff --git a/domokits/local/modules/RewriteUrl/Loop/RewriteUrlLoop.php b/domokits/local/modules/RewriteUrl/Loop/RewriteUrlLoop.php
new file mode 100755
index 0000000..1760d2b
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/Loop/RewriteUrlLoop.php
@@ -0,0 +1,104 @@
+
+ * @author Gilles Bourgeat
+ */
+class RewriteUrlLoop extends BaseLoop implements PropelSearchLoopInterface
+{
+ /**
+ * @return ArgumentCollection
+ */
+ protected function getArgDefinitions()
+ {
+ return new ArgumentCollection(
+ Argument::createIntTypeArgument('id'),
+ Argument::createAnyTypeArgument('view'),
+ Argument::createIntTypeArgument('view_id'),
+ Argument::createIntTypeArgument('redirect')
+ );
+ }
+
+ /**
+ * @return \Thelia\Model\RewritingUrlQuery
+ */
+ public function buildModelCriteria()
+ {
+ $search = RewritingUrlQuery::create();
+
+ if (null !== $id = $this->getId()) {
+ $search->filterById($id);
+ }
+
+ if (null !== $view_id = $this->getViewId()) {
+ $search->filterByViewId($view_id)->filterByView($this->getView())->find();
+ }
+
+ $redirect = $this->getRedirect();
+ if ($redirect == 1) {
+ $search->filterByRedirected(null, Criteria::NOT_EQUAL)->find();
+ } elseif ($redirect == 0) {
+ $search->filterByRedirected(null, Criteria::EQUAL)->find();
+ }
+
+ return $search;
+ }
+
+ /**
+ * @param LoopResult $loopResult
+ * @return LoopResult
+ */
+ public function parseResults(LoopResult $loopResult)
+ {
+ $redirectTypeSearch = RewritingRedirectTypeQuery::create();
+ foreach ($loopResult->getResultDataCollection() as $rewriteURl) {
+ $loopResultRow = (new LoopResultRow($rewriteURl))
+ ->set('ID_URL', $rewriteURl->getID())
+ ->set('URL', $rewriteURl->getUrl())
+ ->set('VIEW', $rewriteURl->getView())
+ ->set('VIEW_LOCALE', $rewriteURl->getViewLocale())
+ ->set('REDIRECTED', $rewriteURl->getRedirected())
+ ->set('VIEW_ID', $rewriteURl->getViewId());
+
+
+ if ($rewriteURl->getRedirected()) {
+ $redirectType = $redirectTypeSearch->findPk($rewriteURl->getID());
+ if ($redirectType == null) {
+ $httpcode = RewritingRedirectType::DEFAULT_REDIRECT_TYPE;
+ } else {
+ $httpcode = $redirectType->getHttpcode();
+ }
+ $loopResultRow->set('HTTPCODE', $httpcode);
+ }
+
+ $loopResult->addRow($loopResultRow);
+ }
+
+ return $loopResult;
+ }
+}
diff --git a/domokits/local/modules/RewriteUrl/Loop/RewriteUrlRuleLoop.php b/domokits/local/modules/RewriteUrl/Loop/RewriteUrlRuleLoop.php
new file mode 100644
index 0000000..023b852
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/Loop/RewriteUrlRuleLoop.php
@@ -0,0 +1,83 @@
+getId()){
+ $search->filterById($id);
+ }
+
+ if (null !== $ruleType = $this->getRuleType()){
+ $search->filterByRuleType($ruleType);
+ }
+
+ if (null !== $value = $this->getValue()){
+ $search->filterByValue($value);
+ }
+
+ if (null !== $redirectUrl = $this->getRedirectUrl()){
+ $search->filterByRedirectUrl($redirectUrl);
+ }
+
+ return $search->orderByPosition();
+ }
+
+ public function parseResults(LoopResult $loopResult)
+ {
+ /** @var RewriteurlRule $rewriteUrlRule */
+ foreach ($loopResult->getResultDataCollection() as $rewriteUrlRule){
+ $loopResultRow = (new LoopResultRow($rewriteUrlRule))
+ ->set('ID', $rewriteUrlRule->getId())
+ ->set('RULE_TYPE', $rewriteUrlRule->getRuleType())
+ ->set('VALUE', $rewriteUrlRule->getValue())
+ ->set('ONLY404', $rewriteUrlRule->getOnly404())
+ ->set('REDIRECT_URL', $rewriteUrlRule->getRedirectUrl())
+ ->set('POSITION', $rewriteUrlRule->getPosition())
+ ->set('REWRITE_URL_PARAMS', $rewriteUrlRule->getRewriteUrlParamCollection());
+
+ $loopResult->addRow($loopResultRow);
+ }
+
+ return $loopResult;
+ }
+}
\ No newline at end of file
diff --git a/domokits/local/modules/RewriteUrl/Model/RewriteurlRule.php b/domokits/local/modules/RewriteUrl/Model/RewriteurlRule.php
new file mode 100644
index 0000000..12f3c6d
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/Model/RewriteurlRule.php
@@ -0,0 +1,104 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace RewriteUrl\Model;
+
+use RewriteUrl\Model\Base\RewriteurlRule as BaseRewriteurlRule;
+use Thelia\Log\Tlog;
+use Thelia\Model\Tools\PositionManagementTrait;
+
+class RewriteurlRule extends BaseRewriteurlRule
+{
+ use PositionManagementTrait;
+
+ /** @var string */
+ public const TYPE_REGEX = 'regex';
+
+ /** @var string */
+ public const TYPE_GET_PARAMS = 'params';
+
+ /** @var string */
+ public const TYPE_REGEX_GET_PARAMS = 'regex-params';
+
+ /** @var string */
+ public const TYPE_TEXT = 'text';
+
+ protected $rewriteUrlParamCollection = null;
+
+ /**
+ * @return \Propel\Runtime\Collection\ObjectCollection|RewriteurlRuleParam[]
+ */
+ public function getRewriteUrlParamCollection()
+ {
+ if ($this->rewriteUrlParamCollection === null) {
+ $this->rewriteUrlParamCollection = RewriteurlRuleParamQuery::create()->filterByIdRule($this->getId())->find();
+ }
+
+ return $this->rewriteUrlParamCollection;
+ }
+
+ protected function isMatchingPath(string $url): bool
+ {
+ if (!empty($this->getValue())) {
+ try {
+ $match = @preg_match('/' . $this->getValue() . '/', $url);
+
+ if (false === $match) {
+ Tlog::getInstance()->error('Invalid pattern: ' . $this->getValue());
+ }
+
+ return (bool)$match;
+ } catch (\Exception $ex) {
+ Tlog::getInstance()->error('Failed to match rule : ' . $ex->getMessage());
+ }
+ }
+
+ return false;
+ }
+
+ protected function isMatchingGetParams(array $getParamArray): bool
+ {
+ if ($this->getRewriteUrlParamCollection()->count() === 0) {
+ return false;
+ }
+
+ foreach ($this->getRewriteUrlParamCollection() as $rewriteUrlParam) {
+ if (!$rewriteUrlParam->isMatching($getParamArray)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ public function isMatching(string $url, array $getParamArray): bool
+ {
+ if ($this->getRuleType() === self::TYPE_REGEX) {
+ return $this->isMatchingPath($url);
+ }
+
+ if ($this->getRuleType() === self::TYPE_GET_PARAMS) {
+ return $this->isMatchingGetParams($getParamArray);
+ }
+
+ if ($this->getRuleType() === self::TYPE_REGEX_GET_PARAMS) {
+ return $this->isMatchingPath($url) && $this->isMatchingGetParams($getParamArray);
+ }
+
+ return false;
+ }
+
+ public function deleteAllRelatedParam(): void
+ {
+ RewriteurlRuleParamQuery::create()->filterByIdRule($this->getId())->find()->delete();
+ }
+}
diff --git a/domokits/local/modules/RewriteUrl/Model/RewriteurlRuleParam.php b/domokits/local/modules/RewriteUrl/Model/RewriteurlRuleParam.php
new file mode 100644
index 0000000..fe37b75
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/Model/RewriteurlRuleParam.php
@@ -0,0 +1,53 @@
+getParamName(), $getParamArray)) {
+ $value = $getParamArray[$this->getParamName()];
+ if (empty($value)) {
+ if ($this->getParamCondition() === self::PARAM_CONDITION_EMPTY) {
+ return true;
+ }
+ } else {
+ if ($this->getParamCondition() === self::PARAM_CONDITION_NOT_EMPTY) {
+ return true;
+ }
+ }
+
+ if ($value == $this->getParamValue()) {
+ if ($this->getParamCondition() === self::PARAM_CONDITION_EQUALS) {
+ return true;
+ }
+ } else {
+ if ($this->getParamCondition() === self::PARAM_CONDITION_NOT_EQUALS) {
+ return true;
+ }
+ }
+
+ if ($this->getParamCondition() === self::PARAM_CONDITION_EXISTS) {
+ return true;
+ }
+
+ } else {
+ if ($this->getParamCondition() === self::PARAM_CONDITION_MISSING) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+}
diff --git a/domokits/local/modules/RewriteUrl/Model/RewriteurlRuleParamQuery.php b/domokits/local/modules/RewriteUrl/Model/RewriteurlRuleParamQuery.php
new file mode 100644
index 0000000..96d4e10
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/Model/RewriteurlRuleParamQuery.php
@@ -0,0 +1,21 @@
+
+ */
+class RewritingUrlOverride extends RewritingUrl
+{
+ /**
+ * disable the Thelia behavior
+ *
+ * @param ConnectionInterface $con
+ */
+ public function postInsert(ConnectionInterface $con = null): void
+ {
+ }
+}
diff --git a/domokits/local/modules/RewriteUrl/Readme.md b/domokits/local/modules/RewriteUrl/Readme.md
new file mode 100755
index 0000000..87ae24c
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/Readme.md
@@ -0,0 +1,59 @@
+# Rewrite Url
+
+This module allows you to create general redirection rules for your website. You can also manage rewritten urls for products, categories, folders, contents, brands.
+
+* Allows you to redirect a url to another based on a regular expression or matching GET parameters
+* Allows you to reassign a url to another (product, category, folder, content, brand)
+* Allows you to reassign all urls to another (product, category, folder, content, brand)
+* Allows you to reassign a default url to your (product, category, folder, content, brand)
+* Allows you to display the list of not rewriten urls (product, category, folder, content, brand)
+
+[](https://scrutinizer-ci.com/g/thelia-modules/RewriteUrl/?branch=master)
+[](https://packagist.org/packages/thelia/rewrite-url-module)
+[](https://packagist.org/packages/thelia/rewrite-url-module)
+
+#### [See the changelog](https://github.com/thelia-modules/RewriteUrl/blob/master/CHANGELOG.md)
+
+## Compatibility
+
+Thelia > 2.1
+
+## Installation
+
+### Manually
+
+* Copy the module into ```/local/modules/``` directory and be sure that the name of the module is RewriteUrl.
+* Activate it in your thelia administration panel
+
+### Composer
+
+Add it in your main thelia composer.json file
+
+```
+composer require thelia/rewrite-url-module:~1.5.8
+```
+
+## Usage
+
+BackOffice :
+- in Product edit tab modules
+- in Folder edit tab modules
+- in Content edit tab modules
+- in Brand edit tab modules
+- in Category edit tab modules
+- in Configuration list not rewriten urls
+- in the module configuration page
+
+## Screenshot
+
+#### In "Modules" tab
+
+
+
+#### In Thelia configuration
+
+
+
+#### In the module configuration
+
+
\ No newline at end of file
diff --git a/domokits/local/modules/RewriteUrl/RewriteUrl.php b/domokits/local/modules/RewriteUrl/RewriteUrl.php
new file mode 100755
index 0000000..b70d3e6
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/RewriteUrl.php
@@ -0,0 +1,130 @@
+
+ * @author Gilles Bourgeat
+ */
+class RewriteUrl extends BaseModule
+{
+ /** @var string */
+ const MODULE_DOMAIN = "rewriteurl";
+
+ /** @var string */
+ const MODULE_NAME = "rewriteurl";
+
+ /* @var string */
+ const UPDATE_PATH = __DIR__ . DS . 'Config' . DS . 'update';
+
+ /** @static null|array */
+ static protected $unknownSources;
+
+
+ public function preActivation(ConnectionInterface $con = null)
+ {
+ if (!$this->getConfigValue('is_initialized', false)) {
+ $database = new Database($con);
+
+ $database->insertSql(null, array(__DIR__ . '/Config/thelia.sql'));
+
+ $this->setConfigValue('is_initialized', true);
+ }
+
+ return true;
+ }
+
+ /**
+ * @param string $currentVersion
+ * @param string $newVersion
+ * @param ConnectionInterface $con
+ * @throws \Exception
+ * @throws \Propel\Runtime\Exception\PropelException
+ * @since 1.2.3
+ */
+ public function update($currentVersion, $newVersion, ConnectionInterface $con = null): void
+ {
+ $finder = (new Finder())->files()->name('#.*?\.sql#')->sortByName()->in(self::UPDATE_PATH);
+
+ if ($finder->count() === 0) {
+ return;
+ }
+
+ $database = new Database($con);
+
+ /** @var \Symfony\Component\Finder\SplFileInfo $updateSQLFile */
+ foreach ($finder as $updateSQLFile) {
+ if (version_compare($currentVersion, str_replace('.sql', '', $updateSQLFile->getFilename()), '<')) {
+ $database->insertSql(null, [$updateSQLFile->getPathname()]);
+ }
+ }
+
+ /*
+ * Fix for urls that redirect on itself
+ */
+ $urls = RewritingUrlQuery::create()
+ ->where(RewritingUrlTableMap::ID . " = " . RewritingUrlTableMap::REDIRECTED)
+ ->find();
+
+ /** @var RewritingUrl $url */
+ foreach ($urls as $url) {
+ $parent = RewritingUrlQuery::create()
+ ->filterByView($url->getView())
+ ->filterByViewId($url->getViewId())
+ ->filterByViewLocale($url->getViewLocale())
+ ->filterByRedirected(null)
+ ->findOne();
+
+ $url->setRedirected(($parent === null) ? null : $parent->getId())->save();
+ }
+ }
+
+ /**
+ * @return array|null
+ */
+ public static function getUnknownSources()
+ {
+ if (static::$unknownSources === null) {
+ static::$unknownSources = [];
+ if (null !== $config = ConfigQuery::read('obsolete_rewriten_url_view', null)) {
+ static::$unknownSources[] = $config;
+ }
+ }
+ return static::$unknownSources;
+ }
+
+ /**
+ * Defines how services are loaded in your modules.
+ */
+ public static function configureServices(ServicesConfigurator $servicesConfigurator): void
+ {
+ $servicesConfigurator->load(self::getModuleCode() . '\\', __DIR__)
+ ->exclude([THELIA_MODULE_DIR . ucfirst(self::getModuleCode()) . '/I18n/*'])
+ ->autowire(true)
+ ->autoconfigure(true);
+ }
+}
diff --git a/domokits/local/modules/RewriteUrl/Service/RewritingRouterFirst.php b/domokits/local/modules/RewriteUrl/Service/RewritingRouterFirst.php
new file mode 100644
index 0000000..d03c1d4
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/Service/RewritingRouterFirst.php
@@ -0,0 +1,150 @@
+getRealPathInfo() : $request->getPathInfo();
+
+ // Check RewriteUrl text rules
+ $textRule = RewriteurlRuleQuery::create()
+ ->filterByOnly404(0)
+ ->filterByValue(ltrim($pathInfo, '/'))
+ ->filterByRuleType('text')
+ ->orderByPosition()
+ ->findOne();
+
+ if ($textRule) {
+ $this->redirect($urlTool->absoluteUrl($textRule->getRedirectUrl()), 301);
+ }
+
+ // Check RewriteUrl rules
+ $ruleCollection = RewriteurlRuleQuery::create()
+ ->filterByOnly404(0)
+ ->orderByPosition()
+ ->find();
+
+ /** @var RewriteurlRule $rule */
+ foreach ($ruleCollection as $rule) {
+ if ($rule->isMatching($pathInfo, $request->query->all())) {
+ $this->redirect($urlTool->absoluteUrl($rule->getRedirectUrl()), 301);
+ }
+ }
+
+ try {
+ $rewrittenUrlData = $urlTool->resolve($pathInfo);
+ } catch (UrlRewritingException $e) {
+ switch ($e->getCode()) {
+ case UrlRewritingException::URL_NOT_FOUND:
+ throw new ResourceNotFoundException();
+ break;
+ default:
+ throw $e;
+ }
+ }
+
+ // If we have a "lang" parameter, whe have to check if the found URL has the proper locale
+ // If it's not the case, find the rewritten URL with the requested locale, and redirect to it.
+ if (null == !$requestedLocale = $request->get('lang')) {
+ if (null !== $requestedLang = LangQuery::create()->findOneByLocale($requestedLocale)) {
+ if ($requestedLang->getLocale() != $rewrittenUrlData->locale) {
+ $localizedUrl = $urlTool->retrieve(
+ $rewrittenUrlData->view,
+ $rewrittenUrlData->viewId,
+ $requestedLang->getLocale()
+ )->toString();
+
+ $this->redirect($urlTool->absoluteUrl($localizedUrl), 301);
+ }
+ }
+ }
+
+ /* is the URL redirected ? */
+ if (null !== $rewrittenUrlData->redirectedToUrl) {
+ $redirect = RewritingUrlQuery::create()
+ ->filterByView($rewrittenUrlData->view)
+ ->filterByViewId($rewrittenUrlData->viewId)
+ ->filterByViewLocale($rewrittenUrlData->locale)
+ ->filterByRedirected(null, Criteria::ISNULL)
+ ->findOne();
+
+ // Differences with the base class for handling 301 or 302 redirection
+ $redirectType = $this->fetchRewritingRedirectTypeFromUrl($rewrittenUrlData->rewrittenUrl);
+
+ if ($redirectType == null) {
+ $httpRedirectCode = RewritingRedirectType::DEFAULT_REDIRECT_TYPE;
+ } else {
+ $httpRedirectCode = $redirectType->getHttpcode();
+ }
+ // End of differences
+
+ $this->redirect($urlTool->absoluteUrl($redirect->getUrl()), $httpRedirectCode);
+ }
+
+ /* define GET arguments in request */
+
+ if (null !== $rewrittenUrlData->view) {
+ $request->attributes->set('_view', $rewrittenUrlData->view);
+ if (null !== $rewrittenUrlData->viewId) {
+ $request->query->set($rewrittenUrlData->view . '_id', $rewrittenUrlData->viewId);
+ }
+ }
+
+ if (null !== $rewrittenUrlData->locale) {
+ $this->manageLocale($rewrittenUrlData, $request);
+ }
+
+
+ foreach ($rewrittenUrlData->otherParameters as $parameter => $value) {
+ $request->query->set($parameter, $value);
+ }
+
+ return array(
+ '_controller' => 'Thelia\\Controller\\Front\\DefaultController::noAction',
+ '_route' => 'rewrite',
+ '_rewritten' => true,
+ );
+ }
+ throw new ResourceNotFoundException();
+ }
+
+ /**
+ * @param $url
+ * @return RewritingRedirectType
+ */
+ public function fetchRewritingRedirectTypeFromUrl($url)
+ {
+ return RewritingRedirectTypeQuery::create()
+ ->joinRewritingUrl()
+ ->useRewritingUrlQuery()
+ ->filterByUrl($url)
+ ->endUse()
+ ->findOne();
+ }
+}
diff --git a/domokits/local/modules/RewriteUrl/Service/RewritingRouterLast.php b/domokits/local/modules/RewriteUrl/Service/RewritingRouterLast.php
new file mode 100644
index 0000000..a273553
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/Service/RewritingRouterLast.php
@@ -0,0 +1,54 @@
+getRealPathInfo() : $request->getPathInfo();
+
+ // Check RewriteUrl text rules
+ $textRule = RewriteurlRuleQuery::create()
+ ->filterByOnly404(1)
+ ->filterByValue(ltrim($pathInfo, '/'))
+ ->filterByRuleType('text')
+ ->orderByPosition()
+ ->findOne();
+
+ if ($textRule) {
+ $this->redirect($urlTool->absoluteUrl($textRule->getRedirectUrl()), 301);
+ }
+
+ $ruleCollection = RewriteurlRuleQuery::create()
+ ->filterByOnly404(1)
+ ->orderByPosition()
+ ->find();
+
+ /** @var RewriteurlRule $rule */
+ foreach ($ruleCollection as $rule) {
+ if ($rule->isMatching($pathInfo, $request->query->all())) {
+ $this->redirect($urlTool->absoluteUrl($rule->getRedirectUrl()), 301);
+ }
+ }
+ }
+ throw new ResourceNotFoundException();
+ }
+}
diff --git a/domokits/local/modules/RewriteUrl/composer.json b/domokits/local/modules/RewriteUrl/composer.json
new file mode 100755
index 0000000..304d74b
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/composer.json
@@ -0,0 +1,25 @@
+{
+ "name": "thelia/rewrite-url-module",
+ "license": "LGPL-3.0+",
+ "type": "thelia-module",
+ "require": {
+ "thelia/installer": "~1.1"
+ },
+ "extra": {
+ "installer-name": "RewriteUrl"
+ },
+ "authors": [
+ {
+ "name": "Vincent Lopes",
+ "email": "vlopes@openstudio.fr",
+ "homepage": "http://thelia.net",
+ "role": "Developer"
+ },
+ {
+ "name": "Gilles Bourgeat",
+ "email": "gbourgeat@openstudio.fr",
+ "homepage": "http://thelia.net",
+ "role": "Developer"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/domokits/local/modules/RewriteUrl/logo.jpg b/domokits/local/modules/RewriteUrl/logo.jpg
new file mode 100644
index 0000000..74847c0
Binary files /dev/null and b/domokits/local/modules/RewriteUrl/logo.jpg differ
diff --git a/domokits/local/modules/RewriteUrl/screenshot/screenshot-1.jpeg b/domokits/local/modules/RewriteUrl/screenshot/screenshot-1.jpeg
new file mode 100644
index 0000000..544098d
Binary files /dev/null and b/domokits/local/modules/RewriteUrl/screenshot/screenshot-1.jpeg differ
diff --git a/domokits/local/modules/RewriteUrl/screenshot/screenshot-2.jpeg b/domokits/local/modules/RewriteUrl/screenshot/screenshot-2.jpeg
new file mode 100644
index 0000000..1810e07
Binary files /dev/null and b/domokits/local/modules/RewriteUrl/screenshot/screenshot-2.jpeg differ
diff --git a/domokits/local/modules/RewriteUrl/screenshot/screenshot-3.png b/domokits/local/modules/RewriteUrl/screenshot/screenshot-3.png
new file mode 100644
index 0000000..4619f59
Binary files /dev/null and b/domokits/local/modules/RewriteUrl/screenshot/screenshot-3.png differ
diff --git a/domokits/local/modules/RewriteUrl/templates/backOffice/default/RewriteUrl/module-configuration-js.html b/domokits/local/modules/RewriteUrl/templates/backOffice/default/RewriteUrl/module-configuration-js.html
new file mode 100644
index 0000000..4edec76
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/templates/backOffice/default/RewriteUrl/module-configuration-js.html
@@ -0,0 +1,425 @@
+{default_translation_domain domain='googleshoppingxml.bo.default'}
+
+{javascripts file="assets/js/bootstrap-switch/bootstrap-switch.js"}
+
+{/javascripts}
+
+{javascripts file='assets/js/bootstrap-editable/bootstrap-editable.js'}
+
+{/javascripts}
+
+
+
+
+
+
diff --git a/domokits/local/modules/RewriteUrl/templates/backOffice/default/RewriteUrl/module-configuration.html b/domokits/local/modules/RewriteUrl/templates/backOffice/default/RewriteUrl/module-configuration.html
new file mode 100644
index 0000000..34e54a6
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/templates/backOffice/default/RewriteUrl/module-configuration.html
@@ -0,0 +1,140 @@
+{$d='rewriteurl.bo.default'}
+
+
+
+
+
+ {intl d=$d l="Global URL Rewriting"}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {intl d=$d l="Set the config variable 'rewriting_enable'"}
+
+
+
+
+
+
+ {intl d=$d l="Rule management"}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /
+
+ /
+
+
+ /
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{intl d=$d l="Currently enabled rules"}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{include file="RewriteUrl/module-configuration-js.html"}
+
diff --git a/domokits/local/modules/RewriteUrl/templates/backOffice/default/RewriteUrl/tab-module-js.html b/domokits/local/modules/RewriteUrl/templates/backOffice/default/RewriteUrl/tab-module-js.html
new file mode 100755
index 0000000..a9404ff
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/templates/backOffice/default/RewriteUrl/tab-module-js.html
@@ -0,0 +1,188 @@
+
\ No newline at end of file
diff --git a/domokits/local/modules/RewriteUrl/templates/backOffice/default/RewriteUrl/tab-module.html b/domokits/local/modules/RewriteUrl/templates/backOffice/default/RewriteUrl/tab-module.html
new file mode 100755
index 0000000..b88b92a
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/templates/backOffice/default/RewriteUrl/tab-module.html
@@ -0,0 +1,327 @@
+{*
+/*************************************************************************************/
+/* This file is part of the RewriteUrl module for Thelia. */
+/* */
+/* Copyright (c) OpenStudio */
+/* email : dev@thelia.net */
+/* web : http://www.thelia.net */
+/* */
+/* For the full copyright and license information, please view the LICENSE.txt */
+/* file that was distributed with this source code. */
+/*************************************************************************************/
+*}
+
+
+ {intl l='Redirect all urls' d="rewriteurl.bo.default"}
+
+
+
+
+ {intl l="Redirect all urls on a (category, product, folder, content, brand)." d="rewriteurl.bo.default"}
+
+ {intl l="This action is irreversible after confirmation." d="rewriteurl.bo.default"}
+
\ No newline at end of file
diff --git a/domokits/local/modules/RewriteUrl/templates/backOffice/default/RewriteUrl/tab-value-render.html b/domokits/local/modules/RewriteUrl/templates/backOffice/default/RewriteUrl/tab-value-render.html
new file mode 100644
index 0000000..dcce3e7
--- /dev/null
+++ b/domokits/local/modules/RewriteUrl/templates/backOffice/default/RewriteUrl/tab-value-render.html
@@ -0,0 +1,44 @@
+
+ {intl l="All your contents have rewriten urls" d="rewriteurl.bo.default"}
+
+ {/elseloop}
+
+
+
+
+
+
+
+
+{/block}
+
+{block name="javascript-initialization"}
+
+{/block}
\ No newline at end of file
diff --git a/domokits/local/modules/ShortCode/Config/TheliaMain.sql b/domokits/local/modules/ShortCode/Config/TheliaMain.sql
new file mode 100644
index 0000000..37f0982
--- /dev/null
+++ b/domokits/local/modules/ShortCode/Config/TheliaMain.sql
@@ -0,0 +1,25 @@
+
+# This is a fix for InnoDB in MySQL >= 4.1.x
+# It "suspends judgement" for fkey relationships until are tables are set.
+SET FOREIGN_KEY_CHECKS = 0;
+
+-- ---------------------------------------------------------------------
+-- short_code
+-- ---------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `short_code`;
+
+CREATE TABLE `short_code`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `tag` VARCHAR(55) NOT NULL,
+ `event` VARCHAR(255) NOT NULL,
+ `active` TINYINT,
+ `created_at` DATETIME,
+ `updated_at` DATETIME,
+ PRIMARY KEY (`id`),
+ UNIQUE INDEX `short_code_U_1` (`tag`)
+) ENGINE=InnoDB;
+
+# This restores the fkey checks, after having unset them earlier
+SET FOREIGN_KEY_CHECKS = 1;
diff --git a/domokits/local/modules/ShortCode/Config/config.xml b/domokits/local/modules/ShortCode/Config/config.xml
new file mode 100644
index 0000000..8f50daf
--- /dev/null
+++ b/domokits/local/modules/ShortCode/Config/config.xml
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/domokits/local/modules/ShortCode/Config/module.xml b/domokits/local/modules/ShortCode/Config/module.xml
new file mode 100644
index 0000000..a75ed8d
--- /dev/null
+++ b/domokits/local/modules/ShortCode/Config/module.xml
@@ -0,0 +1,43 @@
+
+
+ ShortCode\ShortCode
+
+ Add short codes Wordpress'ShortCode syntax
+
+
+
+ Ajoute les short codes avec la syntax wordpress
+
+
+
+
+ en_US
+ fr_FR
+
+ 2.0.0
+
+
+ Vincent Lopes-Vicente
+ vlopes@openstudio.fr
+
+
+ classic
+
+ 2.5.0
+ other
+ 0
+ 0
+
diff --git a/domokits/local/modules/ShortCode/Config/routing.xml b/domokits/local/modules/ShortCode/Config/routing.xml
new file mode 100644
index 0000000..480ce41
--- /dev/null
+++ b/domokits/local/modules/ShortCode/Config/routing.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
diff --git a/domokits/local/modules/ShortCode/Config/schema.xml b/domokits/local/modules/ShortCode/Config/schema.xml
new file mode 100644
index 0000000..ddd0c15
--- /dev/null
+++ b/domokits/local/modules/ShortCode/Config/schema.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/domokits/local/modules/ShortCode/Config/sqldb.map b/domokits/local/modules/ShortCode/Config/sqldb.map
new file mode 100644
index 0000000..63a93ba
--- /dev/null
+++ b/domokits/local/modules/ShortCode/Config/sqldb.map
@@ -0,0 +1,2 @@
+# Sqlfile -> Database map
+thelia.sql=thelia
diff --git a/domokits/local/modules/ShortCode/Event/ShortCodeEvent.php b/domokits/local/modules/ShortCode/Event/ShortCodeEvent.php
new file mode 100644
index 0000000..d3fb3ff
--- /dev/null
+++ b/domokits/local/modules/ShortCode/Event/ShortCodeEvent.php
@@ -0,0 +1,60 @@
+content = $content;
+ $this->attributes = $attributes;
+ $this->result = $content;
+ }
+
+ /**
+ * @return string
+ */
+ public function getContent()
+ {
+ return $this->content;
+ }
+
+ /**
+ * @return array
+ */
+ public function getAttributes()
+ {
+ return $this->attributes;
+ }
+
+ /**
+ * @return string
+ */
+ public function getResult()
+ {
+ return $this->result;
+ }
+
+ /**
+ * @param string $result
+ */
+ public function setResult($result)
+ {
+ $this->result = $result;
+ }
+}
\ No newline at end of file
diff --git a/domokits/local/modules/ShortCode/EventListener/ResponseListener.php b/domokits/local/modules/ShortCode/EventListener/ResponseListener.php
new file mode 100644
index 0000000..502aaf4
--- /dev/null
+++ b/domokits/local/modules/ShortCode/EventListener/ResponseListener.php
@@ -0,0 +1,95 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace ShortCode\EventListener;
+
+use Maiorano\Shortcodes\Library\SimpleShortcode;
+use Maiorano\Shortcodes\Manager\ShortcodeManager;
+use ShortCode\Event\ShortCodeEvent;
+use ShortCode\Model\ShortCode;
+use ShortCode\Model\ShortCodeQuery;
+use Symfony\Component\EventDispatcher\EventDispatcherInterface;
+use Symfony\Component\EventDispatcher\EventSubscriberInterface;
+use Symfony\Component\HttpFoundation\BinaryFileResponse;
+use Symfony\Component\HttpFoundation\JsonResponse;
+use Symfony\Component\HttpFoundation\RedirectResponse;
+use Symfony\Component\HttpFoundation\StreamedResponse;
+use Symfony\Component\HttpKernel\Event\ResponseEvent;
+use Symfony\Component\HttpKernel\KernelEvents;
+use Thelia\Log\Tlog;
+
+class ResponseListener implements EventSubscriberInterface
+{
+ /** @var EventDispatcherInterface */
+ protected $eventDispatcher;
+
+ public function __construct(
+ EventDispatcherInterface $eventDispatcher
+ ) {
+ $this->eventDispatcher = $eventDispatcher;
+ }
+
+ public static function getSubscribedEvents()
+ {
+ return [
+ KernelEvents::RESPONSE => [['dispatchShortCodeEvents', 64]],
+ ];
+ }
+
+ public function dispatchShortCodeEvents(ResponseEvent $event): void
+ {
+ if ($event->getRequest()->get('disable_shortcode', 0) == 1) {
+ return;
+ }
+
+ $response = $event->getResponse();
+
+ if (
+ $response instanceof BinaryFileResponse
+ || $response instanceof StreamedResponse
+ || $response instanceof RedirectResponse
+ || $response instanceof JsonResponse
+ ) {
+ return;
+ }
+
+ $dispatcher = $this->eventDispatcher;
+
+ $simpleShortCodes = [];
+
+ $shortCodes = ShortCodeQuery::create()
+ ->filterByActive(1)
+ ->find();
+
+ /** @var ShortCode $shortCode */
+ foreach ($shortCodes as $shortCode) {
+ $simpleShortCodes[$shortCode->getTag()] = new SimpleShortcode($shortCode->getTag(), null, function ($content, $attributes) use ($shortCode, $dispatcher) {
+ $shortCodeEvent = new ShortCodeEvent($content, $attributes);
+ $dispatcher->dispatch($shortCodeEvent, $shortCode->getEvent());
+
+ return $shortCodeEvent->getResult();
+ });
+ }
+
+ $manager = new ShortcodeManager($simpleShortCodes);
+
+ $content = $response->getContent();
+
+ try {
+ $content = $manager->doShortCode($content, null, true);
+ } catch (\Exception $exception) {
+ Tlog::getInstance()->error($exception->getMessage());
+ }
+
+ $response->setContent($content);
+ }
+}
diff --git a/domokits/local/modules/ShortCode/I18n/en_US.php b/domokits/local/modules/ShortCode/I18n/en_US.php
new file mode 100755
index 0000000..0b4fa14
--- /dev/null
+++ b/domokits/local/modules/ShortCode/I18n/en_US.php
@@ -0,0 +1,4 @@
+ 'The displayed english string',
+);
diff --git a/domokits/local/modules/ShortCode/I18n/fr_FR.php b/domokits/local/modules/ShortCode/I18n/fr_FR.php
new file mode 100755
index 0000000..3708624
--- /dev/null
+++ b/domokits/local/modules/ShortCode/I18n/fr_FR.php
@@ -0,0 +1,4 @@
+ 'La traduction française de la chaine',
+);
diff --git a/domokits/local/modules/ShortCode/LICENCE b/domokits/local/modules/ShortCode/LICENCE
new file mode 100644
index 0000000..3312f1f
--- /dev/null
+++ b/domokits/local/modules/ShortCode/LICENCE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
\ No newline at end of file
diff --git a/domokits/local/modules/ShortCode/Model/ShortCode.php b/domokits/local/modules/ShortCode/Model/ShortCode.php
new file mode 100644
index 0000000..4541fe4
--- /dev/null
+++ b/domokits/local/modules/ShortCode/Model/ShortCode.php
@@ -0,0 +1,10 @@
+/local/modules/``` directory and be sure that the name of the module is ShortCode.
+* Activate it in your thelia administration panel
+
+### Composer
+
+Add it in your main thelia composer.json file
+
+```
+composer require thelia/shortcode-module:~1.0
+```
+
+## Usage
+
+This module https://github.com/thelia-modules/ShortCodeMeta is a good example of how to use ShortCode.
+
+### 1. Register your short codes
+ You can do this at the post activation of your module. The best way to do this is to use the module method : `ShortCode::createNewShortCodeIfNotExist`
+ the first parameter is the name you will use to call the short code in your templates (like this `[my_shortcode_name], second parameter is the event dispatched when the short code is detected.
+
+### 2. Add short codes to your templates
+ The short codes syntax is as follows:
+ ```
+ [shortcode] - No content, no attributes
+ [shortcode]My Content[/shortcode] - Short code with content
+ [shortcode attribute=value foo=bar] - Short code with attributes
+ [shortcode attribute=value foo=bar]My Content[/shortcode] - Short code with content and attributes
+ ```
+
+### 3. Listen events associated to your short codes
+ When a short code is detected in response a `ShortCodeEvent` is dispatched with the event name given at the creation.
+ So if you want replace your short code by something you have to listen this event.
+ In this event you have 3 properties :
+ - `content` (string) The content between your tags it will be `My Content` for the example above.
+ - `attributes` (array) The array of all attributes passed to your short code `['attribute'=>'value', 'foo'=>'bar']` for the example above.
+ - `result` (string) Your short code will be replaced by this value in response (equal to content by default)
\ No newline at end of file
diff --git a/domokits/local/modules/ShortCode/ShortCode.php b/domokits/local/modules/ShortCode/ShortCode.php
new file mode 100644
index 0000000..029d9f0
--- /dev/null
+++ b/domokits/local/modules/ShortCode/ShortCode.php
@@ -0,0 +1,89 @@
+getConfigValue('is_initialized', false)) {
+ $database = new Database($con);
+
+ $database->insertSql(null, array(__DIR__ . '/Config/TheliaMain.sql'));
+
+ $this->setConfigValue('is_initialized', true);
+ }
+
+ return true;
+ }
+
+ /**
+ * Create a new ShortCode
+ * @param string $shortCodeName the name for call the ShortCode in template
+ * @param string $eventName the name of the event dispatched when shortcode is in template
+ * @throws PropelException
+ */
+ public static function createNewShortCodeIfNotExist($shortCodeName, $eventName)
+ {
+ if (null === ShortCodeQuery::create()->findOneByTag($shortCodeName)) {
+ $shortCode = new \ShortCode\Model\ShortCode();
+ $shortCode->setTag($shortCodeName)
+ ->setEvent($eventName)
+ ->setActive(1)
+ ->save();
+ }
+ }
+
+ /**
+ * Active a ShortCode by his name
+ * @param string $shortCodeName the name for call the ShortCode in template
+ * @throws PropelException
+ */
+ public static function activateShortCode($shortCodeName)
+ {
+ $shortCode = ShortCodeQuery::create()
+ ->filterByTag($shortCodeName)
+ ->findOne();
+
+ if (null !== $shortCode) {
+ $shortCode->setActive(1)
+ ->save();
+ }
+ }
+
+ /**
+ * Deactive a ShortCode by his name
+ * @param string $shortCodeName the name for call the ShortCode in template
+ * @throws PropelException
+ */
+ public static function deactivateShortCode($shortCodeName)
+ {
+ $shortCode = ShortCodeQuery::create()
+ ->filterByTag($shortCodeName)
+ ->findOne();
+
+ if (null !== $shortCode) {
+ $shortCode->setActive(0)
+ ->save();
+ }
+ }
+}
diff --git a/domokits/local/modules/ShortCode/composer.json b/domokits/local/modules/ShortCode/composer.json
new file mode 100644
index 0000000..9f3e354
--- /dev/null
+++ b/domokits/local/modules/ShortCode/composer.json
@@ -0,0 +1,12 @@
+{
+ "name": "thelia/short-code-module",
+ "license": "LGPL-3.0+",
+ "type": "thelia-module",
+ "require": {
+ "thelia/installer": "~1.1",
+ "maiorano84/shortcodes": "v2.0.0-beta"
+ },
+ "extra": {
+ "installer-name": "ShortCode"
+ }
+}
\ No newline at end of file
diff --git a/domokits/local/modules/ShortCodeMeta/Config/config.xml b/domokits/local/modules/ShortCodeMeta/Config/config.xml
new file mode 100644
index 0000000..69c89e8
--- /dev/null
+++ b/domokits/local/modules/ShortCodeMeta/Config/config.xml
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/domokits/local/modules/ShortCodeMeta/Config/module.xml b/domokits/local/modules/ShortCodeMeta/Config/module.xml
new file mode 100644
index 0000000..60ca399
--- /dev/null
+++ b/domokits/local/modules/ShortCodeMeta/Config/module.xml
@@ -0,0 +1,40 @@
+
+
+ ShortCodeMeta\ShortCodeMeta
+
+ Add meta to header by short code
+
+
+
+ Ajoute des méta-données au header par les short codes
+
+
+
+
+ en_US
+ fr_FR
+
+ 2.0.0
+
+
+ Vincent Lopes-Vicente
+ vlopes@openstudio.fr
+
+
+ classic
+
+
+ ShortCode
+
+
+ 2.5.0
+ other
+ 0
+ 0
+
diff --git a/domokits/local/modules/ShortCodeMeta/Config/routing.xml b/domokits/local/modules/ShortCodeMeta/Config/routing.xml
new file mode 100644
index 0000000..f1bc5a9
--- /dev/null
+++ b/domokits/local/modules/ShortCodeMeta/Config/routing.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
diff --git a/domokits/local/modules/ShortCodeMeta/Config/schema.xml b/domokits/local/modules/ShortCodeMeta/Config/schema.xml
new file mode 100644
index 0000000..99ef826
--- /dev/null
+++ b/domokits/local/modules/ShortCodeMeta/Config/schema.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
diff --git a/domokits/local/modules/ShortCodeMeta/EventListener/ShortCodeListener.php b/domokits/local/modules/ShortCodeMeta/EventListener/ShortCodeListener.php
new file mode 100644
index 0000000..524fb69
--- /dev/null
+++ b/domokits/local/modules/ShortCodeMeta/EventListener/ShortCodeListener.php
@@ -0,0 +1,45 @@
+ [['checkEmptyPage', 128]],
+ ShortCodeMeta::PAGINATION_META_SHORT_CODE => [['addPaginationMeta', 128]],
+ ];
+ }
+
+ public function addPaginationMeta(ShortCodeEvent $event)
+ {
+ $attributes = $event->getAttributes();
+
+ if (!isset($attributes['rel'])) {
+ return;
+ }
+
+ $rel = $attributes['rel'];
+
+ $staticVariableName = strtoupper($attributes['rel']).'_PAGE_URL';
+
+ if (null !== $url = ShortCodeMeta::$$staticVariableName) {
+ $event->setResult('');
+ }
+ }
+
+ public function checkEmptyPage(ShortCodeEvent $event)
+ {
+ if (ShortCodeMeta::$IS_EMPTY_PAGE === true) {
+ $event->setResult('');
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/domokits/local/modules/ShortCodeMeta/I18n/en_US.php b/domokits/local/modules/ShortCodeMeta/I18n/en_US.php
new file mode 100755
index 0000000..0b4fa14
--- /dev/null
+++ b/domokits/local/modules/ShortCodeMeta/I18n/en_US.php
@@ -0,0 +1,4 @@
+ 'The displayed english string',
+);
diff --git a/domokits/local/modules/ShortCodeMeta/I18n/fr_FR.php b/domokits/local/modules/ShortCodeMeta/I18n/fr_FR.php
new file mode 100755
index 0000000..3708624
--- /dev/null
+++ b/domokits/local/modules/ShortCodeMeta/I18n/fr_FR.php
@@ -0,0 +1,4 @@
+ 'La traduction française de la chaine',
+);
diff --git a/domokits/local/modules/ShortCodeMeta/LICENSE b/domokits/local/modules/ShortCodeMeta/LICENSE
new file mode 100644
index 0000000..2152256
--- /dev/null
+++ b/domokits/local/modules/ShortCodeMeta/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019 OpenStudio
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/domokits/local/modules/ShortCodeMeta/Readme.md b/domokits/local/modules/ShortCodeMeta/Readme.md
new file mode 100644
index 0000000..d5df0ea
--- /dev/null
+++ b/domokits/local/modules/ShortCodeMeta/Readme.md
@@ -0,0 +1,54 @@
+# Short Code Meta
+
+ShortCodeMeta allow you to add meat in head for
+- Empty page (`noindex, nofollow`)
+- Pagination link
+
+## Installation
+
+### Manually
+
+* Copy the module into ```/local/modules/``` directory and be sure that the name of the module is ShortCodeMeta.
+* Activate it in your thelia administration panel
+
+### Composer
+
+Add it in your main thelia composer.json file
+
+```
+composer require thelia/short-code-meta-module:~1.0
+```
+
+## Usage
+
+This module use ShortCode (https://github.com/thelia-modules/ShortCode) to add metas in head after smarty has completly build the page.
+The short codes are automatically added in templates with the hook `main.head-bottom` so be sure you have this hook in your template layout.
+
+### Empty pages
+
+To add a meta `noindex, nofollow` to an empty page you have to inform the module with the smarty tag `{set_empty_page_meta}`
+All the page where this tag is present will have a noindex meta.
+For example if you use a loop product in your category page you can add this tag in your elseloop like this :
+```
+ {ifloop rel="product_list"}
+
+ {/ifloop}
+ {elseloop rel="product_list"}
+ {set_empty_page_meta}
+ {/elseloop}
+```
+With this, all categories page without products will not be indexed by robots.
+
+
+### Pagination meta link
+
+To add a `
+
+
+
+
+
+
+
+
+
diff --git a/domokits/local/modules/SmartyRedirection/Config/module.xml b/domokits/local/modules/SmartyRedirection/Config/module.xml
new file mode 100644
index 0000000..0fd9df3
--- /dev/null
+++ b/domokits/local/modules/SmartyRedirection/Config/module.xml
@@ -0,0 +1,26 @@
+
+
+ SmartyRedirection\SmartyRedirection
+
+ Redirection function for templates
+
+
+ Fonction de redirection pour les templates
+
+
+ en_US
+ fr_FR
+
+ 2.0.0
+
+
+ Benjamin Perche
+ bperche9@gmail.com
+
+
+ classic
+ 2.5.0
+ prod
+
diff --git a/domokits/local/modules/SmartyRedirection/LICENSE.txt b/domokits/local/modules/SmartyRedirection/LICENSE.txt
new file mode 100644
index 0000000..65c5ca8
--- /dev/null
+++ b/domokits/local/modules/SmartyRedirection/LICENSE.txt
@@ -0,0 +1,165 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
diff --git a/domokits/local/modules/SmartyRedirection/Readme.md b/domokits/local/modules/SmartyRedirection/Readme.md
new file mode 100644
index 0000000..ca6b070
--- /dev/null
+++ b/domokits/local/modules/SmartyRedirection/Readme.md
@@ -0,0 +1,39 @@
+# Smarty Redirection
+
+This module adds a smarty function to redirect the user directly from a template
+
+## Installation
+
+### Manually
+
+* Copy the module into ```/local/modules/``` directory and be sure that the name of the module is SmartyRedirection.
+* Activate it in your thelia administration panel
+
+### Composer
+
+Add it in your main thelia composer.json file
+
+```
+composer require thelia/smarty-redirection-module ~1.0.0
+```
+
+## Usage
+
+You can use the ```{redirect }``` function like ```{url }```.
+Only one parameter is specific to this function: ```status```.
+
+If this parameter isn't given, its value is 302. Otherwise, you can set it to 301 to define a permanent redirection in a template.
+
+## Example
+
+```smarty
+{if ! $foo}
+ {redirect path="/anywhere"}
+{/if}
+```
+
+```smarty
+{if ! $foo}
+ {redirect path="/anywhere" status=301}
+{/if}
+```
diff --git a/domokits/local/modules/SmartyRedirection/Smarty/Plugins/Redirect.php b/domokits/local/modules/SmartyRedirection/Smarty/Plugins/Redirect.php
new file mode 100644
index 0000000..36e286e
--- /dev/null
+++ b/domokits/local/modules/SmartyRedirection/Smarty/Plugins/Redirect.php
@@ -0,0 +1,62 @@
+
+ */
+class Redirect extends AbstractSmartyPlugin
+{
+ const DEFAULT_REDIRECTION_STATUS = 302;
+ /**
+ * @var UrlGenerator
+ */
+ protected $urlGeneratorPlugin;
+
+ public function __construct(UrlGenerator $urlGenerator)
+ {
+ $this->urlGeneratorPlugin = $urlGenerator;
+ }
+
+ /**
+ * @param $params
+ */
+ public function throwRedirect($params)
+ {
+ $status = static::DEFAULT_REDIRECTION_STATUS;
+
+ if (isset($params["status"])) {
+ $status = (int) $params["status"];
+ unset ($params["status"]);
+ }
+
+ throw new RedirectException($this->urlGeneratorPlugin->generateUrlFunction($params, $foo), $status);
+ }
+
+ /**
+ * @return array of SmartyPluginDescriptor
+ */
+ public function getPluginDescriptors()
+ {
+ return array(
+ new SmartyPluginDescriptor("function", "redirect", $this, "throwRedirect"),
+ );
+ }
+}
diff --git a/domokits/local/modules/SmartyRedirection/SmartyRedirection.php b/domokits/local/modules/SmartyRedirection/SmartyRedirection.php
new file mode 100644
index 0000000..23218ca
--- /dev/null
+++ b/domokits/local/modules/SmartyRedirection/SmartyRedirection.php
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/domokits/local/modules/StoreSeo/Config/module.xml b/domokits/local/modules/StoreSeo/Config/module.xml
new file mode 100755
index 0000000..10fa3c4
--- /dev/null
+++ b/domokits/local/modules/StoreSeo/Config/module.xml
@@ -0,0 +1,26 @@
+
+
+ StoreSeo\StoreSeo
+
+ Manage translations for your store main SEO meta
+
+
+ Gère les traductions des principales metas SEO de votre boutique
+
+
+ en_US
+ fr_FR
+
+ 2.0.1
+
+
+ Etienne Perriere
+ eperriere@openstudio.fr
+
+
+ classic
+ 2.5.0
+ other
+
diff --git a/domokits/local/modules/StoreSeo/Config/routing.xml b/domokits/local/modules/StoreSeo/Config/routing.xml
new file mode 100755
index 0000000..b2ce795
--- /dev/null
+++ b/domokits/local/modules/StoreSeo/Config/routing.xml
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/domokits/local/modules/StoreSeo/Controller/StoreSeoConfigController.php b/domokits/local/modules/StoreSeo/Controller/StoreSeoConfigController.php
new file mode 100755
index 0000000..990414f
--- /dev/null
+++ b/domokits/local/modules/StoreSeo/Controller/StoreSeoConfigController.php
@@ -0,0 +1,97 @@
+
+ */
+class StoreSeoConfigController extends BaseAdminController
+{
+ /**
+ * @Route("/admin/module/StoreSeo", name="storeseo_configuration_default", methods="GET")
+ */
+ public function defaultAction()
+ {
+ if (null !== $response = $this->checkAuth([AdminResources::MODULE], ["storeseo"], AccessManager::VIEW)) {
+ return $response;
+ }
+
+ // Get current edition language locale
+ $locale = $this->getCurrentEditionLocale();
+
+ $form = $this->createForm(
+ "storeseo_form_config",
+ FormType::class,
+ [
+ 'title' => StoreSeo::getConfigValue('title', null, $locale),
+ 'description' => StoreSeo::getConfigValue('description', null, $locale),
+ 'keywords' => StoreSeo::getConfigValue('keywords', null, $locale)
+ ]
+ );
+
+ $this->getParserContext()->addForm($form);
+
+ return $this->render("storeseo-configuration");
+ }
+
+ /**
+ * @Route("/admin/module/StoreSeo", name="storeseo_configuration_save", methods="POST")
+ */
+ public function saveAction()
+ {
+ if (null !== $response = $this->checkAuth([AdminResources::MODULE], ["storeseo"], AccessManager::UPDATE)) {
+ return $response;
+ }
+
+ $baseForm = $this->createForm("storeseo_form_config");
+
+ $errorMessage = null;
+
+ // Get current edition language locale
+ $locale = $this->getCurrentEditionLocale();
+
+ try {
+ $form = $this->validateForm($baseForm);
+ $data = $form->getData();
+
+ // Save data
+ StoreSeo::setConfigValue('title', $data["title"], $locale);
+ StoreSeo::setConfigValue('description', $data["description"], $locale);
+ StoreSeo::setConfigValue('keywords', $data["keywords"], $locale);
+
+ } catch (FormValidationException $ex) {
+ // Invalid data entered
+ $errorMessage = $this->createStandardFormValidationErrorMessage($ex);
+ } catch (\Exception $ex) {
+ // Any other error
+ $errorMessage = $this->getTranslator()->trans('Sorry, an error occurred: %err', ['%err' => $ex->getMessage()], StoreSeo::DOMAIN_NAME, $locale);
+ }
+
+ if (null !== $errorMessage) {
+ // Mark the form as with error
+ $baseForm->setErrorMessage($errorMessage);
+
+ // Send the form and the error to the parser
+ $this->getParserContext()
+ ->addForm($baseForm)
+ ->setGeneralError($errorMessage)
+ ;
+ } else {
+ $this->getParserContext()
+ ->set("success", true)
+ ;
+ }
+
+ return $this->defaultAction();
+ }
+}
diff --git a/domokits/local/modules/StoreSeo/Form/StoreSeoForm.php b/domokits/local/modules/StoreSeo/Form/StoreSeoForm.php
new file mode 100755
index 0000000..1c66d32
--- /dev/null
+++ b/domokits/local/modules/StoreSeo/Form/StoreSeoForm.php
@@ -0,0 +1,38 @@
+formBuilder
+ ->add(
+ 'title',
+ TextType::class,
+ ['label' => $this->translator->trans('Store name', [], 'storeseo.fo.default')]
+ )
+ ->add(
+ 'description',
+ TextType::class,
+ ['label' => $this->translator->trans('Store description', [], 'storeseo.fo.default')]
+ )
+ ->add(
+ 'keywords',
+ TextType::class,
+ ['label' => $this->translator->trans('Keywords', [], 'storeseo.fo.default')]
+ )
+ ;
+ }
+}
diff --git a/domokits/local/modules/StoreSeo/Hook/StoreSeoHook.php b/domokits/local/modules/StoreSeo/Hook/StoreSeoHook.php
new file mode 100755
index 0000000..4abb755
--- /dev/null
+++ b/domokits/local/modules/StoreSeo/Hook/StoreSeoHook.php
@@ -0,0 +1,19 @@
+
+ */
+class StoreSeoHook extends BaseHook
+{
+ public function onModuleConfig(HookRenderEvent $event)
+ {
+ $event->add($this->render('storeseo-configuration.html'));
+ }
+}
\ No newline at end of file
diff --git a/domokits/local/modules/StoreSeo/I18n/backOffice/default/en_US.php b/domokits/local/modules/StoreSeo/I18n/backOffice/default/en_US.php
new file mode 100755
index 0000000..78ab426
--- /dev/null
+++ b/domokits/local/modules/StoreSeo/I18n/backOffice/default/en_US.php
@@ -0,0 +1,9 @@
+ 'Configuration correctly saved',
+ 'Configure StoreSEO' => 'Configure StoreSEO',
+ 'Home' => 'Home',
+ 'Modules' => 'Modules',
+ 'StoreSeo configuration' => 'StoreSEO configuration',
+);
diff --git a/domokits/local/modules/StoreSeo/I18n/backOffice/default/fr_FR.php b/domokits/local/modules/StoreSeo/I18n/backOffice/default/fr_FR.php
new file mode 100755
index 0000000..ca86d96
--- /dev/null
+++ b/domokits/local/modules/StoreSeo/I18n/backOffice/default/fr_FR.php
@@ -0,0 +1,9 @@
+ 'Configuration correctement sauvegardée',
+ 'Configure StoreSEO' => 'Configurer StoreSEO',
+ 'Home' => 'Accueil',
+ 'Modules' => 'Modules',
+ 'StoreSeo configuration' => 'Configuration de StoreSEO',
+);
diff --git a/domokits/local/modules/StoreSeo/I18n/en_US.php b/domokits/local/modules/StoreSeo/I18n/en_US.php
new file mode 100755
index 0000000..cc80e0e
--- /dev/null
+++ b/domokits/local/modules/StoreSeo/I18n/en_US.php
@@ -0,0 +1,8 @@
+ 'Keywords',
+ 'Sorry, an error occurred: %err' => 'Sorry, an error occurred: %err',
+ 'Store description' => 'Store description',
+ 'Store name' => 'Store name',
+);
diff --git a/domokits/local/modules/StoreSeo/I18n/fr_FR.php b/domokits/local/modules/StoreSeo/I18n/fr_FR.php
new file mode 100755
index 0000000..cef43d6
--- /dev/null
+++ b/domokits/local/modules/StoreSeo/I18n/fr_FR.php
@@ -0,0 +1,8 @@
+ 'Mots-clés',
+ 'Sorry, an error occurred: %err' => 'Désolé, une erreur s\'est produite : %err',
+ 'Store description' => 'Description de la boutique',
+ 'Store name' => 'Nom de la boutique',
+);
diff --git a/domokits/local/modules/StoreSeo/Readme.md b/domokits/local/modules/StoreSeo/Readme.md
new file mode 100755
index 0000000..46e696c
--- /dev/null
+++ b/domokits/local/modules/StoreSeo/Readme.md
@@ -0,0 +1,56 @@
+# Store Seo
+
+Manage translation for your store SEO meta.
+
+## Installation
+
+### Manually
+
+* Copy the module into ```/local/modules/``` directory and be sure that the name of the module is StoreSeo.
+* Activate it in your thelia administration panel
+
+### Composer
+
+Add it in your main thelia composer.json file
+
+```
+composer require thelia/store-seo-module:~1.2.0
+```
+
+## Usage
+
+Once activated, click on the configuration button of the module.
+
+Then, select one of your store available language and fill inputs with your store title, description and keywords. Save and do it for each of your language.
+
+They will be used on pages with no SEO meta configured.
+
+## Integration
+
+Open the layout.tpl file of your template.
+
+Check the ```Define some stuff for Smarty``` section at the top of the file, and be sur that you have this assignation:
+
+```
+{assign var="lang_locale" value={lang attr="locale"}}
+```
+
+
+Add this line in the `````` section, before the `````` tag :
+
+```
+{store_seo_meta locale=$lang_locale}
+```
+
+
+Also add this in the ```{block name="meta"}```, after the `````` tag :
+
+```
+{if $page_keywords}
+
+{else}
+
+{/if}
+```
+
+Finally, be sure that you have no ```{$page_title = {config key="store_name"}}``` declaration in your other template files.
diff --git a/domokits/local/modules/StoreSeo/Smarty/Plugins/StoreSeoPlugin.php b/domokits/local/modules/StoreSeo/Smarty/Plugins/StoreSeoPlugin.php
new file mode 100755
index 0000000..5293726
--- /dev/null
+++ b/domokits/local/modules/StoreSeo/Smarty/Plugins/StoreSeoPlugin.php
@@ -0,0 +1,48 @@
+
+ */
+class StoreSeoPlugin extends AbstractSmartyPlugin
+{
+
+ /**
+ * @return SmartyPluginDescriptor[] an array of SmartyPluginDescriptor
+ */
+ public function getPluginDescriptors()
+ {
+ return [
+ new SmartyPluginDescriptor("function", "store_seo_meta", $this, "changeSeoMeta")
+ ];
+ }
+
+ /**
+ * Assign meta title, description and keyword for the template
+ *
+ * @param array $params
+ * @param \Smarty $smarty
+ */
+ public function changeSeoMeta($params, &$smarty)
+ {
+ // Get language and moduleConfig
+ $locale = $params['locale'];
+
+ // Get store title
+ $smarty->assign("store_name", StoreSeo::getConfigValue('title', null, $locale));
+
+ // Get store description
+ $smarty->assign("store_description", StoreSeo::getConfigValue('description', null, $locale));
+
+ // Get store keywords
+ $smarty->assign("default_keywords", StoreSeo::getConfigValue('keywords', null, $locale));
+ }
+}
\ No newline at end of file
diff --git a/domokits/local/modules/StoreSeo/StoreSeo.php b/domokits/local/modules/StoreSeo/StoreSeo.php
new file mode 100755
index 0000000..a60000d
--- /dev/null
+++ b/domokits/local/modules/StoreSeo/StoreSeo.php
@@ -0,0 +1,42 @@
+
+ */
+class StoreSeo extends BaseModule
+{
+ /** @var string */
+ const DOMAIN_NAME = 'storeseo';
+
+ /*
+ * You may now override BaseModuleInterface methods, such as:
+ * install, destroy, preActivation, postActivation, preDeactivation, postDeactivation
+ *
+ * Have fun !
+ */
+
+ public static function configureServices(ServicesConfigurator $servicesConfigurator): void
+ {
+ $servicesConfigurator->load(self::getModuleCode().'\\', __DIR__)
+ ->exclude([THELIA_MODULE_DIR . ucfirst(self::getModuleCode()). "/I18n/*"])
+ ->autowire(true)
+ ->autoconfigure(true);
+ }
+}
diff --git a/domokits/local/modules/StoreSeo/composer.json b/domokits/local/modules/StoreSeo/composer.json
new file mode 100755
index 0000000..89142ec
--- /dev/null
+++ b/domokits/local/modules/StoreSeo/composer.json
@@ -0,0 +1,11 @@
+{
+ "name": "thelia/store-seo-module",
+ "license": "LGPL-3.0+",
+ "type": "thelia-module",
+ "require": {
+ "thelia/installer": "~1.1"
+ },
+ "extra": {
+ "installer-name": "StoreSeo"
+ }
+}
diff --git a/domokits/local/modules/StoreSeo/templates/backOffice/default/storeseo-configuration.html b/domokits/local/modules/StoreSeo/templates/backOffice/default/storeseo-configuration.html
new file mode 100755
index 0000000..309df8c
--- /dev/null
+++ b/domokits/local/modules/StoreSeo/templates/backOffice/default/storeseo-configuration.html
@@ -0,0 +1,98 @@
+{extends file="admin-layout.tpl"}
+
+{block name="no-return-functions"}
+{$admin_current_location = 'modules'}
+{/block}
+
+{block name="page-title"}{intl d="storeseo.bo.default" l='StoreSeo configuration'}{/block}
+
+{block name="check-resource"}admin.module{/block}
+{block name="check-access"}view{/block}
+{block name="check-module"}StoreSeo{/block}
+
+{block name="main-content"}
+
+{/block}
diff --git a/domokits/local/modules/StripePayment/Classes/StripePaymentException.php b/domokits/local/modules/StripePayment/Classes/StripePaymentException.php
new file mode 100644
index 0000000..633ef04
--- /dev/null
+++ b/domokits/local/modules/StripePayment/Classes/StripePaymentException.php
@@ -0,0 +1,13 @@
+
+ */
+class StripePaymentException extends \Exception
+{
+
+}
\ No newline at end of file
diff --git a/domokits/local/modules/StripePayment/Classes/StripePaymentLog.php b/domokits/local/modules/StripePayment/Classes/StripePaymentLog.php
new file mode 100644
index 0000000..f89d5dd
--- /dev/null
+++ b/domokits/local/modules/StripePayment/Classes/StripePaymentLog.php
@@ -0,0 +1,60 @@
+
+ */
+class StripePaymentLog
+{
+ const EMERGENCY = 'EMERGENCY';
+ const ALERT = 'ALERT';
+ const CRITICAL = 'CRITICAL';
+ const ERROR = 'ERROR';
+ const WARNING = 'WARNING';
+ const NOTICE = 'NOTICE';
+ const INFO = 'INFO';
+ const DEBUG = 'DEBUG';
+ const LOGCLASS = "\\Thelia\\Log\\Destination\\TlogDestinationFile";
+
+ /** @var Tlog $log */
+ protected $log;
+
+ /**
+ * Log a message
+ *
+ * @param string $message Message
+ * @param string $severity EMERGENCY|ALERT|CRITICAL|ERROR|WARNING|NOTICE|INFO|DEBUG
+ * @param string $category Category
+ */
+ public function logText($message, $severity = 'ALERT', $category = 'stripe')
+ {
+ $this->setTLogStripe();
+ $msg = "$category.$severity: $message";
+ $this->log->info($msg);
+ // Back to previous state
+ $this->getBackToPreviousState();
+ }
+
+ /**
+ * @return Tlog
+ */
+ protected function setTLogStripe()
+ {
+ /*
+ * Write Log
+ */
+ $this->log = Tlog::getInstance();
+ $this->log->setDestinations(self::LOGCLASS);
+ $this->log->setConfig(self::LOGCLASS, 0, THELIA_ROOT . "log" . DS . "log-stripe.txt");
+ }
+
+ protected function getBackToPreviousState()
+ {
+ $this->log->setDestinations("\\Thelia\\Log\\Destination\\TlogDestinationRotatingFile");
+ }
+}
\ No newline at end of file
diff --git a/domokits/local/modules/StripePayment/Config/config.xml b/domokits/local/modules/StripePayment/Config/config.xml
new file mode 100644
index 0000000..571db36
--- /dev/null
+++ b/domokits/local/modules/StripePayment/Config/config.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/domokits/local/modules/StripePayment/Config/module.xml b/domokits/local/modules/StripePayment/Config/module.xml
new file mode 100644
index 0000000..e28c711
--- /dev/null
+++ b/domokits/local/modules/StripePayment/Config/module.xml
@@ -0,0 +1,24 @@
+
+
+ StripePayment\StripePayment
+
+ Stripe
+
+
+ Stripe
+
+
+ en_US
+ fr_FR
+
+ 3.0.1
+
+ Etienne Perriere
+ eperriere@openstudio.fr
+
+ payment
+ 2.5.0
+ other
+
diff --git a/domokits/local/modules/StripePayment/Config/routing.xml b/domokits/local/modules/StripePayment/Config/routing.xml
new file mode 100644
index 0000000..7b1c007
--- /dev/null
+++ b/domokits/local/modules/StripePayment/Config/routing.xml
@@ -0,0 +1,30 @@
+
+
+
+
diff --git a/domokits/local/modules/StripePayment/Config/schema.xml b/domokits/local/modules/StripePayment/Config/schema.xml
new file mode 100644
index 0000000..5385763
--- /dev/null
+++ b/domokits/local/modules/StripePayment/Config/schema.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/domokits/local/modules/StripePayment/Controller/StripePaymentConfigController.php b/domokits/local/modules/StripePayment/Controller/StripePaymentConfigController.php
new file mode 100644
index 0000000..62a5b7a
--- /dev/null
+++ b/domokits/local/modules/StripePayment/Controller/StripePaymentConfigController.php
@@ -0,0 +1,75 @@
+checkAuth([AdminResources::MODULE], ["stripepayment"], AccessManager::UPDATE)) {
+ return $response;
+ }
+
+ $baseForm = $this->createForm(StripePaymentConfigForm::getName());
+
+ $errorMessage = null;
+
+ try {
+ $form = $this->validateForm($baseForm);
+ $data = $form->getData();
+ StripePayment::setConfigValue(StripePayment::ENABLED, is_bool($data["enabled"]) ? (int) ($data["enabled"]) : $data["enabled"]);
+ StripePayment::setConfigValue(StripePayment::STRIPE_ELEMENT, is_bool($data["stripe_element"]) ? (int) ($data["stripe_element"]) : $data["stripe_element"]);
+ StripePayment::setConfigValue(StripePayment::ONE_CLICK_PAYMENT, is_bool($data["one_click_payment"]) ? (int) ($data["one_click_payment"]) : $data["one_click_payment"]);
+ StripePayment::setConfigValue(StripePayment::SECRET_KEY, is_bool($data["secret_key"]) ? (int) ($data["secret_key"]) : $data["secret_key"]);
+ StripePayment::setConfigValue(StripePayment::PUBLISHABLE_KEY, is_bool($data["publishable_key"]) ? (int) ($data["publishable_key"]) : $data["publishable_key"]);
+ StripePayment::setConfigValue(StripePayment::WEBHOOKS_KEY, is_bool($data["webhooks_key"]) ? (int) ($data["webhooks_key"]) : $data["webhooks_key"]);
+ StripePayment::setConfigValue(StripePayment::SECURE_URL, is_bool($data["secure_url"]) ? (int) ($data["secure_url"]) : $data["secure_url"]);
+ } catch (FormValidationException $ex) {
+ // Invalid data entered
+ $errorMessage = $this->createStandardFormValidationErrorMessage($ex);
+ } catch (\Exception $ex) {
+ // Any other error
+ $errorMessage = Translator::getInstance()->trans('Sorry, an error occurred: %err', ['%err' => $ex->getMessage()], "", StripePayment::MESSAGE_DOMAIN);
+ }
+
+ if (null !== $errorMessage) {
+ // Mark the form as with error
+ $baseForm->setErrorMessage($errorMessage);
+
+ // Send the form and the error to the parser
+ $context
+ ->addForm($baseForm)
+ ->setGeneralError($errorMessage)
+ ;
+ } else {
+ $context
+ ->set("success", true)
+ ;
+ }
+
+ return $this->generateRedirect(URL::getInstance()->absoluteUrl('/admin/module/StripePayment'));
+ }
+}
diff --git a/domokits/local/modules/StripePayment/Controller/StripePaymentController.php b/domokits/local/modules/StripePayment/Controller/StripePaymentController.php
new file mode 100644
index 0000000..ec099ad
--- /dev/null
+++ b/domokits/local/modules/StripePayment/Controller/StripePaymentController.php
@@ -0,0 +1,24 @@
+
+ */
+class StripePaymentController extends BasePaymentModuleController
+{
+ /**
+ * Return a module identifier used to calculate the name of the log file,
+ * and in the log messages.
+ *
+ * @return string the module code
+ */
+ protected function getModuleCode()
+ {
+ return 'StripePayment';
+ }
+}
\ No newline at end of file
diff --git a/domokits/local/modules/StripePayment/Controller/StripeWebHooksController.php b/domokits/local/modules/StripePayment/Controller/StripeWebHooksController.php
new file mode 100644
index 0000000..2e0deb6
--- /dev/null
+++ b/domokits/local/modules/StripePayment/Controller/StripeWebHooksController.php
@@ -0,0 +1,149 @@
+logText(serialize($event));
+
+ // Handle the event
+ switch ($event->type) {
+ case 'checkout.session.completed':
+ /** @var Session $sessionCompleted */
+ $sessionCompleted = $event->data->object;
+ $this->handleSessionCompleted($sessionCompleted, $dispatcher);
+ break;
+ case 'payment_intent.succeeded':
+ // Needed to wait for order to be created (Stripe is faster than Thelia)
+ sleep(5);
+ /** @var Session $sessionCompleted */
+ $paymentId = $event->data->object->id;
+ $this->handlePaymentIntentSuccess($paymentId, $dispatcher);
+ break;
+ case 'payment_intent.payment_failed':
+ // Needed to wait for order to be created (Stripe is faster than Thelia)
+ sleep(5);
+ /** @var Session $sessionCompleted */
+ $paymentId = $event->data->object->id;
+ $this->handlePaymentIntentFail($paymentId, $dispatcher);
+ break;
+ default:
+ // Unexpected event type
+ (new StripePaymentLog())->logText('Unexpected event type');
+
+ return new Response('Unexpected event type', 400);
+ }
+
+ return new Response('Success', 200);
+ } catch (\UnexpectedValueException $e) {
+ // Invalid payload
+ (new StripePaymentLog())->logText($e->getMessage());
+ return new Response('Invalid payload', 400);
+ } catch (SignatureVerification $e) {
+ return new Response($e->getMessage(), 400);
+ } catch (\Exception $e) {
+ return new Response($e->getMessage(), 404);
+ }
+ }
+
+ return new Response('Bad request', 400);
+ }
+
+ protected function handleSessionCompleted(Session $sessionCompleted, EventDispatcherInterface $dispatcher)
+ {
+ $order = OrderQuery::create()
+ ->findOneByRef($sessionCompleted->client_reference_id);
+
+ if (null === $order) {
+ throw new \Exception("Order with reference $sessionCompleted->client_reference_id not found");
+ }
+
+ $this->setOrderToPaid($order, $dispatcher);
+ }
+
+ protected function handlePaymentIntentSuccess($paymentId, EventDispatcherInterface $dispatcher)
+ {
+ $order = OrderQuery::create()
+ ->findOneByTransactionRef($paymentId);
+
+ if (null === $order) {
+ throw new \Exception("Order with transaction ref $paymentId not found");
+ }
+
+ $this->setOrderToPaid($order, $dispatcher);
+ }
+
+ protected function handlePaymentIntentFail($paymentId, EventDispatcherInterface $dispatcher)
+ {
+ $order = OrderQuery::create()
+ ->findOneByTransactionRef($paymentId);
+
+ if (null === $order) {
+ throw new \Exception("Order with transaction ref $paymentId not found");
+ }
+
+ $this->setOrderToCanceled($order, $dispatcher);
+ }
+
+ protected function setOrderToPaid($order, EventDispatcherInterface $dispatcher)
+ {
+ $paidStatusId = OrderStatusQuery::create()
+ ->filterByCode('paid')
+ ->select('ID')
+ ->findOne();
+
+ $event = new OrderEvent($order);
+ $event->setStatus($paidStatusId);
+ $dispatcher->dispatch($event, TheliaEvents::ORDER_UPDATE_STATUS);
+ }
+
+ protected function setOrderToCanceled($order, EventDispatcherInterface $dispatcher)
+ {
+ $canceledStatusId = OrderStatusQuery::create()
+ ->filterByCode('canceled')
+ ->select('ID')
+ ->findOne();
+
+ $event = new OrderEvent($order);
+ $event->setStatus($canceledStatusId);
+ $dispatcher->dispatch($event, TheliaEvents::ORDER_UPDATE_STATUS);
+ }
+}
diff --git a/domokits/local/modules/StripePayment/EventListeners/CartEventListener.php b/domokits/local/modules/StripePayment/EventListeners/CartEventListener.php
new file mode 100644
index 0000000..3b27f14
--- /dev/null
+++ b/domokits/local/modules/StripePayment/EventListeners/CartEventListener.php
@@ -0,0 +1,212 @@
+request = $requestStack->getCurrentRequest();
+ $this->dispatcher = $dispatcher;
+ $this->taxEngine = $taxEngine;
+ }
+
+ public static function getSubscribedEvents()
+ {
+ $events = [
+ TheliaEvents::CART_RESTORE_CURRENT => ["createOrUpdatePaymentIntent", 64],
+ TheliaEvents::CART_CREATE_NEW => ["createOrUpdatePaymentIntent", 64],
+ TheliaEvents::CART_ADDITEM => ["createOrUpdatePaymentIntent", 64],
+ TheliaEvents::CART_DELETEITEM => ["createOrUpdatePaymentIntent", 64],
+ TheliaEvents::CART_UPDATEITEM => ["createOrUpdatePaymentIntent", 64],
+ TheliaEvents::CART_CLEAR => ["createOrUpdatePaymentIntent", 64],
+ TheliaEvents::CHANGE_DEFAULT_CURRENCY => ["createOrUpdatePaymentIntent", 64],
+ TheliaEvents::ORDER_SET_POSTAGE => [ "createOrUpdatePaymentIntent", 64 ]
+ ];
+
+ return $events;
+ }
+
+ public function createOrUpdatePaymentIntent(ActionEvent $event)
+ {
+ $secretKey = StripePayment::getConfigValue('secret_key');
+ Stripe::setApiKey($secretKey);
+
+ /** @var Session $session */
+ $session = $this->request->getSession();
+
+ $paymentIntentValues = $this->getPaymentIntentValues($event);
+
+ if (false === $paymentIntentValues) {
+ return;
+ }
+
+ if (
+ $session->has(StripePayment::PAYMENT_INTENT_ID_SESSION_KEY)
+ &&
+ null !== $paymentId = $session->get(StripePayment::PAYMENT_INTENT_ID_SESSION_KEY)
+ )
+ {
+
+ $payment = PaymentIntent::update(
+ $paymentId,
+ $paymentIntentValues
+ );
+ $session->set(StripePayment::PAYMENT_INTENT_SECRET_SESSION_KEY, $payment->client_secret);
+
+ return;
+ }
+ try {
+ /** @var PaymentIntent $payment */
+ $payment = PaymentIntent::create($paymentIntentValues);
+
+ $session->set(StripePayment::PAYMENT_INTENT_ID_SESSION_KEY, $payment->id);
+ $session->set(StripePayment::PAYMENT_INTENT_SECRET_SESSION_KEY, $payment->client_secret);
+ } catch (\Exception $exception){
+ Tlog::getInstance()->addAlert($exception->getMessage());
+ }
+
+ return;
+ }
+
+
+ protected function getPaymentIntentValues(ActionEvent $event)
+ {
+ /** @var Session $session */
+ $session = $this->request->getSession();
+ $currency = $session->getCurrency();
+
+ $data = $this->getCartAndOrderFromEvent($event);
+
+ if (false === $data) {
+ return false;
+ }
+
+ /** @var Cart $cart */
+ $cart = $data['cart'];
+
+ /** @var Order $order */
+ $order = $data['order'];
+
+ $postageAmount = floatval($order->getPostage());
+
+ $country = $this->taxEngine->getDeliveryCountry();
+
+ $cartAmount = floatval($cart->getTaxedAmount($country));
+
+ $totalAmount = ($postageAmount + $cartAmount) * 100;
+
+ if (!$totalAmount > 0) {
+ return false;
+ }
+
+ $values = [
+ 'amount' => intval(round($totalAmount)),
+ 'currency' => strtolower($currency->getCode())
+ ];
+
+ if (null !== $stripeCustomerId = $this->getStripeCustomerId($session)) {
+ $values['customer'] = $stripeCustomerId;
+ }
+
+ return $values;
+ }
+
+ protected function getStripeCustomerId(Session $session)
+ {
+ if (null === $session->getCustomerUser()) {
+ return null;
+ }
+
+ if (!$session->has(StripePayment::PAYMENT_INTENT_CUSTOMER_ID_SESSION_KEY)) {
+ /** @var Customer $customer */
+ $customer = $session->getCustomerUser();
+ $email = $customer->getEmail();
+
+ $stripeCustomer = \Stripe\Customer::create([
+ 'email' => $email
+ ]);
+
+ $session->set(StripePayment::PAYMENT_INTENT_CUSTOMER_ID_SESSION_KEY, $stripeCustomer->id);
+ }
+
+ return $session->get(StripePayment::PAYMENT_INTENT_CUSTOMER_ID_SESSION_KEY);
+ }
+
+ protected function getCartAndOrderFromEvent(ActionEvent $event)
+ {
+ /** @var Session $session */
+ $session = $this->request->getSession();
+
+ if ($event instanceof CartRestoreEvent) {
+ return [
+ 'cart' => $event->getCart(),
+ 'order' => $session->getOrder()
+ ];
+ }
+
+ if ($event instanceof CartCreateEvent) {
+ return [
+ 'cart' => $event->getCart(),
+ 'order' => $session->getOrder()
+ ];
+ }
+
+ if ($event instanceof CartEvent) {
+ return [
+ 'cart' => $event->getCart(),
+ 'order' => $session->getOrder()
+ ];
+ }
+
+ if ($event instanceof CurrencyChangeEvent) {
+ return [
+ 'cart' => $session->getSessionCart($this->dispatcher),
+ 'order' => $session->getOrder()
+ ];
+ }
+
+ if ($event instanceof OrderEvent) {
+ return [
+ 'cart' => $session->getSessionCart($this->dispatcher),
+ 'order' => $event->getOrder()
+ ];
+ }
+
+ return false;
+ }
+}
\ No newline at end of file
diff --git a/domokits/local/modules/StripePayment/EventListeners/SendConfirmationEmailListener.php b/domokits/local/modules/StripePayment/EventListeners/SendConfirmationEmailListener.php
new file mode 100644
index 0000000..2a89ebc
--- /dev/null
+++ b/domokits/local/modules/StripePayment/EventListeners/SendConfirmationEmailListener.php
@@ -0,0 +1,75 @@
+parser = $parser;
+ $this->mailer = $mailer;
+ $this->eventDispatcher = $eventDispatcher;
+ }
+
+ /**
+ * @return MailerFactory
+ */
+ public function getMailer()
+ {
+ return $this->mailer;
+ }
+
+ public function updateOrderStatus(OrderEvent $event)
+ {
+ $stripe = new StripePayment();
+
+ if ($event->getOrder()->isPaid() && $stripe->isPaymentModuleFor($event->getOrder())) {
+ $this->eventDispatcher->dispatch($event, TheliaEvents::ORDER_SEND_CONFIRMATION_EMAIL);
+ $this->eventDispatcher->dispatch($event, TheliaEvents::ORDER_SEND_NOTIFICATION_EMAIL);
+ }
+ }
+
+
+ public function cancelOrderConfirmationEmail(OrderEvent $event)
+ {
+ $stripe = new StripePayment();
+
+ if ($stripe->isPaymentModuleFor($event->getOrder()) && !$event->getOrder()->isPaid()) {
+ $event->stopPropagation();
+ }
+ }
+
+ public static function getSubscribedEvents()
+ {
+ return array(
+ TheliaEvents::ORDER_UPDATE_STATUS => array("updateOrderStatus", 128),
+ TheliaEvents::ORDER_SEND_NOTIFICATION_EMAIL => array("cancelOrderConfirmationEmail", 150),
+ TheliaEvents::ORDER_SEND_CONFIRMATION_EMAIL => array("cancelOrderConfirmationEmail", 150)
+ );
+ }
+
+}
\ No newline at end of file
diff --git a/domokits/local/modules/StripePayment/Form/Base/StripePaymentConfigForm.php b/domokits/local/modules/StripePayment/Form/Base/StripePaymentConfigForm.php
new file mode 100644
index 0000000..0b83966
--- /dev/null
+++ b/domokits/local/modules/StripePayment/Form/Base/StripePaymentConfigForm.php
@@ -0,0 +1,208 @@
+formBuilder attribute :
+ *
+ * $this->formBuilder->add("name", "text")
+ * ->add("email", "email", array(
+ * "attr" => array(
+ * "class" => "field"
+ * ),
+ * "label" => "email",
+ * "constraints" => array(
+ * new \Symfony\Component\Validator\Constraints\NotBlank()
+ * )
+ * )
+ * )
+ * ->add('age', 'integer');
+ *
+ * @return null
+ */
+ protected function buildForm()
+ {
+ $translationKeys = $this->getTranslationKeys();
+ $fieldsIdKeys = $this->getFieldsIdKeys();
+
+ $this->addEnabledField($translationKeys, $fieldsIdKeys);
+ $this->addStripeElementField($translationKeys, $fieldsIdKeys);
+ $this->addOneClickPaymentField($translationKeys, $fieldsIdKeys);
+ $this->addSecretKeyField($translationKeys, $fieldsIdKeys);
+ $this->addPublishableKeyField($translationKeys, $fieldsIdKeys);
+ $this->addWebhooksKeyField($translationKeys, $fieldsIdKeys);
+ $this->addSecureUrlField($translationKeys, $fieldsIdKeys);
+ }
+
+ protected function addEnabledField(array $translationKeys, array $fieldsIdKeys)
+ {
+ $this->formBuilder
+ ->add("enabled", CheckboxType::class, array(
+ "label" => $this->readKey("enabled", $translationKeys),
+ "label_attr" => [
+ "for" => $this->readKey("enabled", $fieldsIdKeys),
+ "help" => $this->readKey("help.enabled", $translationKeys)
+ ],
+ "required" => false,
+ "constraints" => array(
+ ),
+ "value" => StripePayment::getConfigValue(StripePayment::ENABLED, false),
+ ))
+ ;
+ }
+
+ protected function addStripeElementField(array $translationKeys, array $fieldsIdKeys)
+ {
+ $this->formBuilder
+ ->add("stripe_element", CheckboxType::class, array(
+ "label" => $this->readKey("stripe_element", $translationKeys),
+ "label_attr" => [
+ "for" => $this->readKey("stripeelementch", $fieldsIdKeys),
+ "help" => $this->readKey("help.stripe_element", $translationKeys)
+ ],
+ "required" => false,
+ "constraints" => array(
+ ),
+ "value" => StripePayment::getConfigValue(StripePayment::STRIPE_ELEMENT, false),
+ ))
+ ;
+ }
+
+ protected function addOneClickPaymentField(array $translationKeys, array $fieldsIdKeys)
+ {
+ $this->formBuilder
+ ->add("one_click_payment", CheckboxType::class, array(
+ "label" => $this->readKey("one_click_payment", $translationKeys),
+ "label_attr" => [
+ "for" => $this->readKey("one_click_payment", $fieldsIdKeys)
+ ],
+ "required" => false,
+ "constraints" => array(
+ ),
+ "value" => StripePayment::getConfigValue(StripePayment::ONE_CLICK_PAYMENT, false),
+ ))
+ ;
+ }
+
+ protected function addSecretKeyField(array $translationKeys, array $fieldsIdKeys)
+ {
+ $this->formBuilder
+ ->add("secret_key", TextType::class, array(
+ "label" => $this->readKey("secret_key", $translationKeys),
+ "label_attr" => [
+ "for" => $this->readKey("secret_key", $fieldsIdKeys),
+ "help" => $this->readKey("help.secret_key", $translationKeys)
+ ],
+ "required" => true,
+ "constraints" => array(
+ new NotBlank(),
+ ),
+ "data" => StripePayment::getConfigValue(StripePayment::SECRET_KEY),
+ ))
+ ;
+ }
+
+ protected function addPublishableKeyField(array $translationKeys, array $fieldsIdKeys)
+ {
+ $this->formBuilder
+ ->add("publishable_key", TextType::class, array(
+ "label" => $this->readKey("publishable_key", $translationKeys),
+ "label_attr" => [
+ "for" => $this->readKey("publishable_key", $fieldsIdKeys),
+ "help" => $this->readKey("help.publishable_key", $translationKeys)
+ ],
+ "required" => true,
+ "constraints" => array(
+ new NotBlank(),
+ ),
+ "data" => StripePayment::getConfigValue(StripePayment::PUBLISHABLE_KEY),
+ ))
+ ;
+ }
+
+ protected function addWebhooksKeyField(array $translationKeys, array $fieldsIdKeys)
+ {
+ $this->formBuilder
+ ->add("webhooks_key", TextType::class, array(
+ "label" => $this->readKey("webhooks_key", $translationKeys),
+ "label_attr" => [
+ "for" => $this->readKey("webhooks_key", $fieldsIdKeys),
+ "help" => $this->readKey("help.webhooks_key", $translationKeys)
+ ],
+ "required" => true,
+ "constraints" => array(
+ new NotBlank(),
+ ),
+ "data" => StripePayment::getConfigValue(StripePayment::WEBHOOKS_KEY),
+ ))
+ ;
+ }
+ protected function addSecureUrlField(array $translationKeys, array $fieldsIdKeys)
+ {
+ $this->formBuilder
+ ->add("secure_url", TextType::class, array(
+ "label" => $this->readKey("secure_url", $translationKeys),
+ "label_attr" => [
+ "for" => $this->readKey("secure_url", $fieldsIdKeys),
+ "help" => $this->readKey("help.secure_url", $translationKeys)
+ ],
+ "required" => true,
+ "constraints" => array(
+ new NotBlank(),
+ ),
+ "data" => StripePayment::getConfigValue(StripePayment::SECURE_URL),
+ ))
+ ;
+ }
+
+ public static function getName()
+ {
+ return static::FORM_NAME;
+ }
+
+ public function readKey($key, array $keys, $default = '')
+ {
+ if (isset($keys[$key])) {
+ return $keys[$key];
+ }
+
+ return $default;
+ }
+
+ public function getTranslationKeys()
+ {
+ return array();
+ }
+
+ public function getFieldsIdKeys()
+ {
+ return array(
+ "enabled" => "enabled",
+ "secret_key" => "secret_key",
+ "publishable_key" => "publishable_key",
+ "webhooks_key" => "webhooks_key",
+ "secure_url" => "secure_url"
+ );
+ }
+}
diff --git a/domokits/local/modules/StripePayment/Form/StripePaymentConfigForm.php b/domokits/local/modules/StripePayment/Form/StripePaymentConfigForm.php
new file mode 100644
index 0000000..979ce2e
--- /dev/null
+++ b/domokits/local/modules/StripePayment/Form/StripePaymentConfigForm.php
@@ -0,0 +1,33 @@
+ $this->translator->trans("Activate payment with stripe ?", [], StripePayment::MESSAGE_DOMAIN),
+ "stripe_element" => $this->translator->trans("Activate Element ?", [], StripePayment::MESSAGE_DOMAIN),
+ "one_click_payment" => $this->translator->trans("Activate one click payment ?", [], StripePayment::MESSAGE_DOMAIN),
+ "secret_key" => $this->translator->trans("Your secret key", [], StripePayment::MESSAGE_DOMAIN),
+ "publishable_key" => $this->translator->trans("Your publishable key (test or live)", [], StripePayment::MESSAGE_DOMAIN),
+ "webhooks_key" => $this->translator->trans("Your webhooks key", [], StripePayment::MESSAGE_DOMAIN),
+ "secure_url" => $this->translator->trans("Your chain of char for secure return webhook", [], StripePayment::MESSAGE_DOMAIN),
+ "help.enabled" => $this->translator->trans("Do you want to activate Stripe Payment", [], StripePayment::MESSAGE_DOMAIN),
+ "help.stripe_element" => $this->translator->trans("Element is the embedded and customizable payment form", [], StripePayment::MESSAGE_DOMAIN),
+ "help.secret_key" => $this->translator->trans("You can see all your keys in your Stripe dashboard. Also note that you can place your test or your live API keys", [], StripePayment::MESSAGE_DOMAIN),
+ );
+ }
+}
diff --git a/domokits/local/modules/StripePayment/Hook/StripePaymentHook.php b/domokits/local/modules/StripePayment/Hook/StripePaymentHook.php
new file mode 100644
index 0000000..b854d6f
--- /dev/null
+++ b/domokits/local/modules/StripePayment/Hook/StripePaymentHook.php
@@ -0,0 +1,74 @@
+
+ */
+class StripePaymentHook extends BaseHook
+{
+ protected $request;
+
+ protected $taxEngine;
+
+ public function __construct(Request $request, TaxEngine $taxEngine)
+ {
+ $this->request = $request;
+ $this->taxEngine = $taxEngine;
+ }
+
+ public function includeStripe(HookRenderEvent $event)
+ {
+ if(StripePayment::getConfigValue('stripe_element')){
+ $publicKey = StripePayment::getConfigValue('publishable_key');
+ $clientSecret = $this->request->getSession()->get(StripePayment::PAYMENT_INTENT_SECRET_SESSION_KEY);
+ $currency = strtolower($this->request->getSession()->getCurrency()->getCode());
+ $country = $this->taxEngine->getDeliveryCountry()->getIsoalpha2();
+ $event->add($this->render(
+ 'assets/js/stripe-js.html',
+ [
+ 'stripe_module_id' => $this->getModule()->getModuleId(),
+ 'public_key' => $publicKey,
+ 'oneClickPayment' => StripePayment::getConfigValue(StripePayment::ONE_CLICK_PAYMENT, false),
+ 'clientSecret' => $clientSecret,
+ 'currency' => $currency,
+ 'country' => $country
+ ]
+ ));
+ }
+ }
+
+ public function declareStripeOnClickEvent(HookRenderEvent $event)
+ {
+ if(StripePayment::getConfigValue('stripe_element')){
+ $publicKey = StripePayment::getConfigValue('publishable_key');
+ $event->add($this->render(
+ 'assets/js/order-invoice-after-js-include.html',
+ [
+ 'stripe_module_id' => $this->getModule()->getModuleId(),
+ 'public_key' => $publicKey
+ ]
+ ));
+ }
+ }
+
+ public function includeStripeJsV3(HookRenderEvent $event)
+ {
+ $event->add('');
+ }
+
+ public function onMainHeadBottom(HookRenderEvent $event)
+ {
+ $content = $this->addCSS('assets/css/styles.css');
+ $event->add($content);
+ }
+}
\ No newline at end of file
diff --git a/domokits/local/modules/StripePayment/I18n/backOffice/default/en_US.php b/domokits/local/modules/StripePayment/I18n/backOffice/default/en_US.php
new file mode 100644
index 0000000..115c80f
--- /dev/null
+++ b/domokits/local/modules/StripePayment/I18n/backOffice/default/en_US.php
@@ -0,0 +1,12 @@
+ 'Configuration correctly saved',
+ 'Configure stripepayment' => 'Configure stripepayment',
+ 'Home' => 'Home',
+ 'Modules' => 'Modules',
+ 'StripePayment configuration' => 'StripePayment configuration',
+ 'The configuration value enabled' => 'The configuration value enabled',
+ 'The configuration value publishable_key' => 'The configuration value publishable_key',
+ 'The configuration value secret_key' => 'The configuration value secret_key',
+);
diff --git a/domokits/local/modules/StripePayment/I18n/backOffice/default/fr_FR.php b/domokits/local/modules/StripePayment/I18n/backOffice/default/fr_FR.php
new file mode 100644
index 0000000..7fc731d
--- /dev/null
+++ b/domokits/local/modules/StripePayment/I18n/backOffice/default/fr_FR.php
@@ -0,0 +1,17 @@
+ 'Configuration correctement sauvegardée',
+ 'Configure stripepayment' => 'Configurer Stripe',
+ 'Home' => 'Accueil',
+ 'Modules' => 'Modules',
+ 'StripePayment configuration' => 'Configuration du module Stripe',
+ 'The configuration value enabled' => 'La valeur de configuration "enabled"',
+ 'The configuration value publishable_key' => 'La valeur de configuration "publishable_key"',
+ 'The configuration value secret_key' => 'La valeur de configuration "secret_key"',
+ 'The configuration value secure_url' => 'La valeur de configuration secure_url',
+ 'The configuration value webhooks_key whsec_...' => 'La valeur de configuration webhooks_key whsec_...',
+ 'Webhooks endpoint url' => 'URL d\'endpoint WebHook',
+ 'Webhooks event to activate' => 'Événements WebHook à activer',
+ 'active stripe element' => 'Activer Stripe Element',
+);
diff --git a/domokits/local/modules/StripePayment/I18n/email/default/en_US.php b/domokits/local/modules/StripePayment/I18n/email/default/en_US.php
new file mode 100644
index 0000000..a3bd1cb
--- /dev/null
+++ b/domokits/local/modules/StripePayment/I18n/email/default/en_US.php
@@ -0,0 +1,13 @@
+ 'Dear customer,',
+ 'Payment is confirmed for your order' => 'Payment is confirmed for your order',
+ 'Reference %ref' => 'Reference: %ref',
+ 'Thank you again for your purchase.' => 'Thank you again for your purchase!',
+ 'Thank you for your order!' => 'Thank you for your order!',
+ 'The %name team.' => 'The %name team.',
+ 'This is a confirmation of the payment of your order %order on %name.' => 'This is a confirmation of the payment of your order %order on %name.',
+ 'Your invoice is now available in your customer account on' => 'Your invoice is now available in your customer account on',
+ 'Your invoice is now available in your customer account on %site' => 'Your invoice is now available in your customer account on %site.',
+);
diff --git a/domokits/local/modules/StripePayment/I18n/email/default/fr_FR.php b/domokits/local/modules/StripePayment/I18n/email/default/fr_FR.php
new file mode 100644
index 0000000..2b922e5
--- /dev/null
+++ b/domokits/local/modules/StripePayment/I18n/email/default/fr_FR.php
@@ -0,0 +1,13 @@
+ 'Cher client,',
+ 'Payment is confirmed for your order' => 'Le paiement de votre commande est confirmé',
+ 'Reference %ref' => 'Référence de commande : %ref',
+ 'Thank you again for your purchase.' => 'Merci encore pour cet achat !',
+ 'Thank you for your order!' => 'Merci pour votre commande !',
+ 'The %name team.' => 'L\'équipe %name.',
+ 'This is a confirmation of the payment of your order %order on %name.' => 'Ce message confirme le paiement de votre commande n° %order sur %name.',
+ 'Your invoice is now available in your customer account on' => 'Votre facture est maintenant disponible sur votre compte sur ',
+ 'Your invoice is now available in your customer account on %site' => 'Votre facture est maintenant disponible sur votre compte sur %site. ',
+);
diff --git a/domokits/local/modules/StripePayment/I18n/en_US.php b/domokits/local/modules/StripePayment/I18n/en_US.php
new file mode 100644
index 0000000..88eb9c9
--- /dev/null
+++ b/domokits/local/modules/StripePayment/I18n/en_US.php
@@ -0,0 +1,21 @@
+ 'Activated ?',
+ 'An error occurred during payment.' => 'An error occurred during payment.',
+ 'An error occurred with Stripe.' => 'An error occurred with Stripe.',
+ 'Authentication with Stripe failed. Please contact administrators.' => 'Authentication with Stripe failed. Please contact administrators.',
+ 'Do you want to activate Stripe Payment' => 'Do you want to activate Stripe Payment',
+ 'Invalid parameters were supplied to Stripe.' => 'Invalid parameters were supplied to Stripe.',
+ 'Network communication failed.' => 'Network communication failed.',
+ 'Payment confirmation of your order {$order_ref} on %store_name' => 'Payment confirmation of your order {$order_ref} on %store_name',
+ 'Payment confirmation on %store_name' => 'Payment confirmation on %store_name',
+ 'Sorry, an error occurred: %err' => 'Sorry, an error occurred: %err',
+ 'Stripe library isn\'t installed' => 'Stripe library isn\'t installed',
+ 'The payment mean does not have the same amount as your cart. Please reload and try again.' => 'The payment mean does not have the same amount as your cart. Please reload and try again.',
+ 'Too many requests too quickly.' => 'Too many requests too quickly.',
+ 'You can see all your keys in your Stripe dashboard. Also note that you can place your test or your live API keys' => 'You can see all your keys in your Stripe dashboard. Also note that you have to place your test and your live API keys',
+ 'Your card has been declined.' => 'Your card has been declined.',
+ 'Your publishable key (test or live)' => 'Your publishable key (test or live)',
+ 'Your secret key' => 'Your secret key',
+);
diff --git a/domokits/local/modules/StripePayment/I18n/fr_FR.php b/domokits/local/modules/StripePayment/I18n/fr_FR.php
new file mode 100644
index 0000000..c265567
--- /dev/null
+++ b/domokits/local/modules/StripePayment/I18n/fr_FR.php
@@ -0,0 +1,29 @@
+ 'Activer Element ?',
+ 'Activate payment with stripe ?' => 'Activer le paiement avec Stripe ?',
+ 'An error occurred during payment.' => 'Une erreur est survenue lors du paiement.',
+ 'An error occurred with Stripe.' => 'Une erreur est survenue lors du paiement avec Stripe.',
+ 'Authentication with Stripe failed. Please contact administrators.' => 'Des paramètres invalides ont été envoyés à Stripe.',
+ 'Discount' => 'Remise',
+ 'Do you want to activate Stripe Payment' => 'Voulez-vous activer Stripe ?',
+ 'Element is the embedded and customizable payment form' => 'Element est un formulaire intégrer et personlisable.',
+ 'Invalid parameters were supplied to Stripe.' => 'Une erreur liée au réseau empêche la communication avec Stripe.',
+ 'Network communication failed.' => 'L\'authentification auprès de Stripe a échoué. Merci de contacter les administrateurs du site.',
+ 'Payment confirmation for Stripe Payment' => 'Confirmation de paiement par Stripe',
+ 'Payment confirmation of your order {$order_ref} on {$store_name}' => 'Confirmation de paiement pour votre commande {$order_ref} sur {$store_name}',
+ 'Sorry, an error occurred: %err' => 'Désolé, une erreur est survenue : %err',
+ 'Stripe library is missing.' => 'La libraire Stripe est manquante',
+ 'Stripe version is greater than max version (< %version). Current version: %curVersion.' => 'La version de la libraire Stripe est plus haute qua la version maximum ( < %version). Version actuelle %curVersion.',
+ 'Stripe version is lower than min version (%version). Current version: %curVersion.' => 'La version de la libraire Stripe est plus basse qua la version minimum ( > %version). Version actuelle %curVersion.',
+ 'The payment mean does not have the same amount as your cart. Please reload and try again.' => 'Le moyen de paiement n\'indique pas le même montant que votre panier. Rechargez la pager et réessayez.',
+ 'Too many requests too quickly.' => 'Trop de requêtes en peu de temps.',
+ 'Total' => 'Total',
+ 'You can see all your keys in your Stripe dashboard. Also note that you can place your test or your live API keys' => 'Vos clés sont disponibles dans votre compte sur la plateforme d\'administration Stripe. Veuillez noter que vous devez renseigner ici vos clés publique et privée.',
+ 'Your card has been declined.' => 'Votre carte bancaire a été refusée.',
+ 'Your chain of char for secure return webhook' => 'Une chaine de caractère pour sécuriser le retour des Webhooks',
+ 'Your publishable key (test or live)' => 'Votre clé publique',
+ 'Your secret key' => 'Votre clé secrète',
+ 'Your webhooks key' => 'Votre clé Webhooks ?',
+);
diff --git a/domokits/local/modules/StripePayment/I18n/frontOffice/default/fr_FR.php b/domokits/local/modules/StripePayment/I18n/frontOffice/default/fr_FR.php
new file mode 100644
index 0000000..855d244
--- /dev/null
+++ b/domokits/local/modules/StripePayment/I18n/frontOffice/default/fr_FR.php
@@ -0,0 +1,6 @@
+ 'Ou entrer les détails de votre carte de crédit',
+ 'Quick pay' => 'Paiement rapide',
+);
diff --git a/domokits/local/modules/StripePayment/LICENSE.txt b/domokits/local/modules/StripePayment/LICENSE.txt
new file mode 100644
index 0000000..65c5ca8
--- /dev/null
+++ b/domokits/local/modules/StripePayment/LICENSE.txt
@@ -0,0 +1,165 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
diff --git a/domokits/local/modules/StripePayment/Readme.md b/domokits/local/modules/StripePayment/Readme.md
new file mode 100644
index 0000000..a6856f9
--- /dev/null
+++ b/domokits/local/modules/StripePayment/Readme.md
@@ -0,0 +1,43 @@
+# Stripe
+
+Thelia payment module for [Stripe](http://stripe.com).
+
+You need a subscription to Stripe payment solution to use this module.
+
+## Installation
+
+Either you install StripePayment manually or via composer, the presence of Stripe API files is checked when you try to activate the module.
+If the API files are absent, you can't use Stripe.
+Be aware that API files are set into the core/vendor folder.
+
+### Manually
+
+* Copy the module into ```/local/modules/``` directory and be sure that the name of the module is StripePayment.
+* Install the Stripe PHP library :
+ * add "stripe/stripe-php" to your composer.json file with command : `composer require stripe/stripe-php:"6.*"`
+ * or download the library from and install it in your `core/vendor` directory
+* Activate it in your Thelia administration panel
+
+
+### Composer
+
+Add it in your main thelia composer.json file:
+
+```
+composer require thelia/stripe-payment-module ~2.0.0
+```
+
+### Configuration
+
+Enter your Stripe keys (*secret* and *public*) available on your [Stripe dashboard](https://dashboard.stripe.com/).
+
+Put your Stripe account in live mode.
+
+Then activate the Stripe in the module configuration panel.
+
+Activate the webhooks in stripe dashboard with the url specified in Thelia Back-office Stripe configuration,
+and add events listed in Thelia Back-office Stripe configuration.
+
+### Logs
+
+Stripe error logs are stored in a specific file located in the log folder.
diff --git a/domokits/local/modules/StripePayment/Resource/images/module/stripe.png b/domokits/local/modules/StripePayment/Resource/images/module/stripe.png
new file mode 100644
index 0000000..20b7de7
Binary files /dev/null and b/domokits/local/modules/StripePayment/Resource/images/module/stripe.png differ
diff --git a/domokits/local/modules/StripePayment/StripePayment.php b/domokits/local/modules/StripePayment/StripePayment.php
new file mode 100644
index 0000000..1b22d60
--- /dev/null
+++ b/domokits/local/modules/StripePayment/StripePayment.php
@@ -0,0 +1,529 @@
+
+ */
+class StripePayment extends AbstractPaymentModule
+{
+ const MESSAGE_DOMAIN = "stripepayment";
+ const CONFIRMATION_MESSAGE_NAME = "stripe_confirm_payment";
+
+ const PAYMENT_INTENT_ID_SESSION_KEY = 'payment_intent_id';
+ const PAYMENT_INTENT_CUSTOMER_ID_SESSION_KEY = 'payment_intent_customer_id';
+ const PAYMENT_INTENT_SECRET_SESSION_KEY = 'payment_intent_secret';
+
+ const ENABLED = "enabled";
+ const STRIPE_ELEMENT = "stripe_element";
+ const ONE_CLICK_PAYMENT = "one_click_payment";
+ const SECRET_KEY = "secret_key";
+ const PUBLISHABLE_KEY = "publishable_key";
+ const WEBHOOKS_KEY = "webhooks_key";
+ const SECURE_URL = "secure_url";
+
+ public function preActivation(ConnectionInterface $con = null)
+ {
+ // Check if Stripe API is present
+ try {
+ $this->checkApi();
+ } catch (\Exception $ex) {
+ throw $ex;
+ }
+
+ return true;
+ }
+
+ public function postActivation(ConnectionInterface $con = null): void
+ {
+ // Module image
+ $moduleModel = $this->getModuleModel();
+
+ if (! $moduleModel->isModuleImageDeployed($con)) {
+ $this->deployImageFolder($moduleModel, sprintf('%s'.DS.'Resource'.DS.'images'.DS.'module', __DIR__), $con);
+ }
+
+ $this->createMailMessage();
+ }
+
+ public function createMailMessage()
+ {
+ // Create payment confirmation message from templates, if not already defined
+ if (null === MessageQuery::create()->findOneByName(self::CONFIRMATION_MESSAGE_NAME)) {
+
+ $languages = LangQuery::create()->find();
+
+ $message = new Message();
+ $message
+ ->setName(self::CONFIRMATION_MESSAGE_NAME)
+ ->setHtmlTemplateFileName(self::CONFIRMATION_MESSAGE_NAME.'.html')
+ ->setTextTemplateFileName(self::CONFIRMATION_MESSAGE_NAME.'.txt')
+ ;
+
+ foreach ($languages as $language) {
+ /** @var Lang $language */
+ $locale = $language->getLocale();
+ $message
+ ->setLocale($locale)
+ ->setTitle(
+ Translator::getInstance()->trans(
+ "Payment confirmation for Stripe Payment",
+ [],
+ self::MESSAGE_DOMAIN,
+ $locale
+ )
+ )
+ ->setSubject(
+ Translator::getInstance()->trans(
+ 'Payment confirmation of your order {$order_ref} on {$store_name}',
+ [],
+ self::MESSAGE_DOMAIN,
+ $locale
+ )
+ )
+ ;
+ }
+
+ $message->save();
+ }
+ }
+
+ public function checkApi()
+ {
+ try {
+ $ReflectedClass = new \ReflectionClass('Stripe\Stripe');
+ } catch (\Exception $ex) {
+ throw new \Exception(
+ Translator::getInstance()->trans(
+ "Stripe library is missing.",
+ [],
+ self::MESSAGE_DOMAIN
+ )
+ );
+ }
+ }
+
+ /**
+ *
+ * Method used by payment gateway.
+ *
+ * If this method return a \Thelia\Core\HttpFoundation\Response instance, this response is send to the
+ * browser.
+ *
+ * In many cases, it's necessary to send a form to the payment gateway. On your response you can return this form already
+ * completed, ready to be sent
+ *
+ * @param \Thelia\Model\Order $order processed order
+ * @return null|\Thelia\Core\HttpFoundation\Response
+ */
+ public function pay(Order $order)
+ {
+ if (!$this->isValidPayment()) {
+ throw new Exception("Your connection is not secured. Check that 'https' is present at the beginning of the site's address.");
+ }
+
+ return $this->doPay($order);
+ }
+
+ protected function doPay(Order $order)
+ {
+ $session = $this->getRequest()->getSession();
+
+ try {
+
+ if(StripePayment::getConfigValue('stripe_element')){
+ $order->setTransactionRef($session->get(StripePayment::PAYMENT_INTENT_ID_SESSION_KEY))
+ ->save();
+ $session->set(StripePayment::PAYMENT_INTENT_ID_SESSION_KEY, null);
+ $session->set(StripePayment::PAYMENT_INTENT_SECRET_SESSION_KEY, null);
+ $session->set(StripePayment::PAYMENT_INTENT_CUSTOMER_ID_SESSION_KEY, null);
+
+ return;
+ }
+
+ $session->set(StripePayment::PAYMENT_INTENT_ID_SESSION_KEY, null);
+ $session->set(StripePayment::PAYMENT_INTENT_SECRET_SESSION_KEY, null);
+ $session->set(StripePayment::PAYMENT_INTENT_CUSTOMER_ID_SESSION_KEY, null);
+
+ // Create the session on Stripe's servers - this will charge the user's order and save session id into order transaction reference
+ return $this->createStripeSession($order);
+ } catch(\Stripe\Exception\CardException $e) {
+ // The card has been declined
+ // FIXME Translate message here
+ $logMessage = sprintf(
+ 'Error paying order %d with Stripe. Card declined. Message: %s',
+ $order->getId(),
+ $e->getMessage()
+ );
+
+ $userMessage = Translator::getInstance()
+ ->trans(
+ 'Your card has been declined.',
+ [],
+ StripePayment::MESSAGE_DOMAIN
+ );
+ } catch (\Stripe\Exception\RateLimitException $e) {
+ // Too many requests made to the API too quickly
+ $logMessage = sprintf(
+ 'Error paying order %d with Stripe. Too many requests. Message: %s',
+ $order->getId(),
+ $e->getMessage()
+ );
+
+ $userMessage = Translator::getInstance()
+ ->trans(
+ 'Too many requests too quickly.',
+ [],
+ StripePayment::MESSAGE_DOMAIN
+ );
+ } catch (\Stripe\Exception\InvalidRequestException $e) {
+ // Invalid parameters were supplied to Stripe's API
+ $logMessage = sprintf(
+ 'Error paying order %d with Stripe. Invalid parameters. Message: %s',
+ $order->getId(),
+ $e->getMessage()
+ );
+
+ $userMessage = Translator::getInstance()
+ ->trans(
+ 'Invalid parameters were supplied to Stripe.',
+ [],
+ StripePayment::MESSAGE_DOMAIN
+ );
+ } catch (\Stripe\Exception\AuthenticationException $e) {
+ // Authentication with Stripe's API failed
+ // (maybe you changed API keys recently)
+ $logMessage = sprintf(
+ 'Error paying order %d with Stripe. Authentication failed: API key changed? Message: %s',
+ $order->getId(),
+ $e->getMessage()
+ );
+
+ $userMessage = Translator::getInstance()
+ ->trans(
+ 'Authentication with Stripe failed. Please contact administrators.',
+ [],
+ StripePayment::MESSAGE_DOMAIN
+ );
+ } catch (\Stripe\Exception\ApiConnectionException $e) {
+ // Network communication with Stripe failed
+ $logMessage = sprintf(
+ 'Error paying order %d with Stripe. Network communication failed. Message: %s',
+ $order->getId(),
+ $e->getMessage()
+ );
+
+ $userMessage = Translator::getInstance()
+ ->trans(
+ 'Network communication failed.',
+ [],
+ StripePayment::MESSAGE_DOMAIN
+ );
+ } catch (\Stripe\Exception\ApiErrorException $e) {
+ // Display a very generic error to the user
+ $logMessage = sprintf(
+ 'Error paying order %d with Stripe. Message: %s',
+ $order->getId(),
+ $e->getMessage()
+ );
+
+ $userMessage = Translator::getInstance()
+ ->trans(
+ 'An error occurred with Stripe.',
+ [],
+ StripePayment::MESSAGE_DOMAIN
+ );
+ } catch (StripePaymentException $e) {
+ // Amount shown to the user by Stripe & order amount are not equal
+ $logMessage = sprintf(
+ 'Error paying order %d with Stripe. Amounts are different. Message: %s',
+ $order->getId(),
+ $e->getMessage()
+ );
+
+ $userMessage = $e->getMessage();
+ } catch (\Exception $e) {
+ // Something else happened, completely unrelated to Stripe
+ $logMessage = sprintf(
+ 'Error paying order %d with Stripe but maybe unrelated with it. Message: %s',
+ $order->getId(),
+ $e->getMessage()
+ );
+
+ $userMessage = Translator::getInstance()
+ ->trans(
+ 'An error occurred during payment.',
+ [],
+ StripePayment::MESSAGE_DOMAIN
+ );
+ }
+
+ if ($logMessage !== NULL) {
+ (new StripePaymentLog())->logText($logMessage);
+
+ return new RedirectResponse(
+ URL::getInstance()->absoluteUrl("/order/failed/".$order->getId()."/".$userMessage)
+ );
+ }
+
+ return new Response();
+ }
+
+ public function createStripeSession(OrderModel $order)
+ {
+ /* Impossible d'ajouter une ligne spécifique pour la remise, cette partie est mise de côté en attendant que stripe ajoute cette possibilité
+
+ $lineItems = $this->prepareLineItems($order);
+
+ */
+
+ $currency = $order->getCurrency();
+
+ if (null === $currency) {
+ $currency = $this->getRequest()->getSession()->getCurrency();
+ }
+
+ $lineItems[] = [
+ 'name'=> Translator::getInstance()->trans('Total', [], StripePayment::MESSAGE_DOMAIN ),
+ 'quantity'=> 1,
+ 'currency' => strtolower($currency->getCode()),
+ 'amount' => round($order->getTotalAmount(), 2) * 100
+ ];
+
+ if(empty($lineItems)){
+ throw new \Exception("Sorry, your cart is empty. There's nothing to pay.");
+ }
+
+ $stripe = new \Stripe\StripeClient(StripePayment::getConfigValue('secret_key'));
+
+ $session = $stripe->checkout->sessions->create([
+ 'customer_email' => $order->getCustomer()->getEmail(),
+ 'client_reference_id' => $order->getRef(),
+ 'payment_method_types' => ['card'],
+ 'line_items' => $lineItems,
+ 'mode' => 'payment',
+ 'success_url' => URL::getInstance()->absoluteUrl('/order/placed/' . $order->getId()),
+ 'cancel_url' => URL::getInstance()->absoluteUrl('/order/failed/' . $order->getId() . '/error'),
+ ]);
+
+ $order->setTransactionRef($session->payment_intent)->save();
+
+ /** @var ParserInterface $parser */
+ $parser = $this->getContainer()->get("thelia.parser");
+
+ $parser->setTemplateDefinition(
+ $parser->getTemplateHelper()->getActiveFrontTemplate(),
+ true
+ );
+
+ $renderedTemplate = $parser->render(
+ "stripe-paiement.html",
+ [
+ 'checkout_session_id' => $session->id,
+ 'public_key' => StripePayment::getConfigValue('publishable_key')
+ ]
+ );
+
+ return new Response($renderedTemplate);
+ }
+
+ /**
+ *
+ * This method is call on Payment loop.
+ *
+ * If you return true, the payment method will be display
+ * If you return false, the payment method will not be display
+ *
+ * @return boolean
+ */
+ public function isValidPayment()
+ {
+ $secretKey = self::getConfigValue(self::SECRET_KEY);
+ return ( (($this->isDevEnvironment() || $this->isSslEnabled()) && self::getConfigValue('enabled')) && $secretKey && $this->getCurrentOrderTotalAmount() > 0);
+ }
+
+ /**
+ * Return true if the current environment is in Dev mode
+ *
+ * @return bool
+ */
+ protected function isDevEnvironment()
+ {
+ return 'dev' === $this->getContainer()->getParameter('kernel.environment');
+ }
+
+ /**
+ * return true if SSL is enabled
+ *
+ * @return bool
+ */
+ protected function isSslEnabled()
+ {
+ return $this->getRequest()->isSecure();
+ }
+
+ public function checkOrderAmount(OrderModel $order, $stripeAmount)
+ {
+ $orderAmount = $order->getTotalAmount() * 100;
+
+ if (strval($stripeAmount) != strval($orderAmount)) {
+ throw new StripePaymentException(Translator::getInstance()
+ ->trans(
+ 'The payment mean does not have the same amount as your cart. Please reload and try again.',
+ [],
+ StripePayment::MESSAGE_DOMAIN
+ )
+ );
+ }
+ }
+
+ protected function prepareLineItems(Order $order, $currency)
+ {
+ $stripeAmount = 0;
+ $lineItems = [];
+
+ $baseSourceFilePath = ConfigQuery::read('images_library_path');
+ if ($baseSourceFilePath === null) {
+ $baseSourceFilePath = THELIA_LOCAL_DIR . 'media' . DS . 'images';
+ } else {
+ $baseSourceFilePath = THELIA_ROOT . $baseSourceFilePath;
+ }
+ if(null !== $orderProducts = OrderProductQuery::create()->filterByOrderId($order->getId())->joinOrderProductTax('opt', Criteria::LEFT_JOIN)->withColumn('SUM(`opt`.AMOUNT)', 'TOTAL_TAX')->withColumn('SUM(`opt`.PROMO_AMOUNT)', 'TOTAL_PROMO_TAX')->groupById()->find()){
+ foreach ($orderProducts as $orderProduct) {
+ $description='';
+ if(null !== $orderProductAttributeCombinations = OrderProductAttributeCombinationQuery::create()->filterByOrderProductId($orderProduct->getId())->find()){
+ foreach ($orderProductAttributeCombinations as $orderProductAttributeCombination) {
+ if($description) $description .= ', ';
+ $description .= $orderProductAttributeCombination->getAttributeTitle() . ' ' . $orderProductAttributeCombination->getAttributeAvTitle();
+ }
+ }
+ $images=array();
+ if(null !== $product = ProductQuery::create()->filterByRef($orderProduct->getProductRef())->findOne()){
+ if(null !== $productImages = ProductImageQuery::create()->filterByProductId($product->getId())->filterByVisible(1)->orderBy('position')->find()){
+ foreach ($productImages as $productImage) {
+ // Put source image file path
+ $sourceFilePath = sprintf(
+ '%s/%s/%s',
+ $baseSourceFilePath,
+ 'product',
+ $productImage->getFile()
+ );
+
+ // Create image processing event
+ $event = new ImageEvent();
+ $event->setSourceFilepath($sourceFilePath);
+ $event->setCacheSubdirectory('product');
+ $width=100;
+ try {
+ // Dispatch image processing event
+ $event->setWidth($width);
+ $order->getDispatcher()->dispatch(TheliaEvents::IMAGE_PROCESS, $event);
+ $images[]=$event->getFileUrl();
+ } catch (\Exception $ex) {
+ // Ignore the result and log an error
+ Tlog::getInstance()->addError(sprintf("Failed to process image in image loop: %s", $ex->getMessage()));
+ }
+ }
+ }
+ }
+ if($orderProduct->getWasInPromo()){
+ $amount = (float) $orderProduct->getPromoPrice() + (float) $orderProduct->getVirtualColumn('TOTAL_PROMO_TAX');
+ }else{
+ $amount = (float) $orderProduct->getPrice() + (float) $orderProduct->getVirtualColumn('TOTAL_TAX');
+ }
+
+ $stripeAmount += $amount * $orderProduct->getQuantity() * 100;
+ $lineItems[] = [
+ 'name' => $orderProduct->getTitle(),
+ 'description' => $description,
+ 'images' => $images,
+ 'amount' => $amount*100,
+ 'currency' => $currency,
+ 'quantity' => $orderProduct->getQuantity(),
+ ];
+ }
+ }
+ if ($order->getPostage()){
+ if (null !== $module = ModuleQuery::create()->findPk($order->getDeliveryModuleId())){
+ $locale = $this->getRequest()->getLocale();
+ if ($locale === 'en') {
+ $locale = 'en_US';
+ }
+ $module->setLocale($locale);
+
+ if (!$module->getTitle()) {
+ $module->setLocale('fr_FR');
+ }
+ $lineItems[] = ['name'=> $module->getTitle(), 'description' => $module->getChapo(), 'quantity'=> 1, 'currency' => $currency, 'amount' => ($order->getPostage()*100)];
+ $stripeAmount += $order->getPostage() * 100;
+ }
+ }
+
+ if($order->getDiscount() > 0){
+ $description=null;
+ if(null !== $orderCoupons = OrderCouponQuery::create()->filterByOrderId($order->getId())->find()){
+ foreach($orderCoupons as $orderCoupon){
+ if($description)$description .= ', ';
+ $description .= $orderCoupon->getTitle();
+ }
+ }
+ $lineItems[] = ['name'=> Translator::getInstance()->trans('Discount', [], StripePayment::MESSAGE_DOMAIN ), 'description' => $description, 'quantity'=> 1, 'currency' => $currency, 'amount' => -($order->getDiscount()*100)];
+ $stripeAmount -= $order->getDiscount() * 100;
+ }
+
+ $this->checkOrderAmount($order, $stripeAmount);
+
+ return $lineItems;
+ }
+
+
+ /**
+ * if you want, you can manage stock in your module instead of order process.
+ * Return false to decrease the stock when order status switch to pay
+ *
+ * @return bool
+ */
+ public function manageStockOnCreation()
+ {
+ return false;
+ }
+
+ public static function configureServices(ServicesConfigurator $servicesConfigurator): void
+ {
+ $servicesConfigurator->load(self::getModuleCode().'\\', __DIR__)
+ ->exclude([THELIA_MODULE_DIR . ucfirst(self::getModuleCode()). "/I18n/*"])
+ ->autowire(true)
+ ->autoconfigure(true);
+ }
+}
diff --git a/domokits/local/modules/StripePayment/composer.json b/domokits/local/modules/StripePayment/composer.json
new file mode 100644
index 0000000..6341e7d
--- /dev/null
+++ b/domokits/local/modules/StripePayment/composer.json
@@ -0,0 +1,12 @@
+{
+ "name": "thelia/stripe-payment-module",
+ "license": "LGPL-3.0+",
+ "type": "thelia-module",
+ "require": {
+ "thelia/installer": "~1.1",
+ "stripe/stripe-php": "^v7.100"
+ },
+ "extra": {
+ "installer-name": "StripePayment"
+ }
+}
\ No newline at end of file
diff --git a/domokits/local/modules/StripePayment/templates/backOffice/default/stripepayment-configuration.html b/domokits/local/modules/StripePayment/templates/backOffice/default/stripepayment-configuration.html
new file mode 100644
index 0000000..87a1794
--- /dev/null
+++ b/domokits/local/modules/StripePayment/templates/backOffice/default/stripepayment-configuration.html
@@ -0,0 +1,174 @@
+
+ );
+};
+```
+
+### 2 - Combinez vos plugins
+
+Notre plugin `citation` utilise un élément `` pour permettre à l'utilisateur d'insérer une citation.
+Cependant, il est tout à fait possible d'imbriquer certains plugins pour réutiliser des fonctionnalités déjà existantes.
+
+Dans notre cas, le plugin `Text` est parfait :
+Celui ci embarque déjà un système rich-text et d'autres fonctionnalités qui peuvent être utiles.
+
+Voyons comment l'utiliser dans notre plugin de citations :
+
+```js
+// ./templates/backOffice/default/src/Citation.jsx
+
+import { blocks } from "@openstudio/blocks-editor";
+
+const { Text } = blocks; // Récupération du plugin Text dans la liste des plugins
+```
+
+Nous pouvons désormais nous servir de `Text` dans le plugin Citation :
+
+```jsx
+// ./templates/backOffice/default/src/Citation.jsx
+
+import { generateId } from "@openstudio/blocks-editor";
+
+const BlockQuoteComponent = ({ data, onUpdate }) => {
+ return (
+
+ );
+};
+```
+
+Notre plugin Citation utilise désormais `Text` pour fonctionner.
+
+:warning: Attention : un plugin doit obligatoirement avoir un composant React ou hériter d'un autre plugin
+
+### 3 - Structure et export du plugin
+
+Chaque plugin est représenté par un objet. Celui ci regroupe toutes les informations nécessaires à son bon fonctionnement.
+
+| Attribut | Type | Requis | Description |
+| :------------ | :---------------------------------------- | :----------------: | :--------------------------------------------------------------------- |
+| `type` | `{ id: string; }` | :white_check_mark: | ID du plugin, celui ci sera utilisé par Thelia pour effectuer le rendu |
+| `component` | `ReactElement` | :white_check_mark: | Composant du plugin |
+| `initialData` | `any` | :white_check_mark: | Données par défaut du plugin |
+| `icon` | `FunctionComponent>` | | Icone du plugin |
+| `title` | `{ [key: string]: string; }` | :white_check_mark: | Titre du plugin |
+| `description` | `{ [key: string]: string; }` | :white_check_mark: | Description du plugin |
+
+Exemple :
+
+```js
+// ./templates/backOffice/default/src/Citation.jsx
+
+const blockQuote = {
+ type: { id: "blockQuote" },
+ component: BlockQuoteComponent,
+ initialData,
+ icon: Icon,
+ title: {
+ default: "Quote",
+ fr: "Citation",
+ en: "Quote",
+ },
+ description: {
+ default: "Display a quote",
+ fr: "Affiche une citation",
+ en: "Display a quote",
+ },
+};
+
+export default blockQuote;
+```
+
+### 4 - Configuration du plugin avec Thelia
+
+#### 4.1 - Ajout du plugin dans Thelia Blocks
+
+Votre plugin doit maintenant être ajouté à Thelia Blocks pour être disponible lors de la création d'un nouveau Block.
+
+La fonction `"registerPlugin"` se charge de l'ajout de la liste des plugins dans Thelia Blocks.
+
+Celle ci est exportée par le package `@openstudio/blocks-editor`
+
+Exemple :
+
+```js
+// ./templates/backOffice/default/index.js
+
+import { registerPlugin } from "@openstudio/blocks-editor";
+import Citation from "./Citation";
+
+registerPlugin(Citation);
+```
+
+#### 4.2 - Génération du bundle
+
+:warning: L'exemple ci-dessous décrit une utilisation avec le bundler [tsup](https://github.com/egoist/tsup), vous pouvez évidemment utiliser n'importe quel autre bundler.
+
+```js
+// ./templates/backOffice/default/tsup.config.js
+
+import { defineConfig } from "tsup";
+
+export default defineConfig([
+ {
+ entry: ["./src/index.js"],
+ clean: false,
+ dts: {
+ entry: ["./src/index.js"],
+ },
+ sourcemap: true,
+ platform: "browser",
+ globalName: "MonModule",
+ target: "es2020",
+ },
+]);
+```
+
+#### 4.3 - Création des template Smarty
+
+```smarty
+
+
+
+```
+
+#### 4.4 - Rendu des templates avec les hooks Thelia
+
+Thelia Blocks utilise deux principaux event pour fonctionner :
+
+- `thelia.blocks.plugins` : permet d'ajouter des plugins à Thelia Blocks
+- `thelia.blocks.plugincss` : permet d'injecter du CSS dans les plugins
+
+```xml
+
+
+
+
+
+
+
+```
+
+### 5 - Création du rendu Smarty
+
+Votre plugin est désormais disponible dans Thelia Blocks, la dernière étape consiste à définir la structure HTML qu'il doit générer une fois que Thelia l'affichera sur votre site.
+
+#### 5.1 - Création de votre rendu
+
+Pour commencer, créez un fichier nommé `"[id_du_plugin].html"` dans le dossier `./templates/frontOffice/default/blocks`
+
+L'ID a été défini dans la structure du plugin, il est important que votre fichier ai exactement le même nom que l'id, sinon Thelia ne trouvera pas votre plugin et rien ne sera affiché.
+
+Exemple :
+
+```smarty
+
+
+
+