From 9db1fe9a22e85e457350157de770925f5e715c09 Mon Sep 17 00:00:00 2001 From: Sanne de Vries <65487235+sanne-san@users.noreply.github.com> Date: Tue, 6 Aug 2024 18:29:13 +0200 Subject: [PATCH] Improved new paid subscription email design (#20718) REF MOM-340 --- .../lib/email-templates/donation.hbs | 6 +- .../lib/email-templates/new-free-signup.hbs | 10 +- .../lib/email-templates/new-paid-started.hbs | 127 ++++++++---------- .../staff-service/test/staff-service.test.js | 12 +- 4 files changed, 65 insertions(+), 90 deletions(-) diff --git a/ghost/staff-service/lib/email-templates/donation.hbs b/ghost/staff-service/lib/email-templates/donation.hbs index 35a33fc398..420ac9c8d7 100644 --- a/ghost/staff-service/lib/email-templates/donation.hbs +++ b/ghost/staff-service/lib/email-templates/donation.hbs @@ -34,9 +34,9 @@

From:

- +

Amount received:

-

{{donation.amount}}

+

{{donation.amount}}

@@ -61,7 +61,7 @@ -

Don’t want to receive these emails? Manage your preferences here.

+

Don’t want to receive these emails? Manage your preferences here.

diff --git a/ghost/staff-service/lib/email-templates/new-free-signup.hbs b/ghost/staff-service/lib/email-templates/new-free-signup.hbs index 1d9e1fb69e..712314fa42 100644 --- a/ghost/staff-service/lib/email-templates/new-free-signup.hbs +++ b/ghost/staff-service/lib/email-templates/new-free-signup.hbs @@ -33,7 +33,7 @@ {{/if}} -

New free subscriber to {{siteTitle}}

+

You have a new free member

@@ -42,13 +42,13 @@ @@ -95,7 +95,7 @@ diff --git a/ghost/staff-service/lib/email-templates/new-paid-started.hbs b/ghost/staff-service/lib/email-templates/new-paid-started.hbs index d3b7674207..4c09b96c8c 100644 --- a/ghost/staff-service/lib/email-templates/new-paid-started.hbs +++ b/ghost/staff-service/lib/email-templates/new-paid-started.hbs @@ -26,77 +26,52 @@

Name:

- + {{#if referrerSource}}

Source:

-

{{referrerSource}}

+

{{referrerSource}}

{{#if attributionTitle}}

Page:

- + {{/if}} {{/if}}
-

Don’t want to receive these emails? Manage your preferences here.

+

Don’t want to receive these emails? Manage your preferences here.

+ {{#if siteIconUrl}} + + + + {{/if}}
{{siteTitle}}
-

Congratulations!

-

You have a new paid member.

- - - - - - - -
- - - - - -
-
- {{memberData.initials}} -
-
-

{{memberData.name}}

- {{#if memberData.showEmail}} - - {{/if}} -

Subscription started on {{subscriptionData.startedOn}}

-
-
- - - - - -
- -

Tier

-
-

{{tierData.name}} - {{#if tierData.details}} - {{tierData.details}}{{/if}} -

- - {{#if offerData}} -

Offer

-
-

{{offerData.name}} - {{offerData.details}}

- {{/if}} - - {{#if referrerSource}} -

Signup info

-
-

Source - - {{referrerSource}} -

- {{#if attributionTitle}} -

Page - - {{attributionTitle}} -

- {{/if}} - {{/if}} - -
- - +

You have a new paid subscriber

+
- - - diff --git a/ghost/staff-service/test/staff-service.test.js b/ghost/staff-service/test/staff-service.test.js index 1de3d71693..9540897a69 100644 --- a/ghost/staff-service/test/staff-service.test.js +++ b/ghost/staff-service/test/staff-service.test.js @@ -78,10 +78,6 @@ function testCommonPaidSubMailData({member, mailStub, getEmailAlertUsersStub}) { mailStub.calledWith( sinon.match.has('html', sinon.match('$50.00/month')) ).should.be.true(); - - mailStub.calledWith( - sinon.match.has('html', sinon.match('Subscription started on 1 Aug 2022')) - ).should.be.true(); } function testCommonPaidSubCancelMailData({mailStub, getEmailAlertUsersStub}) { @@ -518,9 +514,7 @@ describe('StaffService', function () { member = { name: 'Ghost', email: 'member@example.com', - id: 'abc', - geolocation: '{"country": "France"}', - created_at: '2022-08-01T07:30:39.882Z' + id: 'abc' }; offer = { name: 'Half price', @@ -586,9 +580,7 @@ describe('StaffService', function () { it('sends paid subscription start alert without member name', async function () { let memberData = { email: 'member@example.com', - id: 'abc', - geolocation: '{"country": "France"}', - created_at: '2022-08-01T07:30:39.882Z' + id: 'abc' }; await service.emails.notifyPaidSubscriptionStarted({member: memberData, offer: null, tier, subscription}, options);
- +
+ + + + +
+

Name:

+ +

Tier:

+ + {{#if offerData}} +

Offer:

+ + {{/if}} + {{#if referrerSource}} +

Source:

+

{{referrerSource}}

+ {{#if attributionTitle}} +

Page:

+ + {{/if}} + {{/if}} +
+ - +
View member + + + + + + +
View member
+
@@ -104,21 +79,29 @@
-
-

You can also copy & paste this URL into your browser:

- + + + + + + + +
+

Or copy and paste this URL into your browser:

+ +
-

This message was sent from {{siteDomain}} to {{toEmail}}

+
+

This message was sent from {{siteDomain}} to {{toEmail}}

-

Don’t want to receive these emails? Manage your preferences here.

+
+

Don’t want to receive these emails? Manage your preferences here.