diff --git a/src/pretix/base/pdf.py b/src/pretix/base/pdf.py index 828fc8b4aa..950928d44e 100644 --- a/src/pretix/base/pdf.py +++ b/src/pretix/base/pdf.py @@ -87,6 +87,13 @@ DEFAULT_VARIABLES = OrderedDict(( if orderposition.variation else str(orderposition.item.name) ) }), + ("itemvar_description", { + "label": _("Product variation description"), + "editor_sample": _("Sample product variation description"), + "evaluate": lambda orderposition, order, event: ( + str(orderposition.variation.description) if orderposition.variation else str(orderposition.item.description) + ) + }), ("item_category", { "label": _("Product category"), "editor_sample": _("Ticket category"), @@ -150,6 +157,11 @@ DEFAULT_VARIABLES = OrderedDict(( str(getattr(op.addon_to.country, 'name', '')) if op.addon_to else '' ) }), + ("attendee_email", { + "label": _("Attendee email"), + "editor_sample": 'foo@bar.com', + "evaluate": lambda op, order, ev: op.attendee_email or (op.addon_to.attendee_email if op.addon_to else '') + }), ("event_name", { "label": _("Event name"), "editor_sample": _("Sample event name"), @@ -241,6 +253,11 @@ DEFAULT_VARIABLES = OrderedDict(( "editor_sample": "+01 1234 567890", "evaluate": lambda op, order, ev: phone_format(order.phone) }), + ("email", { + "label": _("Email"), + "editor_sample": "foo@bar.com", + "evaluate": lambda op, order, ev: order.email + }), ("invoice_name", { "label": _("Invoice address name"), "editor_sample": _("John Doe"),