- Posts: 91
- Thank you received: 0
Afficher les champs personnalisés dans module
13 years 2 months ago #115288
by ces
Afficher les champs personnalisés dans module was created by ces
Bonjour,
Je cherche a afficher les champs personnalisés dans le module product, sur la vue img + titre.
J'ai activé l'option afficher les champs personnalisés, et j'ai ajouté sous <!-- EO PRODUCT NAME --> :
mais ça ne fonctionne pas
Je cherche a afficher les champs personnalisés dans le module product, sur la vue img + titre.
J'ai activé l'option afficher les champs personnalisés, et j'ai ajouté sous <!-- EO PRODUCT NAME --> :
Code:
<span class="champspersonnalise">
<?php if(!empty($this->element->extraData->topBegin)) { echo implode("\r\n",$this->element->extraData->topBegin); } ?>
<?php
if(!empty($this->fields)){
$this->setLayout('show_block_custom_main');
echo $this->loadTemplate();
}
?></span>
mais ça ne fonctionne pas
Please Log in or Create an account to join the conversation.
13 years 2 months ago #115289
by ces
Replied by ces on topic Afficher les champs personnalisés dans module
je précise que je ne souhaite pas afficher la vue avec la description mais bien celle avec image + titre + les champs personnalisés
Please Log in or Create an account to join the conversation.
13 years 2 months ago #115317
by Xavier
Replied by Xavier on topic Afficher les champs personnalisés dans module
Bonjour,
Quel type de champ personnalisé souhaitez vous afficher ?
$this->fields ne contient que les champs personnalisés de type "Item".
Quel type de champ personnalisé souhaitez vous afficher ?
$this->fields ne contient que les champs personnalisés de type "Item".
Please Log in or Create an account to join the conversation.
13 years 2 months ago #115325
by ces
Replied by ces on topic Afficher les champs personnalisés dans module
Oui c'est bien ça se sont les champs de types produits.
Please Log in or Create an account to join the conversation.
13 years 2 months ago #115413
by Xavier
Replied by Xavier on topic Afficher les champs personnalisés dans module
Les champs "produit" sont différent des champs "Article", la variable $this->fields est pour les champs "article".
Pour afficher les champs de type "produit" il faut utiliser: echo $this->row->custom_field;
Et remplacer "custom_field" par le nom de votre champ personalisé.
Pour afficher les champs de type "produit" il faut utiliser: echo $this->row->custom_field;
Et remplacer "custom_field" par le nom de votre champ personalisé.
Please Log in or Create an account to join the conversation.
Time to create page: 0.188 seconds