Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add link to dashboard in promote customer e-mail
Anna Siwik8d8ef3dd29c7
diff --git a/saleor/dashboard/emails.py b/saleor/dashboard/emails.pyindex 52b47a008e..1ffd31bea0 100644--- a/saleor/dashboard/emails.py+++ b/saleor/dashboard/emails.py@@ -2,10 +2,13 @@ from celery import shared_taskfrom django.conf import settingsfrom django.contrib.auth.tokens import default_token_generatorfrom django.contrib.sites.models import Site+from django.urls import reversefrom django.utils.encoding import force_bytesfrom django.utils.http import urlsafe_base64_encodefrom templated_email import send_templated_mail+from ..core.utils import build_absolute_uri+@shared_taskdef send_set_password_email(staff):@@ -29,6 +32,7 @@ def send_promote_customer_to_staff_email(staff):ctx = {'protocol': 'http','domain': site.domain,+ 'url': build_absolute_uri(reverse('dashboard:index')),'site_name': site.name}send_templated_mail(template_name='dashboard/staff/promote_customer',diff --git a/templates/templated_email/html/source/dashboard/staff/promote_customer.mjml b/templates/templated_email/html/source/dashboard/staff/promote_customer.mjmlindex fa64fe9910..4c6b84db1b 100644--- a/templates/templated_email/html/source/dashboard/staff/promote_customer.mjml+++ b/templates/templated_email/html/source/dashboard/staff/promote_customer.mjml@@ -19,7 +19,8 @@</mj-text><mj-text>{% blocktrans context "Promote customer to staff member confirmation e-mail text" %}- You're receiving this e-mail because you have been promoted to staff member at {{ domain }}.+ You're receiving this e-mail because you have been promoted to staff member at {{ domain }}.<br/>+ To access dashboard please visit: <a href="{{ url }}">{{ url }}</a>{% endblocktrans %}</mj-text></mj-column>