Nico_prestashop Posted July 26 Share Posted July 26 Bonjour, Je ne trouve pas comment afficher les montants HT sur les avoirs générés avec mon BO Prestashop. Quelqu'un pourrait m'apporter son aide svp ? Merci d'avance ! Crazy Food Shop AV-000035.pdf Link to comment Share on other sites More sharing options...
kerlin Posted July 27 Share Posted July 27 Bonjour, Quelle version de PS ? Link to comment Share on other sites More sharing options...
Nico_prestashop Posted July 27 Author Share Posted July 27 Bonjour, La version est 8.1.2 Merci d'avance. Link to comment Share on other sites More sharing options...
kerlin Posted July 27 Share Posted July 27 ok. Vous n'avez pas peur de mettre les mains dans le code ? J'ai regardé dans les fichiers et voici ce que vous pouvez essayer : 1. overrider le fichier tpl du pdf : copier le fichier pdf/order-slip-total.tpl dans themes/votre-theme/pdf/order-slip-total-tab.tpl 2. remplacer le bloc suivant : {if isset($order_details) && count($order_details) > 0} {if (($order->total_paid_tax_incl - $order->total_paid_tax_excl) > 0)} {if $tax_excluded_display} <tr> <td class="grey" width="70%"> {l s='Product Total (Tax Excl.)' d='Shop.Pdf' pdf='true'} </td> <td class="white" width="30%"> - {displayPrice currency=$order->id_currency price=$order->total_products} </td> </tr> {else} <tr> <td class="grey" width="70%"> {l s='Product Total (Tax Incl.)' d='Shop.Pdf' pdf='true'} </td> <td class="white" width="30%"> - {displayPrice currency=$order->id_currency price=$order->total_products_wt} </td> </tr> {/if} {else} <tr> <td class="grey" width="70%"> {l s='Product Total' d='Shop.Pdf' pdf='true'} </td> <td class="white" width="30%"> - {displayPrice currency=$order->id_currency price=$order->total_products} </td> </tr> {/if} {/if} par : {if isset($order_details) && count($order_details) > 0} <tr> <td class="grey" width="70%"> {l s='Product Total (Tax Excl.)' d='Shop.Pdf' pdf='true'} </td> <td class="white" width="30%"> - {displayPrice currency=$order->id_currency price=$order->total_products} </td> </tr> <tr> <td class="grey" width="70%"> {l s='Product Total (Tax Incl.)' d='Shop.Pdf' pdf='true'} </td> <td class="white" width="30%"> - {displayPrice currency=$order->id_currency price=$order->total_products_wt} </td> </tr> <tr> <td class="grey" width="70%"> {l s='Total Tax' d='Shop.Pdf' pdf='true'} </td> <td class="white" width="30%"> - {displayPrice currency=$order->id_currency price=($order->total_paid_tax_incl - $order->total_paid_tax_excl)} </td> </tr> {/if} De cette façon, le bloc affichera le prix HT, le prix TTC et le montant de la TVA. Cela supprime la condition dépendant des réglages de Prestashop (si affichage HT activé => seulement prix HT, sinon prix TTC affiché) Ne pas oublier de vider le cache de Prestashop Link to comment Share on other sites More sharing options...
kerlin Posted July 27 Share Posted July 27 J'ai oublié un point : avec le code proposé, comme il intègre le montant de la TVA, il faut supprimer, dans l'override du tpl, le bloc : {if ($order->total_paid_tax_incl - $order->total_paid_tax_excl) > 0} <tr> <td class="grey" width="70%"> {l s='Total Tax' d='Shop.Pdf' pdf='true'} </td> <td class="white" width="30%"> - {displayPrice currency=$order->id_currency price=($order->total_paid_tax_incl - $order->total_paid_tax_excl)} </td> </tr> {/if} Sinon il s'affichera 2 fois 🙂 Link to comment Share on other sites More sharing options...
Nico_prestashop Posted August 1 Author Share Posted August 1 Bonjour, Merci beaucoup pour ce retour ! Malheureusement je ne suis pas très à l'aise avec les codes... Est-ce qu'il y aurait une autre solution qui ne toucherait pas au code ? Merci d'avance. Link to comment Share on other sites More sharing options...
kerlin Posted August 1 Share Posted August 1 Bonjour je ne pense pas qu'il existe un module. Des que mon pc est retranché je vous enverrai le tel et vous dirai oû le mettre après avoir sauvegardé le fichier original. Ou vous m'envoyez en mode un accès FTP. Link to comment Share on other sites More sharing options...
kerlin Posted August 2 Share Posted August 2 Bonjour, Via FTP, créez un dossier pdf dans le dossier de votre thème (themes/votre_theme/pdf. Importez ensuite dans ce dossier le fichier joint et testez. Vous ne touchez pas aux fichiers d'origine, c'est un "override". Si cela ne fonctionne pas, il suffit de le supprimer. order-slip.total-tab.tpl 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