{"id":815,"date":"2015-10-21T09:36:11","date_gmt":"2015-10-21T09:36:11","guid":{"rendered":"http:\/\/www.majory-cubizolles.fr\/blog\/?p=815"},"modified":"2017-01-23T18:27:22","modified_gmt":"2017-01-23T18:27:22","slug":"transformer-les-tabs-de-la-page-daccueil-en-bloc-prestashop","status":"publish","type":"post","link":"https:\/\/www.majory-cubizolles.fr\/blog\/transformer-les-tabs-de-la-page-daccueil-en-bloc-prestashop\/","title":{"rendered":"Transformer les tabs de la page d&rsquo;accueil en bloc |  Astuce Prestashop 1.6"},"content":{"rendered":"<p>Ce tutorial va vous permettre\u00a0de\u00a0transformer les tabs \u00ab\u00a0Populaire\u00a0\u00bb, \u00ab\u00a0Meilleurs ventes\u00a0\u00bb, \u00ab\u00a0Nouveaux Produits\u00a0\u00bb et \u00ab\u00a0Promotions\u00a0\u00bb de la page d&rsquo;accueil en bloc<\/p>\n<p><strong><strong>Cette astuce Prestashop a \u00e9t\u00e9 test\u00e9e\u00a0sur la version 1.6.1<\/strong><\/strong><\/p>\n<p>Attention, cette astuce est conseill\u00e9e pour les personnes qui connaissent un minimum Prestashop, html et css.<\/p>\n<p><!--more--><\/p>\n<h3><strong><span style=\"color: #000080;\">A)\u00a0\u00a0Bloc Populaire<\/span><\/strong><\/h3>\n<p><strong>1) \u00a0Aller dans Modules &gt; Positions.<\/strong><\/p>\n<p>1.1 ) D\u00e9greffer le module \u00ab\u00a0<span class=\"module_name\">Produits mis en avant sur la page d&rsquo;accueil\u00a0\u00bb du hook\u00a0<span class=\"hook_name\">displayHomeTab &amp;\u00a0displayHomeTabContent<\/span><\/span><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-816\" src=\"http:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/04\/Capture-d\u2019\u00e9cran-2015-04-29-\u00e0-10.48.33.png\" alt=\"Block Populaire \" width=\"887\" height=\"303\" \/><\/p>\n<p>1.2) Greffer le m\u00eame module sur le hook \u00ab\u00a0Display Home\u00a0\u00bb<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-817\" src=\"http:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/04\/Capture-d\u2019\u00e9cran-2015-04-29-\u00e0-10.51.35.png\" alt=\"Block Populaire \" width=\"1215\" height=\"198\" \/><\/p>\n<p>1.3) Si vous d\u00e9sirez, vous pouvez modifier la position \u00a0du module \u00ab\u00a0<span class=\"module_name\">Produits mis en avant sur la page d&rsquo;accueil\u00a0\u00bb<\/span><\/p>\n<p><a href=\"http:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/10\/Capture-d\u2019\u00e9cran-2015-10-19-\u00e0-17.39.37.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1217\" src=\"http:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/10\/Capture-d\u2019\u00e9cran-2015-10-19-\u00e0-17.39.37.png\" alt=\"Capture d\u2019\u00e9cran 2015-10-19 \u00e0 17.39.37\" width=\"853\" height=\"376\" \/><\/a><\/p>\n<p>2) Si vous retournez sur votre boutique, vous verrez que l&rsquo;onglet \u00ab\u00a0Populaire\u00a0\u00bb \u00a0forme maintenant un bloc. Mais le nom a disparu. Pour cela, allez dans votre th\u00e8me &gt; modules &gt; homefeatured &gt;\u00a0homefeatured.tpl<\/p>\n<p>Remplacer<\/p>\n<pre class=\"lang:default decode:true\">{if isset($products) &amp;&amp; $products}\r\n\t{include file=\"$tpl_dir.\/product-list.tpl\" class='homefeatured tab-pane' id='homefeatured'}\r\n{else}<\/pre>\n<p>Par<\/p>\n<pre class=\"lang:default decode:true \">{if isset($products) &amp;&amp; $products}\r\n&lt;h2 class=\"page-subheading\"&gt;{l s='Popular' mod='homefeatured'}&lt;\/h2&gt;\r\n\t{include file=\"$tpl_dir.\/product-list.tpl\" class='homefeatured tab-pane' id='homefeatured'}\r\n{else}<\/pre>\n<p>R\u00e9sultat<\/p>\n<p><a href=\"http:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/04\/Capture-d\u2019\u00e9cran-2015-04-29-\u00e0-11.05.56.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-818\" src=\"http:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/04\/Capture-d\u2019\u00e9cran-2015-04-29-\u00e0-11.05.56.png\" alt=\"Block Poulaire\" width=\"1257\" height=\"499\" \/><\/a><\/p>\n<h3><span style=\"color: #000080;\"><strong>B) \u00a0\u00a0Bloc Meilleurs Ventes\u00a0<\/strong><\/span><\/h3>\n<p>Nous allons overrider le fichier \u00ab\u00a0blockbestsellers.php\u00a0\u00bb. En effet si par exemple vous d\u00e9sirez mettre \u00e0 jour le module, \u00a0les modifications ne seront pas supprim\u00e9es. Il est possible d&rsquo;overrider un module qu&rsquo;\u00e0 partir de 1.6.014<\/p>\n<ol>\n<ol>\n<li>Aller dans override &gt; modules.<\/li>\n<li>Cr\u00e9er\u00a0un dossier qui se nommera :\u00a0blockbestsellers<\/li>\n<li>A l&rsquo;int\u00e9rieur du dossier, cr\u00e9er un fichier \u00a0qui se nommera : \u00a0blockbestsellers.php\u00a0et ins\u00e9rer le code suivant<\/li>\n<\/ol>\n<\/ol>\n<pre class=\"lang:default decode:true\">&lt;?php\r\n\/*\r\n* 2007-2015 PrestaShop\r\n*\r\n* NOTICE OF LICENSE\r\n*\r\n* This source file is subject to the Academic Free License (AFL 3.0)\r\n* that is bundled with this package in the file LICENSE.txt.\r\n* It is also available through the world-wide-web at this URL:\r\n* http:\/\/opensource.org\/licenses\/afl-3.0.php\r\n* If you did not receive a copy of the license and are unable to\r\n* obtain it through the world-wide-web, please send an email\r\n* to license@prestashop.com so we can send you a copy immediately.\r\n*\r\n* DISCLAIMER\r\n*\r\n* Do not edit or add to this file if you wish to upgrade PrestaShop to newer\r\n* versions in the future. If you wish to customize PrestaShop for your\r\n* needs please refer to http:\/\/www.prestashop.com for more information.\r\n*\r\n*  @author PrestaShop SA &lt;contact@prestashop.com&gt;\r\n*  @copyright  2007-2015 PrestaShop SA\r\n*  @license    http:\/\/opensource.org\/licenses\/afl-3.0.php  Academic Free License (AFL 3.0)\r\n*  International Registered Trademark &amp; Property of PrestaShop SA\r\n*\/\r\n\r\nif (!defined('_PS_VERSION_'))\r\n\texit;\r\n\r\nclass BlockBestSellersOverride extends BlockBestSellers\r\n{\r\n\tpublic function hookDisplayHome($params)\r\n\t{\r\n\t\tif (!$this-&gt;isCached('blockbestsellers-home.tpl', $this-&gt;getCacheId('blockbestsellers-home')))\r\n\t\t{\r\n\t\t\t$best_sellers = $this-&gt;getBestSellers($params);\r\n\t\t\tif ($best_sellers === false)\r\n\t\t\t\treturn;\r\n\t\t\t$this-&gt;smarty-&gt;assign(array(\r\n\t\t\t\t'best_sellers' =&gt; $best_sellers,\r\n\t\t\t\t'homeSize' =&gt; Image::getSize(ImageType::getFormatedName('home'))));\r\n\t\t}\r\n\t\treturn $this-&gt;display(__FILE__, 'blockbestsellers-home.tpl', $this-&gt;getCacheId('blockbestsellers-home'));\r\n\t}\r\n\t\r\n\t\r\n\r\n}<\/pre>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>4) Dans le back office de Prestashop, allez dans Modules &gt; Positions<\/p>\n<p>4.1 ) D\u00e9greffer le module \u00ab\u00a0Bloc meilleures ventes\u00a0\u00bb du hook\u00a0<span class=\"hook_name\">displayHomeTab &amp;\u00a0displayHomeTabContent<\/span><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-820\" src=\"http:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/04\/Capture-d\u2019\u00e9cran-2015-04-29-\u00e0-11.16.05.png\" alt=\"Block Meilleurs Ventes\" width=\"987\" height=\"306\" \/><\/p>\n<p>4.2) Greffer le module \u00ab\u00a0Bloc meilleures ventes\u00a0\u00bb sur le hook displayHome<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-821\" src=\"http:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/04\/Capture-d\u2019\u00e9cran-2015-04-29-\u00e0-11.17.56.png\" alt=\"Block Meilleurs Ventes\" width=\"1219\" height=\"141\" \/><\/p>\n<p>4.3) Si vous d\u00e9sirez, vous pouvez modifier la position du module \u00ab\u00a0Bloc meilleures ventes\u00a0\u00bb<\/p>\n<p><a href=\"http:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/10\/Capture-d\u2019\u00e9cran-2015-10-19-\u00e0-17.39.37.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1217\" src=\"http:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/10\/Capture-d\u2019\u00e9cran-2015-10-19-\u00e0-17.39.37.png\" alt=\"Capture d\u2019\u00e9cran 2015-10-19 \u00e0 17.39.37\" width=\"853\" height=\"376\" \/><\/a><\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>5) Nous allons donner\u00a0un nom au block.\u00a0\u00a0Pour cela, ouvrir le fichier\u00a0blockbestsellers-home.tpl (selon la version de prestashop, le fichier n&rsquo;est pas pas au m\u00eame endroit dans le module\u00a0\u00bb\u00a0par exemple sur la version 1.6.09, il est \u00e0 la racine mais\u00a0sur la version 1.6.014 il se situe dans le fichier \u00ab\u00a0views\u00a0\u00bb).<\/p>\n<p>Remplacer<\/p>\n<pre class=\"lang:default decode:true\">{if isset($best_sellers) &amp;&amp; $best_sellers}\r\n\t{include file=\"$tpl_dir.\/product-list.tpl\" products=$best_sellers class='blockbestsellers tab-pane' id='blockbestsellers'}\r\n{else}<\/pre>\n<p>Par<\/p>\n<pre class=\"lang:default decode:true\">{if isset($best_sellers) &amp;&amp; $best_sellers}\r\n&lt;h2 class=\"page-subheading\"&gt;{l s='Best Sellers' mod='blockbestsellers'}&lt;\/h2&gt;\r\n {include file=\"$tpl_dir.\/product-list.tpl\" products=$best_sellers class='blockbestsellers tab-pane' id='blockbestsellers'}\r\n{else}<\/pre>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>R\u00e9sultat :<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1221\" src=\"http:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/10\/Capture-d\u2019\u00e9cran-2015-10-19-\u00e0-18.04.46.png\" alt=\"Capture d\u2019\u00e9cran 2015-10-19 \u00e0 18.04.46\" width=\"1244\" height=\"486\" \/><\/p>\n<h3><span style=\"color: #000080;\"><strong>C) \u00a0\u00a0Bloc Nouveaut\u00e9<\/strong><\/span><\/h3>\n<p>Nous allons overrider le fichier \u00ab\u00a0blocknewproducts.php\u00a0\u00bb. En effet si par exemple vous d\u00e9sirez mettre \u00e0 jour le module, \u00a0les modifications ne seront pas supprim\u00e9es. Il est possible d&rsquo;overrider un module qu&rsquo;\u00e0 partir de 1.6.014<\/p>\n<ol>\n<li>Aller dans override &gt; modules.<\/li>\n<li>Cr\u00e9er\u00a0un dossier qui se nommera : blocknewproducts<\/li>\n<li>A l&rsquo;int\u00e9rieur du dossier, cr\u00e9er un fichier \u00a0qui se nommera : blocknewproducts.php et ins\u00e9rer le code suivant<\/li>\n<\/ol>\n<pre class=\"lang:default decode:true \">&lt;?php\r\n\/*\r\n* 2007-2014 PrestaShop\r\n*\r\n* NOTICE OF LICENSE\r\n*\r\n* This source file is subject to the Academic Free License (AFL 3.0)\r\n* that is bundled with this package in the file LICENSE.txt.\r\n* It is also available through the world-wide-web at this URL:\r\n* http:\/\/opensource.org\/licenses\/afl-3.0.php\r\n* If you did not receive a copy of the license and are unable to\r\n* obtain it through the world-wide-web, please send an email\r\n* to license@prestashop.com so we can send you a copy immediately.\r\n*\r\n* DISCLAIMER\r\n*\r\n* Do not edit or add to this file if you wish to upgrade PrestaShop to newer\r\n* versions in the future. If you wish to customize PrestaShop for your\r\n* needs please refer to http:\/\/www.prestashop.com for more information.\r\n*\r\n*  @author PrestaShop SA &lt;contact@prestashop.com&gt;\r\n*  @copyright  2007-2014 PrestaShop SA\r\n*  @license    http:\/\/opensource.org\/licenses\/afl-3.0.php  Academic Free License (AFL 3.0)\r\n*  International Registered Trademark &amp; Property of PrestaShop SA\r\n*\/\r\n\r\nif (!defined('_PS_VERSION_'))\r\n\texit;\r\n\r\nclass BlockNewProductsOverride extends BlockNewProducts\r\n{\r\n\t\r\n\t\r\n\t     public function hookDisplayHome($params)\r\n        {\r\n            if (!$this-&gt;isCached('blocknewproducts_home.tpl', $this-&gt;getCacheId()))\r\n            {\r\n                if (!isset(BlockNewProducts::$cache_new_products))\r\n                    BlockNewProducts::$cache_new_products = $this-&gt;getNewProducts();\r\n     \r\n                $this-&gt;smarty-&gt;assign(array(\r\n                    'new_products' =&gt; BlockNewProducts::$cache_new_products,\r\n                    'mediumSize' =&gt; Image::getSize(ImageType::getFormatedName('medium')),\r\n                    'homeSize' =&gt; Image::getSize(ImageType::getFormatedName('home'))\r\n                ));\r\n            }\r\n     \r\n            if (BlockNewProducts::$cache_new_products === false)\r\n                return false;\r\n     \r\n            return $this-&gt;display(__FILE__, 'blocknewproducts_home.tpl', $this-&gt;getCacheId());\r\n        }\r\n\r\n\t\r\n}\r\n<\/pre>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>4) Dans le back office de Prestashop, allez dans Modules &gt; Positions<\/p>\n<p>4.1 ) D\u00e9greffer le module \u00ab\u00a0<span class=\"module_name\">Bloc nouveaux produits<\/span>\u00a0\u00bb du hook\u00a0<span class=\"hook_name\">displayHomeTab &amp;\u00a0displayHomeTabContent<\/span><\/p>\n<p><a href=\"http:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/05\/Capture-d\u2019\u00e9cran-2015-05-05-\u00e0-19.37.15.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-851\" src=\"http:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/05\/Capture-d\u2019\u00e9cran-2015-05-05-\u00e0-19.37.15.png\" alt=\"Bloc Nouveaux Produits - Prestashop \" width=\"918\" height=\"310\" \/><\/a><\/p>\n<p>4.2) Greffer le\u00a0le module \u00ab\u00a0Bloc nouveaux produits\u00a0\u00bb sur le hook displayHome<\/p>\n<p><a href=\"http:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/05\/Capture-d\u2019\u00e9cran-2015-05-05-\u00e0-19.37.54.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-852\" src=\"http:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/05\/Capture-d\u2019\u00e9cran-2015-05-05-\u00e0-19.37.54.png\" alt=\"Bloc Nouveaux Produits - Prestashop \" width=\"1222\" height=\"147\" srcset=\"https:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/05\/Capture-d\u2019\u00e9cran-2015-05-05-\u00e0-19.37.54.png 1222w, https:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/05\/Capture-d\u2019\u00e9cran-2015-05-05-\u00e0-19.37.54-300x36.png 300w, https:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/05\/Capture-d\u2019\u00e9cran-2015-05-05-\u00e0-19.37.54-1024x123.png 1024w, https:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/05\/Capture-d\u2019\u00e9cran-2015-05-05-\u00e0-19.37.54-624x75.png 624w\" sizes=\"(max-width: 1222px) 100vw, 1222px\" \/><\/a><\/p>\n<p>4.3) Si vous d\u00e9sirez, vous pouvez modifier la position du module \u00ab\u00a0Bloc nouveaux produits\u00a0\u00bb<\/p>\n<p><a href=\"http:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/10\/Capture-d\u2019\u00e9cran-2015-10-19-\u00e0-17.56.01.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1219\" src=\"http:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/10\/Capture-d\u2019\u00e9cran-2015-10-19-\u00e0-17.56.01.png\" alt=\"Capture d\u2019\u00e9cran 2015-10-19 \u00e0 17.56.01\" width=\"871\" height=\"442\" \/><\/a><\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>5) Nous allons donner\u00a0un nom au block.\u00a0\u00a0Pour cela, ouvrir le fichierblocknewproducts_home.tpl (selon la version de prestashop, le fichier n&rsquo;est pas pas au m\u00eame endroit dans le module\u00a0\u00bb\u00a0par exemple sur la version 1.6.09, il est \u00e0 la racine mais\u00a0sur la version 1.6.014 il se situe dans le fichier \u00ab\u00a0views\u00a0\u00bb).<\/p>\n<p>Remplacer<\/p>\n<pre class=\"lang:default decode:true\">{if isset($new_products) &amp;&amp; $new_products}\r\n\t{include file=\"$tpl_dir.\/product-list.tpl\" products=$new_products class='blocknewproducts tab-pane' id='blocknewproducts'}\r\n{else}<\/pre>\n<p>Par<\/p>\n<pre class=\"lang:default decode:true\">{if isset($new_products) &amp;&amp; $new_products}\r\n&lt;h2 class=\"page-subheading\"&gt;{l s='New products' mod='blocknewproducts'}&lt;\/h2&gt;\r\n {include file=\"$tpl_dir.\/product-list.tpl\" products=$new_products class='blocknewproducts tab-pane' id='blocknewproducts'}\r\n{else}<\/pre>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>R\u00e9sultat :<\/p>\n<p><a href=\"http:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/10\/Capture-d\u2019\u00e9cran-2015-10-19-\u00e0-18.04.01.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1220\" src=\"http:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/10\/Capture-d\u2019\u00e9cran-2015-10-19-\u00e0-18.04.01.png\" alt=\"Capture d\u2019\u00e9cran 2015-10-19 \u00e0 18.04.01\" width=\"1230\" height=\"481\" \/><\/a><\/p>\n<h3><span style=\"color: #000080;\"><strong>D) \u00a0\u00a0Bloc Promotion<\/strong><\/span><\/h3>\n<p>Nous allons overrider le fichier \u00ab\u00a0blockspecials.php\u00a0\u00bb. En effet si par exemple vous d\u00e9sirez mettre \u00e0 jour le module, \u00a0les modifications ne seront pas supprim\u00e9es. Il est possible d&rsquo;overrider un module qu&rsquo;\u00e0 partir de 1.6.014<\/p>\n<ol>\n<li>Aller dans override &gt; modules.<\/li>\n<li>Cr\u00e9er\u00a0un dossier qui se nommera : blockspecials<\/li>\n<li>A l&rsquo;int\u00e9rieur du dossier, cr\u00e9er un fichier \u00a0qui se nommera : blockspecials.php et ins\u00e9rer le code suivant<\/li>\n<\/ol>\n<pre class=\"lang:default decode:true\">class BlockSpecialsOverride extends BlockSpecials\r\n{\t\r\n\tpublic function hookDisplayHome($params)\r\n\t{\r\n\t\tif (Configuration::get('PS_CATALOG_MODE'))\r\n\t\t\treturn;\r\n\r\n\t\tif (!$this-&gt;isCached('blockspecials-home.tpl', $this-&gt;getCacheId('blockspecials-home')))\r\n\t\t{\r\n\t\t\tBlockSpecials::$cache_specials = Product::getPricesDrop((int)$params['cookie']-&gt;id_lang, 0, Configuration::get('BLOCKSPECIALS_SPECIALS_NBR'));\r\n\r\n\t\tif (BlockSpecials::$cache_specials === false)\r\n\t\t\treturn false;\r\n\r\n\t\t\t\r\n\t\t\t$this-&gt;smarty-&gt;assign(array(\r\n\t\t\t\t'specials' =&gt; BlockSpecials::$cache_specials,\r\n\t\t\t\t'homeSize' =&gt; Image::getSize(ImageType::getFormatedName('home'))\r\n\t\t\t));\r\n\t\t}\t\r\n\r\n\t\treturn $this-&gt;display(__FILE__, 'blockspecials-home.tpl', $this-&gt;getCacheId('blockspecials-home'));\r\n\t}\r\n\t\t\r\n\t\r\n\t}<\/pre>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>4) Dans le back office de Prestashop, allez dans Modules &gt; Positions<\/p>\n<p>4.1 ) D\u00e9greffer le module \u00ab\u00a0<span class=\"module_name\">Bloc promotions<\/span>\u00a0\u00bb du hook\u00a0<span class=\"hook_name\">displayHomeTab &amp;\u00a0displayHomeTabContent<\/span><\/p>\n<p><a href=\"http:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/10\/Capture-d\u2019\u00e9cran-2015-10-19-\u00e0-20.12.29.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1223\" src=\"http:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/10\/Capture-d\u2019\u00e9cran-2015-10-19-\u00e0-20.12.29.png\" alt=\"Capture d\u2019\u00e9cran 2015-10-19 \u00e0 20.12.29\" width=\"863\" height=\"294\" \/><\/a><\/p>\n<p>4.2) Greffer le\u00a0le module \u00ab\u00a0Bloc promotions\u00a0\u00bb sur le hook displayHome<\/p>\n<p><a href=\"http:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/10\/Capture-d\u2019\u00e9cran-2015-10-19-\u00e0-20.13.44.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1224\" src=\"http:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/10\/Capture-d\u2019\u00e9cran-2015-10-19-\u00e0-20.13.44.png\" alt=\"Capture d\u2019\u00e9cran 2015-10-19 \u00e0 20.13.44\" width=\"1211\" height=\"171\" \/><\/a><\/p>\n<p>4.3) Si vous d\u00e9sirez, vous pouvez modifier la position du module \u00ab\u00a0Bloc promotions\u00a0\u00bb<\/p>\n<p><a href=\"http:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/10\/Capture-d\u2019\u00e9cran-2015-10-19-\u00e0-20.14.48.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1225\" src=\"http:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/10\/Capture-d\u2019\u00e9cran-2015-10-19-\u00e0-20.14.48.png\" alt=\"Capture d\u2019\u00e9cran 2015-10-19 \u00e0 20.14.48\" width=\"864\" height=\"501\" \/><\/a><\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>5) Nous allons donner\u00a0un nom au block.\u00a0\u00a0Pour cela, ouvrir le fichier blockspecials-home.tpl (selon la version de prestashop, le fichier n&rsquo;est pas pas au m\u00eame endroit dans le module\u00a0\u00bb\u00a0par exemple sur la version 1.6.09, il est \u00e0 la racine mais\u00a0sur la version 1.6.014 il se situe dans le fichier \u00ab\u00a0views\u00a0\u00bb).<\/p>\n<p>Remplacer<\/p>\n<pre class=\"lang:default decode:true\">{if isset($specials) &amp;&amp; $specials}\r\n\t{include file=\"$tpl_dir.\/product-list.tpl\" products=$specials class='blockspecials tab-pane' id='blockspecials'}\r\n{else}<\/pre>\n<p>Par<\/p>\n<pre class=\"lang:default decode:true\">{if isset($specials) &amp;&amp; $specials}\r\n&lt;h2 class=\"page-subheading\"&gt;{l s='Specials' mod='blockspecials'}&lt;\/h2&gt;\r\n\t{include file=\"$tpl_dir.\/product-list.tpl\" products=$specials class='blockspecials tab-pane' id='blockspecials'}\r\n{else}<\/pre>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>R\u00e9sultat :<\/p>\n<p><a href=\"http:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/10\/Capture-d\u2019\u00e9cran-2015-10-19-\u00e0-20.16.32.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1226\" src=\"http:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/10\/Capture-d\u2019\u00e9cran-2015-10-19-\u00e0-20.16.32.png\" alt=\"Capture d\u2019\u00e9cran 2015-10-19 \u00e0 20.16.32\" width=\"1116\" height=\"445\" \/><\/a><\/p>\n<p>Et voila. Il faudra un peu de css pour harmoniser tout cela mais maintenant vous avez vos blocs<\/p>\n<p>&nbsp;<\/p>\n<!-- Begin Yuzo --><div class='yuzo_related_post style-2'  data-version='5.12.88'><!-- without result --><div class='yuzo_clearfixed yuzo__title yuzo__title'><h2>Articles similaires<\/h2><\/div>\n\t\t\t\t\t\t<div class=\"relatedthumb yuzo-list  \" style=\"\"  >  \n\t\t\t\t\t\t  <a  href=\"https:\/\/www.majory-cubizolles.fr\/blog\/bonjour-tout-le-monde\/\" class=\"image-list\" target='_blank' >\n\t\t\t\t\t\t  <div class=\"yuzo-img-wrap \" style=\"width: 185px;height:150px;\">\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t <div class=\"yuzo-img\" style=\"background:url('http:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/plugins\/yuzo-related-post\/assets\/images\/default.png') 50% 50% no-repeat;width: 190px;height:150px;margin-bottom: 5px;background-size:  cover;  \"><\/div>\n\t\t\t\t\t\t  <\/div>\n\t\t\t\t\t\t  <\/a>\n\t\t\t\t\t\t  <a  class=\"link-list yuzo__text--title\" href=\"https:\/\/www.majory-cubizolles.fr\/blog\/bonjour-tout-le-monde\/\" style=\"font-size:15px;font-weight:bold;;line-height:23px;\"> Pr\u00e9sentation  <div class='yuzo_views_post yuzo_icon_views yuzo_icon_views__bottom' style='font-size:13px;'>views 141<\/div><\/a>\n\t\t\t\t\t\t\t\t<span class=\"yuzo_text\" style=\"font-size:11px;\" >\r\nQu\u2019est ce que le e-commerce ?\r\nL'e-commerce ou commerce \u00e9lectronique ou vente en ligne, d\u00e9signe l'\u00e9change de biens et de services entre deux entit\u00e9s sur les r\u00e9seaux informatiques, notamment Internet.\r\n\r\nEn France, les professionnels du secteur sont rassembl\u00e9s au sein de la F\u00e9d\u00e9ration du Commerce Electronique et de la Vente \u00e0 Distance (FEVAD).\r\n\r\n\r\n\r\n\r\n\r\n\r\nDiff\u00e9rence entre e-commerce et e-busines...<\/span>\n\t\t\t\t\t\t   \n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div class=\"relatedthumb yuzo-list  \" style=\"\"  >  \n\t\t\t\t\t\t  <a  href=\"https:\/\/www.majory-cubizolles.fr\/blog\/taille-des-images-du-theme-par-defaut-de-prestashop\/\" class=\"image-list\" target='_blank' >\n\t\t\t\t\t\t  <div class=\"yuzo-img-wrap \" style=\"width: 185px;height:150px;\">\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t <div class=\"yuzo-img\" style=\"background:url('https:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2016\/07\/wsi-imageoptim-images-demo1-657x3451-400x249.png') 50% 50% no-repeat;width: 190px;height:150px;margin-bottom: 5px;background-size:  cover;  \"><\/div>\n\t\t\t\t\t\t  <\/div>\n\t\t\t\t\t\t  <\/a>\n\t\t\t\t\t\t  <a  class=\"link-list yuzo__text--title\" href=\"https:\/\/www.majory-cubizolles.fr\/blog\/taille-des-images-du-theme-par-defaut-de-prestashop\/\" style=\"font-size:15px;font-weight:bold;;line-height:23px;\"> Taille des Images du th\u00e8me par d\u00e9faut de Prestashop 1.6  <div class='yuzo_views_post yuzo_icon_views yuzo_icon_views__bottom' style='font-size:13px;'>views 7042<\/div><\/a>\n\t\t\t\t\t\t\t\t<span class=\"yuzo_text\" style=\"font-size:11px;\" >Ce tutoriel va vous permettre de connaitre la taille des images du th\u00e8me par d\u00e9faut de Prestashop\r\n\r\nLa plupart des images\u00a0que vous t\u00e9l\u00e9chargez dans le back-office doivent \u00eatre enregistr\u00e9es au format .jpg ou .png. Attention pour activer le format png il faut aller dans Pr\u00e9f\u00e9rences > Images et dans la partie \"Options de g\u00e9n\u00e9ration d'images\", cochez dans format d'image :\u00a0Utiliser le PNG uniquemen...<\/span>\n\t\t\t\t\t\t   \n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div class=\"relatedthumb yuzo-list  \" style=\"\"  >  \n\t\t\t\t\t\t  <a  href=\"https:\/\/www.majory-cubizolles.fr\/blog\/modifier-larriere-plan-de-boutique-prestashop-1-7\/\" class=\"image-list\" target='_blank' >\n\t\t\t\t\t\t  <div class=\"yuzo-img-wrap \" style=\"width: 185px;height:150px;\">\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t <div class=\"yuzo-img\" style=\"background:url('https:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2017\/05\/bg_prestashop1.7-thumb-400x249.jpg') 50% 50% no-repeat;width: 190px;height:150px;margin-bottom: 5px;background-size:  cover;  \"><\/div>\n\t\t\t\t\t\t  <\/div>\n\t\t\t\t\t\t  <\/a>\n\t\t\t\t\t\t  <a  class=\"link-list yuzo__text--title\" href=\"https:\/\/www.majory-cubizolles.fr\/blog\/modifier-larriere-plan-de-boutique-prestashop-1-7\/\" style=\"font-size:15px;font-weight:bold;;line-height:23px;\"> Modifier l\u2019arri\u00e8re-plan de votre boutique Prestashop 1.7  <div class='yuzo_views_post yuzo_icon_views yuzo_icon_views__bottom' style='font-size:13px;'>views 9745<\/div><\/a>\n\t\t\t\t\t\t\t\t<span class=\"yuzo_text\" style=\"font-size:11px;\" >Dans ce tutorial, nous allons voir comment modifier les couleurs de fond de votre boutique en ligne Prestashop 1.7. Tout se passe \u00e0 l'int\u00e9rieur des codes.\r\n\r\n1) Haut de page\r\n 2) Contenu\r\n 3) Bas de page\r\n\r\n\r\n\r\n------------------------------------------------------------------\r\nA) Etape 1 : \r\nOuvrir le fichier themes.css dans \/themes\/classic\/assets\/css\/theme.css\r\n\r\n\r\nB) Etape 2 : \r\nDans certaines ...<\/span>\n\t\t\t\t\t\t   \n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div class=\"relatedthumb yuzo-list  \" style=\"\"  >  \n\t\t\t\t\t\t  <a  href=\"https:\/\/www.majory-cubizolles.fr\/blog\/quelques-astuces-aider-a-creer-site-e-commerce-prestashop\/\" class=\"image-list\" target='_blank' >\n\t\t\t\t\t\t  <div class=\"yuzo-img-wrap \" style=\"width: 185px;height:150px;\">\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t <div class=\"yuzo-img\" style=\"background:url('https:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2016\/11\/aide-creation-site-ecommerce-400x249.jpg') 50% 50% no-repeat;width: 190px;height:150px;margin-bottom: 5px;background-size:  cover;  \"><\/div>\n\t\t\t\t\t\t  <\/div>\n\t\t\t\t\t\t  <\/a>\n\t\t\t\t\t\t  <a  class=\"link-list yuzo__text--title\" href=\"https:\/\/www.majory-cubizolles.fr\/blog\/quelques-astuces-aider-a-creer-site-e-commerce-prestashop\/\" style=\"font-size:15px;font-weight:bold;;line-height:23px;\"> Quelques astuces pour vous aider \u00e0 cr\u00e9er un site e-commerce avec Prestashop  <div class='yuzo_views_post yuzo_icon_views yuzo_icon_views__bottom' style='font-size:13px;'>views 1119<\/div><\/a>\n\t\t\t\t\t\t\t\t<span class=\"yuzo_text\" style=\"font-size:11px;\" >Cr\u00e9er son site e-commerce avec Prestashop n'est pas toujours facile.\u00a0Je mettrais r\u00e9guli\u00e8rement des documents que vous pourrez t\u00e9l\u00e9charger afin de mieux vous aidez dans la cr\u00e9ation de votre site e-commerce.\r\nDocument 1 : Mod\u00e8le de cahier des charges\u00a0\r\nAvant de se lancer dans l'aventure de l'e-commerce, il est tr\u00e8s important de mettre par \u00e9crit un ensemble d'informations qui va vous aider pour la su...<\/span>\n\t\t\t\t\t\t   \n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div class=\"relatedthumb yuzo-list  \" style=\"\"  >  \n\t\t\t\t\t\t  <a  href=\"https:\/\/www.majory-cubizolles.fr\/blog\/desactiver-les-taxes-dans-prestashop\/\" class=\"image-list\" target='_blank' >\n\t\t\t\t\t\t  <div class=\"yuzo-img-wrap \" style=\"width: 185px;height:150px;\">\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t <div class=\"yuzo-img\" style=\"background:url('https:\/\/www.majory-cubizolles.fr\/blog\/wp-content\/uploads\/2015\/01\/Capture-d\u2019e\u0301cran-2015-01-26-a\u0300-12.26.59-300x187.png') 50% 50% no-repeat;width: 190px;height:150px;margin-bottom: 5px;background-size:  cover;  \"><\/div>\n\t\t\t\t\t\t  <\/div>\n\t\t\t\t\t\t  <\/a>\n\t\t\t\t\t\t  <a  class=\"link-list yuzo__text--title\" href=\"https:\/\/www.majory-cubizolles.fr\/blog\/desactiver-les-taxes-dans-prestashop\/\" style=\"font-size:15px;font-weight:bold;;line-height:23px;\"> D\u00e9sactiver les taxes |  Astuce Prestashop 1.6  <div class='yuzo_views_post yuzo_icon_views yuzo_icon_views__bottom' style='font-size:13px;'>views 1659<\/div><\/a>\n\t\t\t\t\t\t\t\t<span class=\"yuzo_text\" style=\"font-size:11px;\" >Si vous d\u00e9sirez d\u00e9sactiver les taxes dans prestashop, suivez les deux \u00e9tapes suivantes\r\n\r\n1) Allez dans pr\u00e9f\u00e9rences > taxes\r\n\r\n\r\n\r\n\r\n2) Options des taxes > Activer les taxes : non\r\n\r\n\r\n\r\nEh voila c'\u00e9tait tout simple les taxes sont d\u00e9sactiv\u00e9es.<\/span>\n\t\t\t\t\t\t   \n\t\t\t\t\t\t<\/div>\n<\/div>  <!-- End Yuzo :) -->","protected":false},"excerpt":{"rendered":"<p>Ce tutorial va vous permettre\u00a0de\u00a0transformer les tabs \u00ab\u00a0Populaire\u00a0\u00bb, \u00ab\u00a0Meilleurs ventes\u00a0\u00bb, \u00ab\u00a0Nouveaux Produits\u00a0\u00bb et \u00ab\u00a0Promotions\u00a0\u00bb de la page d&rsquo;accueil en bloc Cette astuce Prestashop a \u00e9t\u00e9 test\u00e9e\u00a0sur la version 1.6.1 Attention, cette astuce est conseill\u00e9e pour les personnes qui connaissent un minimum Prestashop, html et css. Articles similaires Comment configurer le [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1228,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,11],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.majory-cubizolles.fr\/blog\/wp-json\/wp\/v2\/posts\/815"}],"collection":[{"href":"https:\/\/www.majory-cubizolles.fr\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.majory-cubizolles.fr\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.majory-cubizolles.fr\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.majory-cubizolles.fr\/blog\/wp-json\/wp\/v2\/comments?post=815"}],"version-history":[{"count":0,"href":"https:\/\/www.majory-cubizolles.fr\/blog\/wp-json\/wp\/v2\/posts\/815\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.majory-cubizolles.fr\/blog\/wp-json\/wp\/v2\/media\/1228"}],"wp:attachment":[{"href":"https:\/\/www.majory-cubizolles.fr\/blog\/wp-json\/wp\/v2\/media?parent=815"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.majory-cubizolles.fr\/blog\/wp-json\/wp\/v2\/categories?post=815"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.majory-cubizolles.fr\/blog\/wp-json\/wp\/v2\/tags?post=815"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}