E-mails: add additional information on order positions

This commit is contained in:
Raphael Michel
2021-03-08 16:31:34 +01:00
parent d8d7440b52
commit f0da2b7233
6 changed files with 227 additions and 37 deletions

View File

@@ -691,14 +691,14 @@ class MailSettingsRendererPreview(MailSettingsPreview):
expires=now(), code="PREVIEW", total=119)
item = request.event.items.create(name=gettext("Sample product"), default_price=42.23,
description=gettext("Sample product description"))
p = order.positions.create(item=item, attendee_name_parts={'_legacy': gettext("John Doe")},
price=item.default_price)
order.positions.create(item=item, attendee_name_parts={'_legacy': gettext("John Doe")},
price=item.default_price, subevent=request.event.subevents.last())
v = renderers[request.GET.get('renderer')].render(
v,
str(request.event.settings.mail_text_signature),
gettext('Your order: %(code)s') % {'code': order.code},
order,
position=p
position=None
)
r = HttpResponse(v, content_type='text/html')
r._csp_ignore = True