diff --git a/local/modules/PaymentMethodsInFooter/Config/config.xml b/local/modules/PaymentMethodsInFooter/Config/config.xml new file mode 100644 index 00000000..1a39bd02 --- /dev/null +++ b/local/modules/PaymentMethodsInFooter/Config/config.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/local/modules/PaymentMethodsInFooter/Config/module.xml b/local/modules/PaymentMethodsInFooter/Config/module.xml new file mode 100644 index 00000000..516e5d6d --- /dev/null +++ b/local/modules/PaymentMethodsInFooter/Config/module.xml @@ -0,0 +1,28 @@ + + + PaymentMethodsInFooter\PaymentMethodsInFooter + + Display payment methods allowed in footer of the site + + + Affiche les modes de paiement acceptés, dans le footer du site + + + en_US + fr_FR + + 1.0.0 + + + Laurent LE CORRE + laurent@thecoredev.fr + + + classic + 2.3.0 + other + 0 + 0 + diff --git a/local/modules/PaymentMethodsInFooter/Hook/FrontHook.php b/local/modules/PaymentMethodsInFooter/Hook/FrontHook.php new file mode 100644 index 00000000..c98b7af5 --- /dev/null +++ b/local/modules/PaymentMethodsInFooter/Hook/FrontHook.php @@ -0,0 +1,28 @@ + + */ +class FrontHook extends BaseHook +{ + public function onMainFooterBody(HookRenderBlockEvent $event) + { + $content = trim($this->render("footer.html")); + if ("" != $content) { + $event->add( + array( + "id" => "payment-methods-footer-body", + "title" => $this->trans("Our payment methods", array(), "paymentmethodsinfooter"), + "content" => $content + ) + ); + } + } +} diff --git a/local/modules/PaymentMethodsInFooter/I18n/en_US.php b/local/modules/PaymentMethodsInFooter/I18n/en_US.php new file mode 100644 index 00000000..ee2ff17a --- /dev/null +++ b/local/modules/PaymentMethodsInFooter/I18n/en_US.php @@ -0,0 +1,4 @@ + 'Our payment methods', +); diff --git a/local/modules/PaymentMethodsInFooter/I18n/fr_FR.php b/local/modules/PaymentMethodsInFooter/I18n/fr_FR.php new file mode 100644 index 00000000..0aec4af7 --- /dev/null +++ b/local/modules/PaymentMethodsInFooter/I18n/fr_FR.php @@ -0,0 +1,4 @@ + 'Nos moyens de paiement', +); diff --git a/local/modules/PaymentMethodsInFooter/PaymentMethodsInFooter.php b/local/modules/PaymentMethodsInFooter/PaymentMethodsInFooter.php new file mode 100644 index 00000000..be967efa --- /dev/null +++ b/local/modules/PaymentMethodsInFooter/PaymentMethodsInFooter.php @@ -0,0 +1,28 @@ +/local/modules/``` directory and be sure that the name of the module is PaymentMethodsInFooter. +* Activate it in your thelia administration panel + +### Composer + +Add it in your main thelia composer.json file + +``` +composer require your-vendor/payment-methods-in-footer-module:~1.0 +``` + +## Usage + +Explain here how to use your module, how to configure it, etc. + +## Hook + +If your module use one or more hook, fill this part. Explain which hooks are used. + + +## Loop + +If your module declare one or more loop, describe them here like this : + +[loop name] + +### Input arguments + +|Argument |Description | +|--- |--- | +|**arg1** | describe arg1 with an exemple. | +|**arg2** | describe arg2 with an exemple. | + +### Output arguments + +|Variable |Description | +|--- |--- | +|$VAR1 | describe $VAR1 variable | +|$VAR2 | describe $VAR2 variable | + +### Exemple + +Add a complete exemple of your loop + +## Other ? + +If you have other think to put, feel free to complete your readme as you want. diff --git a/local/modules/PaymentMethodsInFooter/composer.json b/local/modules/PaymentMethodsInFooter/composer.json new file mode 100644 index 00000000..d0f69a08 --- /dev/null +++ b/local/modules/PaymentMethodsInFooter/composer.json @@ -0,0 +1,11 @@ +{ + "name": "your-vendor/payment-methods-in-footer-module", + "license": "LGPL-3.0+", + "type": "thelia-module", + "require": { + "thelia/installer": "~1.1" + }, + "extra": { + "installer-name": "PaymentMethodsInFooter" + } +} \ No newline at end of file diff --git a/local/modules/PaymentMethodsInFooter/templates/frontOffice/default/assets/style.css b/local/modules/PaymentMethodsInFooter/templates/frontOffice/default/assets/style.css new file mode 100644 index 00000000..1e8fcd13 --- /dev/null +++ b/local/modules/PaymentMethodsInFooter/templates/frontOffice/default/assets/style.css @@ -0,0 +1,11 @@ + +#payment-methods ul { + width: 100%; + display: inline-flex; + align-items: center; + justify-content: space-between; +} +#payment-methods img { + height: 48px; + vertical-align: center; +} \ No newline at end of file diff --git a/local/modules/PaymentMethodsInFooter/templates/frontOffice/default/footer.html b/local/modules/PaymentMethodsInFooter/templates/frontOffice/default/footer.html new file mode 100644 index 00000000..d17b6f8f --- /dev/null +++ b/local/modules/PaymentMethodsInFooter/templates/frontOffice/default/footer.html @@ -0,0 +1,15 @@ +
+
+ +
+
\ No newline at end of file diff --git a/templates/frontOffice/default2020/layout.tpl b/templates/frontOffice/default2020/layout.tpl index cee8fd69..43ef1daa 100644 --- a/templates/frontOffice/default2020/layout.tpl +++ b/templates/frontOffice/default2020/layout.tpl @@ -193,12 +193,11 @@ GNU General Public License : http://www.gnu.org/licenses/ @@ -227,7 +225,7 @@ GNU General Public License : http://www.gnu.org/licenses/
{hookblock name="main.footer-body" fields="id,class,title,content"} {forhook rel="main.footer-body"} -
+

{$title}