Separate mail template for incomplete payment notifications (#2999)

* Separate mail template for incomplete payment notifications

* Update src/pretix/base/settings.py

Co-authored-by: Richard Schreiber <wiffbi@gmail.com>

* Update src/pretix/control/forms/event.py

Co-authored-by: Richard Schreiber <wiffbi@gmail.com>

---------

Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
Co-authored-by: Richard Schreiber <wiffbi@gmail.com>
This commit is contained in:
Julian Rother
2023-02-09 22:12:35 +01:00
committed by GitHub
parent c44ff6244d
commit 28eb730fdd
6 changed files with 50 additions and 10 deletions

View File

@@ -42,7 +42,7 @@ from django.conf import settings
from django.db import transaction
from django.db.models import Max, Min, Q
from django.db.models.functions import Length
from django.utils.translation import gettext, gettext_noop
from django.utils.translation import gettext_noop
from django_scopes import scope, scopes_disabled
from pretix.base.email import get_email_context
@@ -64,9 +64,9 @@ logger = logging.getLogger(__name__)
def notify_incomplete_payment(o: Order):
with language(o.locale, o.event.settings.region):
email_template = o.event.settings.mail_text_order_expire_warning
email_context = get_email_context(event=o.event, order=o)
email_subject = gettext('Your order received an incomplete payment: %(code)s') % {'code': o.code}
email_template = o.event.settings.mail_text_order_incomplete_payment
email_context = get_email_context(event=o.event, order=o, pending_sum=o.pending_sum)
email_subject = o.event.settings.mail_subject_order_incomplete_payment
try:
o.send_mail(