Bonjour,
Tous les champs de ma surcharge fonctionne, mais je n'arrive pas à voir pourquoi les checkboxes, elles ne s'affichent pas :
public function __construct($id_product = null, $full = false, $id_lang = null, $id_shop = null, \Context $context = null)
{
//Définition des nouveaux champs
self::$definition['fields']['custom_field'] = array(
'type' => 'checkbox',
'label' => 'Options',
'desc' => 'description checkboxes',
'name' => 'options',
'values' => [
'query' => [
[
'id_checkbox_options' => 0,
'checkbox_options_name' => 'Option 0'
],
[
'id_checkbox_options' => 1,
'checkbox_options_name' => 'Option 1'
], [
'checkbox_options_options' => 2,
'checkbox_options_name' => 'Option 2'
],
[
'checkbox_options_options' => 3,
'checkbox_options_name' => 'Option 3'
],
[
'id_checkbox_options' => 4,
'checkbox_options_name' => 'option 4'
]
],
'id' => 'id_checkbox_options',
'name' => 'checkbox_options_name',
],
);
self::$definition['fields']['custom_field_lang'] = [
'type' => self::TYPE_STRING,
'lang' => true,
'required' => false, 'size' => 255
];
self::$definition['fields']['custom_field_lang_wysiwyg'] = [
'type' => self::TYPE_HTML,
'lang' => true,
'required' => false,
'validate' => 'isCleanHtml'
];
self::$definition['fields']['custom_field_file'] = [
'type' => self::TYPE_STRING,
'lang' => false,
'required' => false,
'validate' => 'isCleanHtml'
];
parent::__construct($id_product, $full, $id_lang, $id_shop, $context);
}
Dans mon TPL :
{if $custom_field}
TEST
{/if}
Une âme charitable pourrait m'indiquer mon erreur svp?
Merci !