Warning: You are browsing the documentation for PrestaShop 8, which is outdated.
You might want to read an updated version of this page for the current version, PrestaShop 9. Read the updated version of this page
Hook | displayPDF<Template> |
---|---|
Locations | FO BO |
Type | display |
Origin | theme |
Aliases | |
Description | Allows to add content in HTML to PDF templates |
Origin | File |
---|---|
core | pdf/delivery-slip.tpl |
core | pdf/invoice-b2b.tpl |
core | pdf/invoice.tpl |
core | pdf/order-return.tpl |
core | pdf/order-slip.tpl |
<!-- Hook -->
{if isset($HOOK_DISPLAY_PDF)}
<tr>
<td colspan="12" height="30"> </td>
</tr>
<tr>
<td colspan="12">
{$HOOK_DISPLAY_PDF}
</td>
</tr>
{/if}
This hook is a dynamic hook, generated in classes/pdf/HTMLTemplate.php
:
$template = ucfirst(str_replace('HTMLTemplate', '', get_class($this)));
$hook_name = 'displayPDF' . $template;
$this->smarty->assign([
'HOOK_DISPLAY_PDF' => Hook::exec(
$hook_name,
[
'object' => $object,
// The smarty instance is a clone that does NOT escape HTML
'smarty' => $this->smarty,
]
),
]);