Skip to content

Commit

Permalink
fix: canceled order mail template changed
Browse files Browse the repository at this point in the history
  • Loading branch information
codedsun committed Dec 7, 2019
1 parent e8b367f commit f4c3754
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
11 changes: 7 additions & 4 deletions app/api/helpers/mail.py
Expand Up @@ -363,18 +363,21 @@ def send_email_to_attendees(order, purchaser_id, attachments=None):


def send_order_cancel_email(order):
cancel_msg = ''
if order.cancel_note:
cancel_msg=u"<br/>Message from the organizer: {cancel_note}".format(cancel_note=order.cancel_note)

send_email(
to=order.user.email,
action=TICKET_CANCELLED,
subject=MAILS[TICKET_CANCELLED]['subject'].format(
event_name=order.event.name,
invoice_id=order.invoice_number,
frontend_url=get_settings()['frontend_url']
),
html=MAILS[TICKET_CANCELLED]['message'].format(
event_name=order.event.name,
order_url=make_frontend_url('/orders/{identifier}'.format(identifier=order.identifier)),
cancel_note=order.cancel_note,
frontend_url=get_settings()['frontend_url']
frontend_url=get_settings()['frontend_url'],
cancel_msg=cancel_msg,
app_name=get_settings()['app_name']
)
)
12 changes: 7 additions & 5 deletions app/api/helpers/system_mails.py
Expand Up @@ -186,11 +186,13 @@
'recipient': 'User',
'subject': u'Your order for {event_name} has been cancelled ({invoice_id})',
'message': (
u"Hi,Your order for {event_name} has been cancelled has been cancelled by the organizer"
u"<br/>Please contact the organizer for more info" +
u"<br/>Message from the organizer: {cancel_note}"
u"<br/> <a href='{order_url}'>Click here</a> to view/download the invoice."
u"<br/>Login to manage the orders at {frontend_url} </em>"
u"Hello,"
u"<br/>your order for {event_name} has been cancelled by the organizer."
u"<br/>Please contact the organizer for more info." +
u"{cancel_msg}"
u"<br/>To manage orders please login to {frontend_url} and visit \"My Tickets\"."
u"<br/>Best regards,"
u"<br/>{app_name} Team"
)
},
EVENT_EXPORTED: {
Expand Down

0 comments on commit f4c3754

Please sign in to comment.