{"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\/desactiver-les-deux-zooms-de-la-page-produit-astuce-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-Sans-titre-1-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\/desactiver-les-deux-zooms-de-la-page-produit-astuce-prestashop\/\" style=\"font-size:15px;font-weight:bold;;line-height:23px;\"> D\u00e9sactiver les deux zooms de la page produit |  Astuce Prestashop 1.6  <div class='yuzo_views_post yuzo_icon_views yuzo_icon_views__bottom' style='font-size:13px;'>views 4693<\/div><\/a>\n\t\t\t\t\t\t\t\t<span class=\"yuzo_text\" style=\"font-size:11px;\" >Ce tuto simple et rapide va vous permettre de d\u00e9sactiver les deux\u00a0zooms de la page produit.\r\n\r\nCette astuce est valable Prestashop 1.6. Le code \u00e9tant pratiquement similaire, ce tuto peut aussi s'appliquer \u00e0 Prestashop 1.5\r\n\r\n----------------------\r\n\r\n\r\n\r\nSur la page produit, il existe deux types de zoom :\r\n\r\n1) Le zoom \"pop-up\"\r\n\r\n\r\n\r\n2) Le zoom \"Jqzoom\"\r\n\r\n\r\n\r\nSi vous ne d\u00e9sirez pas avoir de zoom...<\/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\/savoir-si-votre-module-est-fiable-pour-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-service-validation-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\/savoir-si-votre-module-est-fiable-pour-prestashop\/\" style=\"font-size:15px;font-weight:bold;;line-height:23px;\"> Savoir si votre module est fiable pour Prestashop  <div class='yuzo_views_post yuzo_icon_views yuzo_icon_views__bottom' style='font-size:13px;'>views 477<\/div><\/a>\n\t\t\t\t\t\t\t\t<span class=\"yuzo_text\" style=\"font-size:11px;\" >Il existe aujourd'hui de nombreux modules (gratuits ou payants) et certains d'entre-eux peuvent avoir un impact n\u00e9gatif sur votre boutique (bug, lenteur....).\r\n\r\nIl existe deux astuces qui vont vous permettre de savoir si oui ou non vous pouvez installer le module sur votre boutique Prestashop\r\n\r\n\r\n1) Utilisez le service de validation de Prestashop\u00a0\r\nPrestashop a cr\u00e9\u00e9 un service qui permet de v\u00e9ri...<\/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\/bouton-suivantprecedent-sur-la-page-produit\/\" 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\/2014\/12\/prevnext_tut-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\/bouton-suivantprecedent-sur-la-page-produit\/\" style=\"font-size:15px;font-weight:bold;;line-height:23px;\"> Bouton Suivant\/Pr\u00e9cedent sur la page produit |  Astuce Prestashop 1.6  <div class='yuzo_views_post yuzo_icon_views yuzo_icon_views__bottom' style='font-size:13px;'>views 1982<\/div><\/a>\n\t\t\t\t\t\t\t\t<span class=\"yuzo_text\" style=\"font-size:11px;\" >Voici un petit tutoriel si vous d\u00e9sirez ajouter un bouton suivant\/pr\u00e9cedent sur la page produit\r\n\r\nCette astuce Prestashop est valable pour la version 1.5 et 1.6\r\n\r\n----------------\r\n\r\n1) Cr\u00e9ez un nouveau fichier qui se nommera Product.php dans override\/classes et ins\u00e9rez le code suivant :\r\n\r\n\r\n\r\n----------------\r\n\r\n2) Cr\u00e9ez un nouveau fichier qui se nommera ProductController.php dans override\/con...<\/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\/trouver-cle-page-web-infographie\/\" 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\/10\/mot-cle-seo-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\/trouver-cle-page-web-infographie\/\" style=\"font-size:15px;font-weight:bold;;line-height:23px;\"> Comment trouver LE bon mot cl\u00e9 pour sa page web | Infographie  <div class='yuzo_views_post yuzo_icon_views yuzo_icon_views__bottom' style='font-size:13px;'>views 1058<\/div><\/a>\n\t\t\t\t\t\t\t\t<span class=\"yuzo_text\" style=\"font-size:11px;\" >Si vous souhaitez vous positionner\u00a0dans les\u00a0moteurs de recherche et am\u00e9liorer votre visibilit\u00e9, il est tr\u00e8s important de choisir les bons mots-cl\u00e9s pour chacune de vos pages web.\r\nA) Qu'est ce qu'un mot-cl\u00e9 ?\r\nLe mot-cl\u00e9 d\u00e9signe\u00a0l'expression ou le mot que les internautes \u00a0tapent dans le moteur de recherche afin de lancer une recherche.\r\n\r\nSi vous vendez des bougies par exemple, il est important d'...<\/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\/comment-afficher-le-nom-du-produit-complet-prestashop-1-6-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\/2019\/08\/CommentafficherlenomduproduitcompletPrestaShop1.61.7-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\/comment-afficher-le-nom-du-produit-complet-prestashop-1-6-1-7\/\" style=\"font-size:15px;font-weight:bold;;line-height:23px;\"> Comment afficher le nom du produit complet \u2013 PrestaShop 1.6 &1.7  <div class='yuzo_views_post yuzo_icon_views yuzo_icon_views__bottom' style='font-size:13px;'>views 2536<\/div><\/a>\n\t\t\t\t\t\t\t\t<span class=\"yuzo_text\" style=\"font-size:11px;\" >Dans PrestaShop 1.6 et 1.7, si vos noms de produit sont trop long, ils vont \u00eatre coup\u00e9s.\r\n\r\nVous d\u00e9sirez peut-\u00eatre avoir le nom complet, c'est tr\u00e8s simple mais il faudra apporter la modification directement dans le fichier, on ne peut pas le faire depuis le back-office de PrestaShop\r\n\r\nPrestaShop 1.6 \r\n\r\nOuvrir le fichier product-list.tpl qui se situe dans themes > nomdevotretheme > product-...<\/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 Petit Memo sur [&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}]}}