Modification Affichage Produit

5 posts in this topic

Posted · Report post

Bonjour à tous

 

Je travaille sur la version 7.0.3

 

Dans ADMIN/listes des Produits

 

J’ai voudrais faire une petite modification d’affichage

Au lieu d’afficher Site web je voudrais afficher le poids du produit

 

Je trouvé le fichier dans modeles/peel7/Smarty/admin_liste_produits.tpl

 

La ligne 127 à 135 mais il me manque une parenthèse

 

<td class="center">

{if empty($li.sites)}

<span style="color:red">-</span><br />

{else}

{foreach $li.sites as $site}

{$site|html_entity_decode_if_needed}<br />

{/foreach}

{/if}

</td>

 

Quelqu’un connais l’astuce ?

 

Merci pour vos réponses

Cordialement Franck

Share this post


: post
Share on other sites

Posted · Report post

Bonjour,

 

La ligne 127 à 135 mais il me manque une parenthèse

Avez-vous un message d'erreur ?

Share this post


: post
Share on other sites

Posted · Report post

Bonjour Simon

 

J’essayer de faire ceci 

 

<td class="normal" align="center">

                       ' . $ligne['poids'] . '

               </td>

 

Mais ça rien donné 

il doit manquer une autre insertion à faire, mais je ne sais pas comment ?

 

il s'affiche ceci $ligne[poids]  

Share this post


: post
Share on other sites

Posted · Report post

Il faut d'abord définir la variable SMARTY qui contiendra la valeur à afficher, et utiliser cette variable dans le fichier .tpl. Il n'est pas possible d'utiliser directement les variables PHP dans SMARTY.

Donc dans un premier temps dans la fonction affiche_liste_produits du fichier lib\fonctions\fonctions_admin.php il faut définir la variable dans le tableau $tmpLigne (ligne 2555 pour votre version):

                        'poids' => $ligne['poids'],

ensuite vous pouvez utiliser dans le fichier tpl, en remplacement du site. Ce qui donne :


{if empty($li.poids)}

<span style="color:red">-</span><br />
{else}

{$li.poids|html_entity_decode_if_needed}

{/if}

Share this post


: post
Share on other sites

Posted · Report post

Merci Simon

 

parfait ça fonctionne

 

je presque fini la mise a jour du Site

 

l'ouverture sera dans très peu de temps

 

et ceci grâce a vous ! et a l'équipe PEEL

 

cordialement Franck

Share this post


: post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

Twitter Advisto ecommerce

Facebook PEEL Shopping