Skip to content

Commit f419ec3

Browse files
Hwashiang Yunathanjosiah
authored andcommitted
MC-20549: Refactor CE modules E-mail templates to use scalars variables
- Fix email template static test failures
1 parent 9b370c9 commit f419ec3

File tree

10 files changed

+30
-11
lines changed

10 files changed

+30
-11
lines changed

app/code/Magento/Customer/view/frontend/email/account_new.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
-->
77
<!--@subject {{trans "Welcome to %store_name" store_name=$store.frontend_name}} @-->
88
<!--@vars {
9-
"var this.getUrl($store, 'customer/account/')":"Customer Account URL",
9+
"var store.frontend_name":"Store Name",
10+
"var this.getUrl($store,'customer/account/',[_nosid:1])":"Customer Account URL",
11+
"var this.getUrl($store,'customer/account/createPassword/',[_query:[id:$customer.id,token:$customer.rp_token],_nosid:1])":"Password Reset URL",
1012
"var customer.email":"Customer Email",
1113
"var customer.name":"Customer Name"
1214
} @-->

app/code/Magento/Customer/view/frontend/email/account_new_confirmation.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
-->
77
<!--@subject {{trans "Please confirm your %store_name account" store_name=$store.frontend_name}} @-->
88
<!--@vars {
9-
"var this.getUrl($store, 'customer/account/confirm/', [_query:[id:$customer.id, key:$customer.confirmation, back_url:$back_url]])":"Account Confirmation URL",
10-
"var this.getUrl($store, 'customer/account/')":"Customer Account URL",
9+
"var store.frontend_name":"Store Name",
10+
"var this.getUrl($store,'customer/account/confirm/',[_query:[id:$customer.id,key:$customer.confirmation,back_url:$back_url],_nosid:1])":"Account Confirmation URL",
1111
"var customer.email":"Customer Email",
1212
"var customer.name":"Customer Name"
1313
} @-->

app/code/Magento/Customer/view/frontend/email/account_new_confirmed.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
-->
77
<!--@subject {{trans "Welcome to %store_name" store_name=$store.frontend_name}} @-->
88
<!--@vars {
9-
"var this.getUrl($store, 'customer/account/')":"Customer Account URL",
9+
"var store.frontend_name":"Store Name",
10+
"var this.getUrl($store,'customer/account/',[_nosid:1])":"Customer Account URL",
11+
"var this.getUrl($store,'customer/account/createPassword/',[_query:[id:$customer.id,token:$customer.rp_token],_nosid:1])":"Password Reset URL",
1012
"var customer.email":"Customer Email",
1113
"var customer.name":"Customer Name"
1214
} @-->

app/code/Magento/Customer/view/frontend/email/account_new_no_password.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
*/
66
-->
77
<!--@subject {{trans "Welcome to %store_name" store_name=$store.frontend_name}} @-->
8-
<!--@vars {
9-
"var this.getUrl($store, 'customer/account/')":"Customer Account URL",
8+
<!--@vars {
9+
"var store.frontend_name":"Store Name",
10+
"var this.getUrl($store,'customer/account/createPassword/',[_query:[id:$customer.id,token:$customer.rp_token],_nosid:1])":"Create Password URL",
1011
"var customer.email":"Customer Email",
1112
"var customer.name":"Customer Name"
1213
} @-->

app/code/Magento/Customer/view/frontend/email/change_email.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
*/
66
-->
77
<!--@subject {{trans "Your %store_name email has been changed" store_name=$store.frontend_name}} @-->
8-
<!--@vars {} @-->
8+
<!--@vars {
9+
"var store.frontend_name":"Store Name",
10+
"var store_email":"Store Email",
11+
"var store_phone":"Store Phone"
12+
} @-->
913
{{template config_path="design/email/header_template"}}
1014

1115
<p class="greeting">{{trans "Hello,"}}</p>

app/code/Magento/Customer/view/frontend/email/change_email_and_password.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
*/
66
-->
77
<!--@subject {{trans "Your %store_name email and password has been changed" store_name=$store.frontend_name}} @-->
8-
<!--@vars {} @-->
8+
<!--@vars {
9+
"var store.frontend_name":"Store Name",
10+
"var store_email":"Store Email",
11+
"var store_phone":"Store Phone"
12+
} @-->
913
{{template config_path="design/email/header_template"}}
1014

1115
<p class="greeting">{{trans "Hello,"}}</p>

app/code/Magento/Customer/view/frontend/email/password_new.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
-->
77
<!--@subject {{trans "Reset your %store_name password" store_name=$store.frontend_name}} @-->
88
<!--@vars {
9-
"var this.getUrl(store, 'customer/account/')":"Customer Account URL",
9+
"var store.frontend_name":"Store Name",
10+
"var this.getUrl($store,'customer/account/createPassword',[_query:[id:$customer.id,token:$customer.rp_token],_nosid:1])":"Password Reset URL",
1011
"var customer.name":"Customer Name"
1112
} @-->
1213
{{template config_path="design/email/header_template"}}

app/code/Magento/Customer/view/frontend/email/password_reset.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
-->
77
<!--@subject {{trans "Your %store_name password has been changed" store_name=$store.frontend_name}} @-->
88
<!--@vars {
9-
"var customer.name":"Customer Name"
9+
"var store.frontend_name":"Store Name",
10+
"var store_email":"Store Email",
11+
"var store_phone":"Store Phone"
1012
} @-->
1113
{{template config_path="design/email/header_template"}}
1214

app/code/Magento/Customer/view/frontend/email/password_reset_confirmation.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
-->
77
<!--@subject {{trans "Reset your %store_name password" store_name=$store.frontend_name}} @-->
88
<!--@vars {
9+
"var store.frontend_name":"Store Name",
910
"var customer.name":"Customer Name",
10-
"var this.getUrl($store, 'customer/account/createPassword/', [_query:[id:$customer.id, token:$customer.rp_token]])":"Reset Password URL"
11+
"var this.getUrl($store,'customer/account/createPassword/',[_query:[token:$customer.rp_token],_nosid:1])":"Reset Password URL"
1112
} @-->
1213
{{template config_path="design/email/header_template"}}
1314

app/code/Magento/Email/view/frontend/email/header.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
-->
77
<!--@subject {{trans "Header"}} @-->
88
<!--@vars {
9+
"var logo_url":"Email Logo Image URL",
10+
"var logo_alt":"Email Logo Alt Text",
911
"var logo_height":"Email Logo Image Height",
1012
"var logo_width":"Email Logo Image Width",
1113
"var template_styles|raw":"Template CSS"

0 commit comments

Comments
 (0)