Skip to main content

Afficher les champs personnalisés dans module

More
13 years 2 months ago #115288 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 --> :
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.

More
13 years 2 months ago #115289 by ces
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.

More
13 years 2 months ago #115317 by Xavier
Bonjour,

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.

More
13 years 2 months ago #115325 by ces
Oui c'est bien ça se sont les champs de types produits.

Please Log in or Create an account to join the conversation.

More
13 years 2 months ago #115413 by Xavier
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é.

Please Log in or Create an account to join the conversation.

Time to create page: 0.188 seconds
Powered by Kunena Forum