diff --git a/local/modules/BrandsOnHome/BrandsOnHome.php b/local/modules/BrandsOnHome/BrandsOnHome.php new file mode 100644 index 00000000..a19e8a7e --- /dev/null +++ b/local/modules/BrandsOnHome/BrandsOnHome.php @@ -0,0 +1,11 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/local/modules/BrandsOnHome/Config/module.xml b/local/modules/BrandsOnHome/Config/module.xml new file mode 100644 index 00000000..195cc085 --- /dev/null +++ b/local/modules/BrandsOnHome/Config/module.xml @@ -0,0 +1,26 @@ + + + BrandsOnHome\BrandsOnHome + + Displays brands sold by the shop on site's homepage + + + Affiche les logos des marques vendues par la boutique sur sa page d'accueil + + + en_US + fr_FR + + 1.0 + + + Laurent LE CORRE + laurent@thecoredev.fr + + + classic + 2.3.0 + other + diff --git a/local/modules/BrandsOnHome/Hook/FrontHook.php b/local/modules/BrandsOnHome/Hook/FrontHook.php new file mode 100644 index 00000000..03599a4a --- /dev/null +++ b/local/modules/BrandsOnHome/Hook/FrontHook.php @@ -0,0 +1,20 @@ + + */ +class FrontHook extends BaseHook { + public function onMainContentBottom(HookRenderEvent $event) + { + $content = trim($this->render("main-content-bottom.html")); + if ("" != $content) { + $event->add($content); + } + } +} \ No newline at end of file diff --git a/local/modules/BrandsOnHome/I18n/en_US.php b/local/modules/BrandsOnHome/I18n/en_US.php new file mode 100644 index 00000000..585ffb17 --- /dev/null +++ b/local/modules/BrandsOnHome/I18n/en_US.php @@ -0,0 +1,6 @@ + 'Our brands', +]; + diff --git a/local/modules/BrandsOnHome/I18n/fr_FR.php b/local/modules/BrandsOnHome/I18n/fr_FR.php new file mode 100644 index 00000000..fc6fdab3 --- /dev/null +++ b/local/modules/BrandsOnHome/I18n/fr_FR.php @@ -0,0 +1,5 @@ + 'Nos marques', +]; diff --git a/local/modules/BrandsOnHome/Readme.md b/local/modules/BrandsOnHome/Readme.md new file mode 100644 index 00000000..5295e1aa --- /dev/null +++ b/local/modules/BrandsOnHome/Readme.md @@ -0,0 +1,55 @@ +# Brands On Home + +Add a short description here. You can also add a screenshot if needed. + +## Installation + +### Manually + +* Copy the module into ```/local/modules/``` directory and be sure that the name of the module is BrandsOnHome. +* Activate it in your thelia administration panel + +### Composer + +Add it in your main thelia composer.json file + +``` +composer require your-vendor/brands-on-home-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/BrandsOnHome/composer.json b/local/modules/BrandsOnHome/composer.json new file mode 100644 index 00000000..b2f6e30d --- /dev/null +++ b/local/modules/BrandsOnHome/composer.json @@ -0,0 +1,11 @@ +{ + "name": "your-vendor/brands-on-home-module", + "license": "LGPL-3.0+", + "type": "thelia-module", + "require": { + "thelia/installer": "~1.1" + }, + "extra": { + "installer-name": "BrandsOnHome" + } +} \ No newline at end of file diff --git a/local/modules/BrandsOnHome/templates/frontOffice/default/assets/style.css b/local/modules/BrandsOnHome/templates/frontOffice/default/assets/style.css new file mode 100644 index 00000000..bd157675 --- /dev/null +++ b/local/modules/BrandsOnHome/templates/frontOffice/default/assets/style.css @@ -0,0 +1,32 @@ +.brand_list { + display: flex; + justify-content: space-between; + align-items: center; + flex-wrap: wrap; + margin-bottom: 5px; +} + +.brand_list .item { + margin: 10px 0; +} + +.brands-heading h2 { + color: #7a7a7a; + font-size: 18px; + font-weight: bold; +} + +.list .brands-content > ul .item { + width: 100%; + float: none; +} +.list .brands-content > ul .item + .item { + padding-top: 15px; +} +.list .brands-content > ul .item > article { + margin-left: 0; +} +.list .brands-content > ul .item > article .product-image { + margin-bottom: 15px; + padding: 0; +} \ No newline at end of file diff --git a/local/modules/BrandsOnHome/templates/frontOffice/default/main-content-bottom.html b/local/modules/BrandsOnHome/templates/frontOffice/default/main-content-bottom.html new file mode 100644 index 00000000..42ef8c9e --- /dev/null +++ b/local/modules/BrandsOnHome/templates/frontOffice/default/main-content-bottom.html @@ -0,0 +1,21 @@ +
+
+

{intl l="Our brands" d="brandsonhome"}

+
+ +
+
+
    + {loop type="brand" name="brand_list"} + {loop type="image" name="brand_images" brand={$ID} width=100} +
  • +
    + {$TITLE} +
    +
  • + {/loop} + {/loop} +
+
+
+
\ No newline at end of file