NeilD Posted March 18, 2014 Share Posted March 18, 2014 (edited) Hi, I'd like to add a little to PDF/footer.tpl file in Prestashop 1.5. Id like to add a table row that displays the delivery address and return address which when printed will line up with some print labels I have. I don't want the extra table row to display on anything but the delivery slip In my mind the logic would looks something like this: <table> ***If pdf=delivery slip echo;*** <tr> <td style="width: 50%"> {$delivery_address} </td> <td style="width: 50%"> Return Address:<br /> {$shop_address|escape:'htmlall':'UTF-8'} </td> </tr> ***else echo; endif;*** <tr> <td style="text-align: center; font-size: 6pt; color: #444"> {if $available_in_your_account} {l s='An electronic version of this invoice is available in your account. To access it, log in to our website using your e-mail address and password (which you created when placing your first order).' pdf='true'} <br /> {/if} {if !empty($shop_phone) OR !empty($shop_fax)} {l s=' ' pdf='true'} {if !empty($shop_phone)} Tel: {$shop_phone|escape:'htmlall':'UTF-8'} {/if} {if !empty($shop_fax)} Fax: {$shop_fax|escape:'htmlall':'UTF-8'} {/if} <br /> {/if} {if isset($shop_details)} {$shop_details|escape:'htmlall':'UTF-8'}<br /> {/if} {if isset($free_text)} {$free_text|escape:'htmlall':'UTF-8'}<br /> {/if} </td> </tr> </table> I'm not overly familiar with smarty so I'm not sure if this is possible? if it is can anyone help me fill the code gaps? Many thanks in advance. Neil Edited March 21, 2014 by NeilD (see edit history) Link to comment Share on other sites More sharing options...
tuk66 Posted March 20, 2014 Share Posted March 20, 2014 You have to have address data in footer.tpl and change page bottom margin as well, I think. Anyway, the M4 PDF Extensions module already contains two templates with integrated labels and you can easily create your own. Link to comment Share on other sites More sharing options...
NeilD Posted March 21, 2014 Author Share Posted March 21, 2014 Thanks for the response but what I have is almost working, I just didn't want it appearing on PDF's other than the delivery slip. To be honest I'm not even sure which other PDF's use the footer? Which PDF's use PDF/footer.tpl other than delivery slip? If anyone can point me in the right direction with Smarty that would be much appreciated. Link to comment Share on other sites More sharing options...
tuk66 Posted March 24, 2014 Share Posted March 24, 2014 I think all templates instead of Supply Order which uses supply-order-footer.tpl footer. Link to comment Share on other sites More sharing options...
NeilD Posted April 2, 2014 Author Share Posted April 2, 2014 Thanks Tuk66, Your module looks excellent and I would consider buying it, but unfortunately my client just doesn't have any extra money at the moment. does anyone knows how I can add a table(or row) that will only appear on the delivery slip PDF? 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