Rémi Posted June 2, 2014 Share Posted June 2, 2014 Dans ma boutique, chaque déclinaison de couleur et de taille est associée à un EAN-13 ou UPC. Lorsque j'imprime un bon de commande pour aller assembler ma commande dans l'entrepôt, je n'ai que la référence qui s'imprime. Je pourrais écrire une référence et le EAN-13 dans le même champ, mais ce n'est pas très élaguent.Est-ce que quelqu'un sait quel fichier je dois modifier pour changer le champ référence pour EAN-13 dans le bon de commande qui s'imprime?Peut-être n'ai-je pas vu ce choix ailleurs dans PrestaShop? Merci, Link to comment Share on other sites More sharing options...
Amokless Posted June 3, 2014 Share Posted June 3, 2014 Bonjour, Il me semble que c'est le fichier delivery-slip.tpl (bon de livraison) dans le dossier PDF à la racine de votre site. <td style="text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 10px; font-weight: bold; width: 60%">{l s='ITEMS TO BE DELIVERED' pdf='true'}</td> <td style="background-color: #4D4D4D; color: #FFF; text-align: left; font-weight: bold; width: 20%">{l s='REFERENCE' pdf='true'}</td> <td style="background-color: #4D4D4D; color: #FFF; text-align: center; font-weight: bold; width: 20%">{l s='QTY' pdf='true'}</td> remplacer par : <td style="text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 10px; font-weight: bold; width: 60%">{l s='ITEMS TO BE DELIVERED' pdf='true'}</td> <td style="background-color: #4D4D4D; color: #FFF; text-align: left; font-weight: bold; width: 20%">{l s='REFERENCE' pdf='true'}</td> <td style="background-color: #4D4D4D; color: #FFF; text-align: center; font-weight: bold; width: 20%">{l s='EAN-13' pdf='true'}</td> <td style="background-color: #4D4D4D; color: #FFF; text-align: center; font-weight: bold; width: 20%">{l s='QTY' pdf='true'}</td> Mais pas sur du résultat, car aucun moyen de vérifier. Cela vous donnera tout de même une piste . Cordialement, Mathieu Link to comment Share on other sites More sharing options...
Rémi Posted June 3, 2014 Author Share Posted June 3, 2014 C'est définitivement le bon fichier. Ton code ajoute un en-tête de colonne, mais il faudra ajouter plus loin la colonne avec le EAN-13. J'ai réussi à ajouter cette colonne, mais il me manque l'information dans le champ. Je n'arrive pas à extraire le EAN-13 correspondant à la déclinaison sélectionnée par l'acheteur. <td style="text-align: left; width: 60%">{$product.product_name}</td> <td style="text-align: left; width: 20%"> {if empty($product.product_reference)} --- {else} {$product.product_reference} {/if} </td> <td style="text-align: left; width: 20%"> {if empty($product_attribute.EAN13)} --- {else} {$product_attribute.EAN13} {/if} </td> <td style="text-align: center; width: 20%">{$product.product_quantity}</td> Merci Mathieu pour la piste! Il reste à trouver comment extraire l'info. Rémi Link to comment Share on other sites More sharing options...
Amokless Posted June 4, 2014 Share Posted June 4, 2014 En effet c'est l’entête, bon c t'as permis de voir que c'est le bon fichier... oui oui je me rattrape lol <tr style="line-height:6px;background-color:{$bgcolor};"> <td style="text-align: left; width: 60%">{$product.product_name}</td> <td style="text-align: left; width: 20%"> {if empty($product.product_reference)} --- {else} {$product.product_reference} {/if} </td> <td style="text-align: left; width: 20%">{$product.product_ean13}</td> <td style="text-align: center; width: 20%">{$product.product_quantity}</td> </tr> tiens essaye ca Par contre comme d'hab je ne peut pas vérifier... bien à toi, Mathieu Link to comment Share on other sites More sharing options...
Rémi Posted June 17, 2014 Author Share Posted June 17, 2014 Ça fonctionne très bien! Je me permet de coller le code final et ajusté pour avoir le "bon" pourcentage des colonnes. <table style="width: 100%"> <tr style="line-height:6px;"> <td style="background-color: #4D4D4D; color: #FFF; text-align: center; font-weight: bold; width: 8%">{l s='QTY' pdf='true'}</td> <td style="text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 10px; font-weight: bold; width: 47%">{l s='ITEMS TO BE DELIVERED' pdf='true'}</td> <td style="background-color: #4D4D4D; color: #FFF; text-align: left; font-weight: bold; width: 25%">{l s='REFERENCE' pdf='true'}</td> <td style="background-color: #4D4D4D; color: #FFF; text-align: center; font-weight: bold; width: 20%">{l s='EAN13' pdf='true'}</td> </tr> {foreach $order_details as $product} {cycle values='#FFF,#DDD' assign=bgcolor} <tr style="line-height:6px;background-color:{$bgcolor};"> <td style="text-align: center; width: 8%">{$product.product_quantity}</td> <td style="text-align: left; width: 47%">{$product.product_name}</td> <td style="text-align: left; width: 25%"> {if empty($product.product_reference)} --- {else} {$product.product_reference} {/if} </td> <td style="text-align: center; width: 20%">{$product.product_ean13}</td> </tr> {/foreach} </table> Merci Mathieu, Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now