javiidoce Posted May 15 Share Posted May 15 So I've been modifying the invoice dates and I've encountered a problem that in the header of the invoice the invoice date doesn't show but in the body it does. What I don't understand is that both templates use the same line to show the date ({dateFormat date=$order->invoice_date full=0}) any ideas of what it could be? thx Link to comment Share on other sites More sharing options...
javiidoce Posted May 15 Author Share Posted May 15 I'm using prestashop 1.7.8.5 Link to comment Share on other sites More sharing options...
WebDesk Solution Posted May 17 Share Posted May 17 Hello @javiidoce, To display the date in the invoice header, please modify the code in the file located at: {{root_folder}}\pdf\header.tpl. Original Code: {if isset($header) && $header == 'Invoice'} {else} <tr> <td style="font-size: 14pt; color: #9E9F9E">{$date|escape:'html':'UTF-8'}</td> </tr> {/if} Updated Code: {if isset($header) && $header == 'Invoice'} <tr> <td style="font-size: 14pt; color: #9E9F9E">{$date|escape:'html':'UTF-8'}</td> </tr> {else} <tr> <td style="font-size: 14pt; color: #9E9F9E">{$date|escape:'html':'UTF-8'}</td> </tr> {/if} Result Reference: https://prnt.sc/JsF4f9yPO6eU After making this change, please clear the cache to see the updates. Link to comment Share on other sites More sharing options...
javiidoce Posted May 20 Author Share Posted May 20 On 5/17/2024 at 6:37 PM, WebDesk Solution said: Hello @javiidoce, To display the date in the invoice header, please modify the code in the file located at: {{root_folder}}\pdf\header.tpl. Original Code: {if isset($header) && $header == 'Invoice'} {else} <tr> <td style="font-size: 14pt; color: #9E9F9E">{$date|escape:'html':'UTF-8'}</td> </tr> {/if} Updated Code: {if isset($header) && $header == 'Invoice'} <tr> <td style="font-size: 14pt; color: #9E9F9E">{$date|escape:'html':'UTF-8'}</td> </tr> {else} <tr> <td style="font-size: 14pt; color: #9E9F9E">{$date|escape:'html':'UTF-8'}</td> </tr> {/if} Result Reference: https://prnt.sc/JsF4f9yPO6eU After making this change, please clear the cache to see the updates. thx WebDesk, now it works! I looked it up and another page i had with a lower version has this code too, so i dont know why it was like that 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