{"id":1633,"date":"2017-10-19T14:13:39","date_gmt":"2017-10-19T12:13:39","guid":{"rendered":"https:\/\/www.h-hennes.fr\/blog\/?p=1633"},"modified":"2023-09-13T09:06:15","modified_gmt":"2023-09-13T07:06:15","slug":"prestashop-1-7-ajouter-des-champs-produit","status":"publish","type":"post","link":"https:\/\/www.h-hennes.fr\/blog\/2017\/10\/19\/prestashop-1-7-ajouter-des-champs-produit\/","title":{"rendered":"Prestashop 1.7 : Ajouter des champs produit"},"content":{"rendered":"<p>La nouvelle version 1.7 de Prestashop introduit de gros changements dans la gestion backoffice des fiches produits.<br \/>\nCette page utilise les nouvelles m\u00e9thodes symfony et tout les modules souhaitant ajouter des informations produits doivent se mettre \u00e0 jour pour utiliser les nouvelles m\u00e9thodes.<br \/>\nComme d&rsquo;habitude la documentation prestashop n&rsquo;est pas exhaustive et je n&rsquo;ai \u00e0 date trouv\u00e9 aucune information ni tutoriel sur le sujet.<\/p>\n<p>Nous allons donc voir ensemble comment rajouter des nouveaux champs produits et les g\u00e9rer dans l&rsquo;administration avec Prestashop 1.7<br \/>\nPour cela nous allons cr\u00e9er un module <strong>hhproduct<\/strong>.<\/p>\n<p>Celui-ci ajoutera des nouveaux champs \u00e0 notre entit\u00e9 produit.<\/p>\n<ul>\n<li>custom_field<\/li>\n<li>custom_field_lang<\/li>\n<li>custom_field_lang_wysiwyg<\/li>\n<\/ul>\n<p>Nous allons donc de surcharger l\u2019objet <strong>Product<\/strong> afin de lui ajouter ces nouveaux champs.<br \/>\nPour cela cr\u00e9er un fichier <em>Product.php<\/em> avec le contenu suivant dans le dossier override\/classes du module.<\/p>\n<pre lang=\"php\" escaped=\"true\">class Product extends ProductCore {\r\n    \r\n    public $custom_field;\r\n    public $custom_field_lang;\r\n    public $custom_field_lang_wysiwyg;\r\n    \r\n    public function __construct($id_product = null, $full = false, $id_lang = null, $id_shop = null, \\Context $context = null) {\r\n        \/\/D\u00e9finition des nouveaux champs\r\n        self::$definition['fields']['custom_field'] = [\r\n            'type' =&gt; self::TYPE_STRING,\r\n            'required' =&gt; false, 'size' =&gt; 255\r\n        ];\r\n        self::$definition['fields']['custom_field_lang']     = [\r\n            'type' =&gt; self::TYPE_STRING,\r\n            'lang' =&gt; true,\r\n            'required' =&gt; false, 'size' =&gt; 255\r\n        ];\r\n        self::$definition['fields']['custom_field_lang_wysiwyg']     = [\r\n            'type' =&gt; self::TYPE_HTML,\r\n            'lang' =&gt; true,\r\n            'required' =&gt; false,\r\n            'validate' =&gt; 'isCleanHtml'\r\n        ];\r\n        parent::__construct($id_product, $full, $id_lang, $id_shop, $context);\r\n    }\r\n}\r\n<\/pre>\n<p>lors de l\u2019installation du module ce fichier sera automatiquement plac\u00e9 dans le dossier des overrides par Prestashop.<br \/>\nContrairement aux autres formulaires Prestashop les hooks sp\u00e9cifiques d&rsquo;ajout produit sont situ\u00e9s dans un fichier twig,s situ\u00e9 sur le chemin suivant :<br \/>\n<em>src\/PrestaShopBundle\/Resources\/views\/Admin\/Product\/form.html.twig<\/em><\/p>\n<p>Les hooks disponibles sont les suivants :<\/p>\n<ul>\n<li>displayAdminProductsExtra<\/li>\n<li>displayAdminProductsMainStepLeftColumnMiddle<\/li>\n<li>displayAdminProductsMainStepLeftColumnBottom<\/li>\n<li>displayAdminProductsMainStepRightColumnBottom<\/li>\n<li>displayAdminProductsQuantitiesStepBottom<\/li>\n<li>displayAdminProductsPriceStepBottom<\/li>\n<li>displayAdminProductsOptionsStepTop<\/li>\n<li>displayAdminProductsOptionsStepBottom<\/li>\n<li>displayAdminProductsSeoStepBottom ( dans le fichier src\/PrestaShopBundle\/Resources\/views\/Admin\/Product\/Include\/form_seo.html.twig )<\/li>\n<\/ul>\n<p>Vous pouvez voir leurs emplacements sur les captures ci-dessous.<\/p>\n<p><a href=\"https:\/\/www.h-hennes.fr\/blog\/wp-content\/uploads\/2017\/10\/prestashop-product-field-1-1024x496.jpg\" target=\"_blank\" rel=\"noopener\"><br \/>\n<img decoding=\"async\" class=\"alignnone size-large wp-image-1644\" src=\"https:\/\/www.h-hennes.fr\/blog\/wp-content\/uploads\/2017\/10\/prestashop-product-field-1-1024x496.jpg\" alt=\"prestashop-product-field-1\" width=\"780\" srcset=\"https:\/\/www.h-hennes.fr\/blog\/wp-content\/uploads\/2017\/10\/prestashop-product-field-1-1024x496.jpg 1024w, https:\/\/www.h-hennes.fr\/blog\/wp-content\/uploads\/2017\/10\/prestashop-product-field-1-300x145.jpg 300w, https:\/\/www.h-hennes.fr\/blog\/wp-content\/uploads\/2017\/10\/prestashop-product-field-1-768x372.jpg 768w, https:\/\/www.h-hennes.fr\/blog\/wp-content\/uploads\/2017\/10\/prestashop-product-field-1.jpg 1547w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.h-hennes.fr\/blog\/wp-content\/uploads\/2017\/10\/prestashop-product-field-2-1024x449.jpg\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/www.h-hennes.fr\/blog\/wp-content\/uploads\/2017\/10\/prestashop-product-field-2-1024x449.jpg\" alt=\"prestashop-product-field-2\" width=\"780 class=\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.h-hennes.fr\/blog\/wp-content\/uploads\/2017\/10\/prestashop-product-field-3-1024x394.jpg\" target=\"_blank\" rel=\"noopener\"><br \/>\n<img decoding=\"async\" class=\"alignnone size-large wp-image-1641\" src=\"https:\/\/www.h-hennes.fr\/blog\/wp-content\/uploads\/2017\/10\/prestashop-product-field-3-1024x394.jpg\" alt=\"prestashop-product-field-3\" width=\"780\" srcset=\"https:\/\/www.h-hennes.fr\/blog\/wp-content\/uploads\/2017\/10\/prestashop-product-field-3-1024x394.jpg 1024w, https:\/\/www.h-hennes.fr\/blog\/wp-content\/uploads\/2017\/10\/prestashop-product-field-3-300x115.jpg 300w, https:\/\/www.h-hennes.fr\/blog\/wp-content\/uploads\/2017\/10\/prestashop-product-field-3-768x296.jpg 768w, https:\/\/www.h-hennes.fr\/blog\/wp-content\/uploads\/2017\/10\/prestashop-product-field-3.jpg 1528w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.h-hennes.fr\/blog\/wp-content\/uploads\/2017\/10\/prestashop-product-field-4-1024x781.jpg\" target=\"_blank\" rel=\"noopener\"><br \/>\n<img decoding=\"async\" src=\"https:\/\/www.h-hennes.fr\/blog\/wp-content\/uploads\/2017\/10\/prestashop-product-field-4-1024x781.jpg\" alt=\"prestashop-product-field-4\" width=\"780 class=\" \/><\/a><\/p>\n<p>Nous pouvons donc greffer notre module sur l&rsquo;ensemble de ces hooks ou uniquement sur celui sur lequel vous souhaitez afficher vos champs.<\/p>\n<p>Pour l&rsquo;exemple nous utiliserons le hook <strong>AdminProductsMainStepLeftColumnMiddle<\/strong><br \/>\nDans cette fonction nous allons r\u00e9cup\u00e9rer et afficher les nouvelles informations produit.<\/p>\n<p>Comme vous pouvez le voir dans le fichier twig , la fonction r\u00e9cup\u00e8re en param\u00e8tre l&rsquo;identifiant du produit \u00e9dit\u00e9.<\/p>\n<pre lang=\"twig\">{{ renderhook('displayAdminProductsMainStepLeftColumnMiddle', { 'id_product': id_product }) }}\r\n<\/pre>\n<p>Voici le contenu de la fonction<\/p>\n<pre lang=\"php\" escaped=\"true\">\/**\r\n* Affichage des informations suppl\u00e9mentaires sur la fiche produit\r\n* @param type $params\r\n* @return type\r\n*\/\r\npublic function hookDisplayAdminProductsMainStepLeftColumnMiddle($params) {\r\n$product = new Product($params['id_product']);\r\n$languages = Language::getLanguages($active);\r\n$this-&gt;context-&gt;smarty-&gt;assign(array(\r\n'custom_field' =&gt; $product-&gt;custom_field,\r\n'custom_field_lang' =&gt; $product-&gt;custom_field_lang,\r\n'customer_field_lang_wysiwyg' =&gt; $product-&gt;custom_field_lang_wysiwyg,\r\n'languages' =&gt; $languages,\r\n'default_language' =&gt; $this-&gt;context-&gt;employee-&gt;id_lang,\r\n)\r\n);\r\n\r\nreturn $this-&gt;display(__FILE__, 'views\/templates\/hook\/extrafields.tpl');\r\n}\r\n<\/pre>\n<p>Note : Pour l&rsquo;instant je n&rsquo;ai pas trouv\u00e9 de helper sp\u00e9cifique pour g\u00e9n\u00e9rer le contenu du formulaire, nous allons donc devoir le r\u00e9aliser \u00e0 la main dans le fichier <em>extrafields.tpl<\/em> qui sera situ\u00e9 dans le dossier <em>views\/templates\/hook\/<\/em> du module<\/p>\n<p>Voici son contenu :<\/p>\n<pre lang=\"smarty\" escaped=\"true\">&lt;div class=\"m-b-1 m-t-1\"&gt;\r\n&lt;h2&gt;{l s='Custom Attribute from module' mod='hhproduct'}&lt;\/h2&gt;\r\n\r\n&lt;fieldset class=\"form-group\"&gt;\r\n&lt;div class=\"col-lg-12 col-xl-4\"&gt;\r\n\r\n{*Champ Standard *}\r\n&lt;label class=\"form-control-label\"&gt;{l s='my custom field' mod='hhproduct'}&lt;\/label&gt;\r\n&lt;input type=\"text\" name=\"custom_field\" class=\"form-control\" {if $custom_field &amp;&amp; $custom_field != ''}value=\"{$custom_field}\"{\/if}\/&gt;\r\n\r\n{* Champ langue avec une structure particuli\u00e8re *}\r\n&lt;label class=\"form-control-label\"&gt;{l s='my custom lang field' mod='hhproduct'}&lt;\/label&gt;\r\n&lt;div class=\"translations tabbable\"&gt;\r\n&lt;div class=\"translationsFields tab-content\"&gt;\r\n{foreach from=$languages item=language }\r\n&lt;div class=\"tab-pane translation-label-{$language.iso_code} {if $default_language == $language.id_lang}active{\/if}\"&gt;\r\n&lt;input type=\"text\" name=\"custom_field_lang_{$language.id_lang}\" class=\"form-control\" {if isset({$custom_field_lang[$language.id_lang]}) &amp;&amp; {$custom_field_lang[$language.id_lang]} != ''}value=\"{$custom_field_lang[$language.id_lang]}\"{\/if}\/&gt;\r\n&lt;\/div&gt;\r\n{\/foreach}\r\n&lt;\/div&gt;\r\n&lt;\/div&gt;\r\n&lt;\/div&gt;\r\n\r\n{* Champ wysiwyg avec TinyMce *}\r\n&lt;div class=\"col-lg-12 col-xl-12\"&gt;\r\n&lt;label class=\"form-control-label\"&gt;{l s='my custom lang field wysiwyg' mod='hhproduct'}&lt;\/label&gt;\r\n&lt;div class=\"translations tabbable\"&gt;\r\n&lt;div class=\"translationsFields tab-content bordered\"&gt;\r\n{foreach from=$languages item=language }\r\n&lt;div class=\"tab-pane translation-label-{$language.iso_code} {if $default_language == $language.id_lang}active{\/if}\"&gt;\r\n&lt;textarea name=\"custom_field_lang_wysiwyg_{$language.id_lang}\" class=\"autoload_rte\"&gt;{if isset({$custom_field_lang_wysiwyg[$language.id_lang]}) &amp;&amp; {$custom_field_lang_wysiwyg[$language.id_lang]} != ''}{$custom_field_lang_wysiwyg[$language.id_lang]}{\/if}&lt;\/textarea&gt;\r\n&lt;\/div&gt;\r\n{\/foreach}\r\n&lt;\/div&gt;\r\n&lt;\/div&gt;\r\n&lt;\/div&gt;\r\n\r\n&lt;\/fieldset&gt;\r\n\r\n&lt;div class=\"clearfix\"&gt;&lt;\/div&gt;\r\n&lt;\/div&gt;\r\n\r\n<\/pre>\n<p>Pour la gestion des langues,nous pouvons voir dans le fichier admin-dir\/themes\/default\/js\/bundle\/product\/form.js qu&rsquo;il faut respecter une certaine structure d&rsquo;affichage pour que le changement de langue soit g\u00e9r\u00e9.<br \/>\nVersion 1.7.1 de prestashop<\/p>\n<pre lang=\"javascript\" escaped=\"true\">function switchLanguage(iso_code) {\r\n$('div.translations.tabbable &gt; div &gt; div.tab-pane:not(.translation-label-' + iso_code + ')').removeClass('active');\r\n$('div.translations.tabbable &gt; div &gt; div.tab-pane.translation-label-' + iso_code).addClass('active');\r\n}\r\n<\/pre>\n<p>Le code a l\u00e9g\u00e8rement chang\u00e9 depuis :<\/p>\n<pre lang=\"javascript\" escaped=\"true\">function switchLanguage(iso_code) {\r\n    $('div.translations.tabbable &gt; div &gt; div.translation-field:not(.translation-label-' + iso_code + ')').removeClass('show active');\r\n    $('div.translations.tabbable &gt; div &gt; div.translation-field.translation-label-' + iso_code).addClass('show active');\r\n}\r\n<\/pre>\n<p>Une fois notre module install\u00e9 le r\u00e9sultat obtenu sera le suivant :<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1635\" src=\"https:\/\/www.h-hennes.fr\/blog\/wp-content\/uploads\/2017\/10\/champs-ps17.jpg\" alt=\"Champs produits suppl\u00e9mentaire prestashop 1.7\" width=\"691\" height=\"521\" srcset=\"https:\/\/www.h-hennes.fr\/blog\/wp-content\/uploads\/2017\/10\/champs-ps17.jpg 691w, https:\/\/www.h-hennes.fr\/blog\/wp-content\/uploads\/2017\/10\/champs-ps17-300x226.jpg 300w\" sizes=\"auto, (max-width: 691px) 100vw, 691px\" \/><\/p>\n<p>Pour finir voici le contenu complet du fichier hhproduct.php<\/p>\n<pre lang=\"php\" escaped=\"true\">&lt;?php class HhProduct extends Module { public function __construct() { $this-&gt;name = 'hhproduct';\r\n        $this-&gt;tab = 'others';\r\n        $this-&gt;author = 'hhennes';\r\n        $this-&gt;version = '0.1.0';\r\n        $this-&gt;need_instance = 0;\r\n        $this-&gt;bootstrap = true;\r\n\r\n        parent::__construct();\r\n\r\n        $this-&gt;displayName = $this-&gt;l('hhproduct');\r\n        $this-&gt;description = $this-&gt;l('add new fields to product');\r\n        $this-&gt;ps_versions_compliancy = array('min' =&gt; '1.7.1', 'max' =&gt; _PS_VERSION_);\r\n    }\r\n    \r\n   public function install() {\r\n        if (!parent::install() || !$this-&gt;_installSql()\r\n                \/\/Pour les hooks suivants regarder le fichier src\\PrestaShopBundle\\Resources\\views\\Admin\\Product\\form.html.twig\r\n                || ! $this-&gt;registerHook('displayAdminProductsExtra')\r\n                || ! $this-&gt;registerHook('displayAdminProductsMainStepLeftColumnMiddle')       \r\n        ) {\r\n            return false;\r\n        }\r\n\r\n        return true;\r\n    }\r\n    \r\n     public function uninstall() {\r\n        return parent::uninstall() &amp;&amp; $this-&gt;_unInstallSql();\r\n    }\r\n\r\n    \/**\r\n     * Modifications sql du module\r\n     * @return boolean\r\n     *\/\r\n    protected function _installSql() {\r\n        $sqlInstall = \"ALTER TABLE \" . _DB_PREFIX_ . \"product \"\r\n                . \"ADD custom_field VARCHAR(255) NULL\";\r\n        $sqlInstallLang = \"ALTER TABLE \" . _DB_PREFIX_ . \"product_lang \"\r\n                . \"ADD custom_field_lang VARCHAR(255) NULL,\"\r\n                . \"ADD custom_field_lang_wysiwyg TEXT NULL\";\r\n\r\n        $returnSql = Db::getInstance()-&gt;execute($sqlInstall);\r\n        $returnSqlLang = Db::getInstance()-&gt;execute($sqlInstallLang);\r\n        \r\n        return $returnSql &amp;&amp; $returnSqlLang;\r\n    }\r\n\r\n    \/**\r\n     * Suppression des modification sql du module\r\n     * @return boolean\r\n     *\/\r\n    protected function _unInstallSql() {\r\n       $sqlInstall = \"ALTER TABLE \" . _DB_PREFIX_ . \"product \"\r\n                . \"DROP custom_field\";\r\n        $sqlInstallLang = \"ALTER TABLE \" . _DB_PREFIX_ . \"product_lang \"\r\n                . \"DROP custom_field_lang,DROP custom_field_lang_wysiwyg\";\r\n\r\n        $returnSql = Db::getInstance()-&gt;execute($sqlInstall);\r\n        $returnSqlLang = Db::getInstance()-&gt;execute($sqlInstallLang);\r\n        \r\n        return $returnSql &amp;&amp; $returnSqlLang;\r\n    }\r\n    \r\n    public function hookDisplayAdminProductsExtra($params)\r\n    {\r\n      \r\n    }\r\n   \r\n    \/**\r\n     * Affichage des informations suppl\u00e9mentaires sur la fiche produit\r\n     * @param type $params\r\n     * @return type\r\n     *\/\r\n    public function hookDisplayAdminProductsMainStepLeftColumnMiddle($params) {\r\n        $product = new Product($params['id_product']);\r\n        $languages = Language::getLanguages($active);\r\n        $this-&gt;context-&gt;smarty-&gt;assign(array(\r\n            'custom_field' =&gt; $product-&gt;custom_field,\r\n            'custom_field_lang' =&gt; $product-&gt;custom_field_lang,\r\n            'customer_field_lang_wysiwyg' =&gt; $product-&gt;custom_field_lang_wysiwyg,\r\n            'languages' =&gt; $languages,\r\n            'default_language' =&gt; $this-&gt;context-&gt;employee-&gt;id_lang,\r\n            )\r\n           );\r\n        \/** \r\n         * @Todo Faire marcher le champ langue\r\n         *\/\r\n        return $this-&gt;display(__FILE__, 'views\/templates\/hook\/extrafields.tpl');\r\n    }\r\n}\r\n \r\n<\/pre>\n<p>Le processus pourra surement \u00eatre am\u00e9lior\u00e9 lors des prochaines mise \u00e0 jour de prestashop, n&rsquo;h\u00e9sitez pas \u00e0 remonter vos astuces.<br \/>\nVous pouvez t\u00e9l\u00e9charger le code l&rsquo;ensemble du module :<a href=\"https:\/\/www.h-hennes.fr\/blog\/wp-content\/uploads\/2017\/10\/hhproduct.zip\">hhproduct<\/a><br \/>\nPar contre si vous ajoutez\/changez des champs il faudra r\u00e9initialiser le module \u00e0 chaque fois pour la bonne prise en compte de l&rsquo;override<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Le code ne fonctionne pas ?<\/strong><\/p>\n<ul>\n<li>Supprimez les dossiers du cache ( app\/cache\/* pour version &lt; 1.7.4 ou var\/cache\/* ) et r\u00e9essayez.<\/li>\n<li>Si ce n&rsquo;est toujours pas bon, essayez de cr\u00e9er le produit via le code sans passer par la page de gestion des produits<\/li>\n<li>Si cela ne fonctionne pas, votre surcharge n&rsquo;est pas prise en compte ou comporte une erreur<\/li>\n<li>Si cela fonctionne c&rsquo;est qu&rsquo;il y&rsquo;a une erreur dans l&rsquo;affichage ou l&rsquo;envoi des donn\u00e9es sur la page de gestion des produits<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>Note :<\/strong><br \/>\nCet article sera compl\u00e9t\u00e9 prochainement par un nouvel article pour g\u00e9rer les nouvelles versions de prestashop ( 8.0 et + ) via une autre approche plus propre ( sans overrides )<\/p>\n<p>Le module t\u00e9l\u00e9charg\u00e9 ne fonctionnera pas correctement sur la version 8.0 et il sera n\u00e9cessaire de faire la modification suivante.<br \/>\nReprendre la variable $definition compl\u00e8te de la classe Product et rajouter directement les nouveaux champs dans cette variable.<br \/>\nJ&rsquo;ai rajout\u00e9 un fichier Product8.php dans l&rsquo;archive du module avec un exemple de cette nouvelle classe.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>La nouvelle version 1.7 de Prestashop introduit de gros changements dans la gestion backoffice des fiches produits. Cette page utilise les nouvelles m\u00e9thodes symfony et tout les modules souhaitant ajouter des informations produits doivent se mettre \u00e0 jour pour utiliser les nouvelles m\u00e9thodes. Comme d&rsquo;habitude la documentation prestashop n&rsquo;est pas exhaustive et je n&rsquo;ai \u00e0 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[245],"tags":[348,397,483,364],"class_list":["post-1633","post","type-post","status-publish","format-standard","hentry","category-prestashop-2","tag-admin","tag-champs","tag-prestashop-1-7","tag-produit","prestashop-1-6","prestashop-1-7","prestashop-1-7-2","prestashop-1-7-3","prestashop-1-7-4","prestashop-1-7-5","prestashop-1-7-6","prestashop-1-7-7","prestashop-1-7-8","prestashop-8-0","prestashop-8-1"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.h-hennes.fr\/blog\/wp-json\/wp\/v2\/posts\/1633","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.h-hennes.fr\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.h-hennes.fr\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.h-hennes.fr\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.h-hennes.fr\/blog\/wp-json\/wp\/v2\/comments?post=1633"}],"version-history":[{"count":19,"href":"https:\/\/www.h-hennes.fr\/blog\/wp-json\/wp\/v2\/posts\/1633\/revisions"}],"predecessor-version":[{"id":3377,"href":"https:\/\/www.h-hennes.fr\/blog\/wp-json\/wp\/v2\/posts\/1633\/revisions\/3377"}],"wp:attachment":[{"href":"https:\/\/www.h-hennes.fr\/blog\/wp-json\/wp\/v2\/media?parent=1633"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.h-hennes.fr\/blog\/wp-json\/wp\/v2\/categories?post=1633"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.h-hennes.fr\/blog\/wp-json\/wp\/v2\/tags?post=1633"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}