diff --git a/src/pretix/plugins/ticketoutputpdf/static/pretixplugins/ticketoutputpdf/editor.js b/src/pretix/plugins/ticketoutputpdf/static/pretixplugins/ticketoutputpdf/editor.js index fc814d942..247429ae3 100644 --- a/src/pretix/plugins/ticketoutputpdf/static/pretixplugins/ticketoutputpdf/editor.js +++ b/src/pretix/plugins/ticketoutputpdf/static/pretixplugins/ticketoutputpdf/editor.js @@ -164,6 +164,7 @@ var editor = { "item": gettext("Sample product"), "variation": gettext("Sample variation"), "itemvar": gettext("Sample product – sample variation"), + "item_description": gettext("Sample product description"), "price": gettext("123.45 EUR"), "attendee_name": gettext("John Doe"), "event_name": gettext("Sample event name"), diff --git a/src/pretix/plugins/ticketoutputpdf/templates/pretixplugins/ticketoutputpdf/index.html b/src/pretix/plugins/ticketoutputpdf/templates/pretixplugins/ticketoutputpdf/index.html index 8f57f6c1e..2a9bf2a11 100644 --- a/src/pretix/plugins/ticketoutputpdf/templates/pretixplugins/ticketoutputpdf/index.html +++ b/src/pretix/plugins/ticketoutputpdf/templates/pretixplugins/ticketoutputpdf/index.html @@ -287,6 +287,7 @@ + diff --git a/src/pretix/plugins/ticketoutputpdf/ticketoutput.py b/src/pretix/plugins/ticketoutputpdf/ticketoutput.py index 49fc0818c..dd263ca98 100644 --- a/src/pretix/plugins/ticketoutputpdf/ticketoutput.py +++ b/src/pretix/plugins/ticketoutputpdf/ticketoutput.py @@ -70,6 +70,8 @@ class PdfTicketOutput(BaseTicketOutput): return order.code elif o['content'] == 'item': return str(op.item) + elif o['content'] == 'item_description': + return str(op.item.description) elif o['content'] == 'secret': return op.secret elif o['content'] == 'variation': diff --git a/src/pretix/plugins/ticketoutputpdf/views.py b/src/pretix/plugins/ticketoutputpdf/views.py index e6f693f7c..19fac60fe 100644 --- a/src/pretix/plugins/ticketoutputpdf/views.py +++ b/src/pretix/plugins/ticketoutputpdf/views.py @@ -85,7 +85,8 @@ class EditorView(EventPermissionRequiredMixin, ChartContainingView, TemplateView if "preview" in request.POST: with rolledback_transaction(), language(request.event.settings.locale): - item = request.event.items.create(name=_("Sample product"), default_price=42.23) + item = request.event.items.create(name=_("Sample product"), default_price=42.23, + description=_("Sample product description")) item2 = request.event.items.create(name=_("Sample workshop"), default_price=23.40) from pretix.base.models import Order