Texts, Twig, file names
Header, footers and file names understand Twig. All other texts are snippets.
Snippets
Search for pdfexport under Settings → Snippets to find headlines, column titles, button labels and the texts of the offer form. Product names and descriptions are translated at the product as usual.
Twig in header and footer
Created on {{ "now"|date("d.m.Y") }}
The footer of offers can also use offer:
Valid until {{ offer.validUntil|date("d.m.Y") }}.
##OFFERNUMBER## is replaced by an offer number. In normal exports every PDF with this placeholder uses up a new number.
Translate per language
You can override the fields per sales channel. For several languages in one channel, create your own snippet, for example my.pdf.footer with the text Created on %date%., and enter in the field:
{{ "my.pdf.footer"|trans({"%date%": "now"|date("d.m.Y")})|raw }}
File names
| Variables | Example | |
|---|---|---|
| Product | page.product | {{ page.product.translated.name }}-{{ page.product.productNumber }}.pdf |
| Category | category | Pricelist-{{ category.translated.name|raw }}.pdf |
| Cart | page | Cart-{{ "now"|date("d.m.Y H-i") }}.pdf |
| Offer | offer.offerNumber, page | Offer-{{ offer.offerNumber }}.pdf |
- Write
.pdfinto the pattern. For downloads the extension is not added automatically, only for offers. - Spaces become hyphens and many special characters are removed.
- If the pattern is broken or empty, a default name is used.