From 43f0326c196d4efa5d2ebe333c9dcc9d6ee7f74c Mon Sep 17 00:00:00 2001 From: fditrapani Date: Wed, 9 Sep 2020 08:48:15 -0400 Subject: [PATCH] Added a whole bunch of emails --- .DS_Store | Bin 6148 -> 8196 bytes cancelled-plan.php | 78 ++++++++++++++++++++++++ cancelled-subscriptions.php | 90 ++++++++++++++++++++++++++++ colors.php | 4 +- components.php | 54 +++++++++++++---- expired.php | 2 +- expiring-card.php | 87 +++++++++++++++++++++++++++ expiring-domain.php | 77 ++++++++++++++++++++++++ expiring.php => expiring-plan.php | 2 +- expiring-subscriptions.php | 96 ++++++++++++++++++++++++++++++ index.php | 14 ++++- missing-payment-info.php | 2 +- pre-renewal.php | 74 +++++++++++++++++++++++ refund.php | 92 ++++++++++++++++++++++++++++ renewal-failure.php | 87 +++++++++++++++++++++++++++ styles.php | 13 +++- suspended.php | 96 ++++++++++++++++++++++++++++++ updated-payment-method.php | 71 ++++++++++++++++++++++ 18 files changed, 918 insertions(+), 21 deletions(-) create mode 100644 cancelled-plan.php create mode 100644 cancelled-subscriptions.php create mode 100644 expiring-card.php create mode 100644 expiring-domain.php rename expiring.php => expiring-plan.php (98%) create mode 100644 expiring-subscriptions.php create mode 100644 pre-renewal.php create mode 100644 refund.php create mode 100644 renewal-failure.php create mode 100644 suspended.php create mode 100644 updated-payment-method.php diff --git a/.DS_Store b/.DS_Store index 85299f373706f4d8d86507ca79255bbfb04c4836..0d100083540e82de10609717914120e7d65985f6 100644 GIT binary patch delta 580 zcmZoMXmOBWU|?W$DortDU;r^WfEYvza8E20o2aMA$h$FMH}hr%jz7$c**Q2SHn1@A zZsuV*##o=3Tvm{jlb;0CzAvdDC$qT3z~H`s03#DK3o9Et2PYRd4=*3TfS{1DpopNT zsF=8fsHBvXOuT?_Qetv;dQpC9UW#*mPJWS7PHAdHW^#UBaAs9%L`iBz35XFdAcUqa zC^aPxAygkySpZZdf)D{4=3bPVnirj3l$qk6mR6iv5`n~yj2GZ9PAe!Jy6H$l%2g%#gw0Th7qOFpFUs!w!a{47V8GFnnWVVH9Ij zV$^0dVYFqmXY^nUWDH^qVT@#qVvL3uz{ChONES*%DaMq|hgkU;H*XOMV4m2(BghO9 lm*57{uAsEAS&-v9^JIPz&&mEg92`JXK*@w*b3D%+W&l3klb-+p delta 108 zcmZp1XfcprU|?W$DortDU=RQ@Ie-{Mvv5r;6q~50$jGxXU^g=(&t@KhV~ms62>;($ uVaB+aor6P=8K?>f1h|2OD@en}!tczJ`DHvo+8LN2MuALc*c{I@hZz7NuM&Cy diff --git a/cancelled-plan.php b/cancelled-plan.php new file mode 100644 index 0000000..cf2f088 --- /dev/null +++ b/cancelled-plan.php @@ -0,0 +1,78 @@ + + + + + + + WordPress.com + + + + + + + + + + + + + " . renderRegularText("Your plan will continue to run until it expires. If you choose not to renew, these features will be removed from your site.") . "

"; + $featureList = renderUnorderedList( array( + 1 => renderRegularText("Ability to set filippodt.com as your primary address."), + 2 => renderRegularText("Remove WordPress.com ads from your site."), + 3 => renderRegularText("Access to live chat when you need immediate support."), + 4 => renderRegularText("Increased storage space for your photos, audio files, or videos."), + ), "warning"); + + $billingContent = renderBillingHistory(); + + $recentPurchaseTitle = renderBoldText("Recently renewed"); + $horizontalRule = renderHorizontalRule(); + $recentPurchaseDetails = renderItem( + "filippodt.com", + $color['success'], + "Renewed for $20 on July 22, 2020", + ".com domain registration" ); + + $supportContent = renderSupport(); + + $content = << + + \ No newline at end of file diff --git a/cancelled-subscriptions.php b/cancelled-subscriptions.php new file mode 100644 index 0000000..56d708b --- /dev/null +++ b/cancelled-subscriptions.php @@ -0,0 +1,90 @@ + + + + + + + WordPress.com + + + + + + + + + + + + + " . renderRegularText("Your upgrades will continue to run until they expires. If you choose not to renew, these features will be removed from your site.") . "

"; + $featureList = renderUnorderedList( array( + 1 => renderRegularText("Ability to set filippodt.com as your primary address."), + 2 => renderRegularText("Remove WordPress.com ads from your site."), + 3 => renderRegularText("Access to live chat when you need immediate support."), + 4 => renderRegularText("Increased storage space for your photos, audio files, or videos."), + ), "warning"); + + $billingContent = renderBillingHistory(); + + $supportContent = renderSupport(); + + $content = <<$secondary_button

+ $halfVerticalSpacer + $horizontalRule + $halfVerticalSpacer + $domain +

$domain_button

+ $halfVerticalSpacer + $horizontalRule + $halfVerticalSpacer + + + $button + $verticalSpacer + + $featureTitle + $featureParagraph + $featureList + $verticalSpacer + + $billingContent + + $supportContent + EOD; + + echo renderEmailTemplate( "You cancelled your subscription", $content ); + ?> + + \ No newline at end of file diff --git a/colors.php b/colors.php index c273188..1cfbe76 100644 --- a/colors.php +++ b/colors.php @@ -4,8 +4,10 @@ 'white' => "#FFFFFF", 'background' => "#F3F6F8", 'text' => '#353535', + 'lightText' => '#646970', 'success' => '#007E65', - 'error' => '#FF001F', + 'error' => '#D63638', + 'warning' => '#B26200', 'link' => '#1282D6', 'border' => '#DCDCDE' ); diff --git a/components.php b/components.php index a456153..8ac3c87 100644 --- a/components.php +++ b/components.php @@ -98,7 +98,7 @@ function renderEmailTitle( $title ) { $emailTitle = <<

- + $title

@@ -163,11 +163,16 @@ function renderUnorderedList( $list, $icon ) { return $unorderedList; } -function renderItem( $itemTitle, $itemStatus, $itenStatusMessage, $itemDescription) { +function renderItem( $itemTitle, $itemStatus, $itenStatusMessage, $itemDescription, $showSubscription = true, $showStatusInColumn = false) { $title = renderBoldText( $itemTitle ); - $manageSubscriptionButton = renderTextButton("Settings"); - $status = renderBoldText( $itenStatusMessage, $itemStatus ); + $manageSubscriptionButton = $showSubscription ? renderTextButton("Settings") : "" ; + $status = renderRegularText( $itenStatusMessage, $itemStatus ); + + $sideBarStatus = $showStatusInColumn ? $status : null; + $bottomStatus = !$showStatusInColumn ? "$status" : null; + $description = renderRegularText( $itemDescription ); + $descriptionPadding = $showStatusInColumn ? "0" : "8px"; $item = << @@ -178,18 +183,15 @@ function renderItem( $itemTitle, $itemStatus, $itenStatusMessage, $itemDescripti $manageSubscriptionButton + $sideBarStatus - + $description - - - $status - - + $bottomStatus EOD; @@ -213,6 +215,22 @@ function renderPrimaryButton( $buttonCta ) { return $button; } +function renderSecondaryButton( $buttonCta ) { + $color = include("colors.php"); + + $button = << + + + $buttonCta + + + + EOD; + + return $button; +} + function renderTextButton( $text, $textColor = "#1282D6" ){ $color = include("colors.php"); @@ -223,6 +241,18 @@ function renderTextButton( $text, $textColor = "#1282D6" ){ return $textButton; } +function renderTextLink( $text, $textColor = '#353535', $size = "16px" ){ + $color = include("colors.php"); + $text = renderRegularText( $text, $textColor, $size ); + $textLink = << + $text + + EOD; + + return $textLink; +} + function renderHorizontalRule() { $color = include("colors.php"); @@ -295,8 +325,8 @@ function renderFooter() { "
", "" ); - $automatticDetails = "" . renderRegularText( "Automattic, Inc.", "#1282D6" ) . "
" . - renderRegularText( "60 29th St. #343, San Francisco, CA 94110 ", $color['link'], "14px" ); + $automatticDetails = "" . renderRegularText( "Automattic, Inc.", $color["text"] ) . "
" . + renderRegularText( "60 29th St. #343, San Francisco, CA 94110 ", $color['text'], "14px" ); $loveNote = renderRegularText( "Sent with from your friends at WordPress.com", ); diff --git a/expired.php b/expired.php index 92b2831..40b5a3a 100644 --- a/expired.php +++ b/expired.php @@ -21,7 +21,7 @@ $product = renderItem( "WordPress.com Personal", $color["error"], - "Expired Jul 2, 2020", + "Expired July 2, 2020", "Plan for " . renderRegularText("Filippo Di Trapani") . "", ); $button_cta = renderRegularText("Add another month for $3", $color["white"], "14px"); diff --git a/expiring-card.php b/expiring-card.php new file mode 100644 index 0000000..4b8bc06 --- /dev/null +++ b/expiring-card.php @@ -0,0 +1,87 @@ + + + + + + + WordPress.com + + + + + + + + + + + + + " . renderRegularText("Please note that if we can’t process your payment, your upgrades will be removed from your site.") . "

"; + $product = renderItem( + "WordPress.com Personal", + $color["warning"], + "Expires August 22, 2020", + "Plan for " . renderRegularText("Filippo Di Trapani") . "", + ); + $domain = renderItem( + "filippodt.com", + $color["warning"], + "Expires August 28, 2020", + "Primary domain for " . renderRegularText("Filippo Di Trapani") . "", + ); + + + $billingContent = renderBillingHistory(); + + $supportContent = renderSupport(); + + $content = << + + \ No newline at end of file diff --git a/expiring-domain.php b/expiring-domain.php new file mode 100644 index 0000000..9b98742 --- /dev/null +++ b/expiring-domain.php @@ -0,0 +1,77 @@ + + + + + + + WordPress.com + + + + + + + + + + + + + " . renderRegularText("Filippo Di Trapani") . "", + ); + $button_cta = renderRegularText("Add another year for all", $color["white"], "14px"); + $button = renderPrimaryButton( $button_cta ); + + $verticalSpacer = renderVerticalSpacer( "40px" ); + $halfVerticalSpacer = renderVerticalSpacer( "20px" ); + $featureTitle = renderSecondaryTitle( "Don’t lose out" ); + $featureParagraph = "

" . renderRegularText("Please note that if you choose not to renew:") . "

"; + $featureList = renderUnorderedList( array( + 1 => renderRegularText("You will loose your claim to filippodt.com."), + 2 => renderRegularText("Your domain will become available for other people to register."), + 3 => renderRegularText("Vistors to") . " " . renderRegularText("Filippo Di Trapani") . " " . renderRegularText("will not get redirected to your site." ), + ), "warning"); + + $billingContent = renderBillingHistory(); + + $recentPurchaseTitle = renderBoldText("Recently renewed"); + $horizontalRule = renderHorizontalRule(); + $recentPurchaseDetails = renderItem( + "WordPress.com Personal", + $color['success'], + "Renewed for $60 on July 22, 2020", + renderRegularText("Plan for ") . " " . renderRegularText("Filippo Di Trapani") . " " ); + + $supportContent = renderSupport(); + + $content = << + + \ No newline at end of file diff --git a/expiring.php b/expiring-plan.php similarity index 98% rename from expiring.php rename to expiring-plan.php index 9ed62f4..221e5d7 100644 --- a/expiring.php +++ b/expiring-plan.php @@ -21,7 +21,7 @@ $product = renderItem( "WordPress.com Personal", $color["error"], - "Expires Aug 22, 2020", + "Expires August 22, 2020", "Plan for " . renderRegularText("Filippo Di Trapani") . "", ); $button_cta = renderRegularText("Add another year for $60", $color["white"], "14px"); diff --git a/expiring-subscriptions.php b/expiring-subscriptions.php new file mode 100644 index 0000000..2a15df1 --- /dev/null +++ b/expiring-subscriptions.php @@ -0,0 +1,96 @@ + + + + + + + WordPress.com + + + + + + + + + + + + + " . renderRegularText("Please note that if you choose not to renew, these features will be removed from your site.") . "

"; + $featureList = renderUnorderedList( array( + 1 => renderRegularText("Ability to set filippodt.com as your primary address."), + 2 => renderRegularText("Remove WordPress.com ads from your site."), + 3 => renderRegularText("Access to live chat when you need immediate support."), + 4 => renderRegularText("Increased storage space for your photos, audio files, or videos."), + ), "warning"); + + $billingContent = renderBillingHistory(); + + $recentPurchaseTitle = renderBoldText("Recently renewed"); + $recentPurchaseDetails = renderItem( + "filippodt.com", + $color['success'], + "Renewed for $20 on July 22, 2020", + ".com domain registration" ); + + $supportContent = renderSupport(); + + $content = <<$secondary_button

+ $halfVerticalSpacer + $horizontalRule + $halfVerticalSpacer + $domain +

$domain_button

+ $halfVerticalSpacer + $horizontalRule + $halfVerticalSpacer + + $button + $verticalSpacer + + $featureTitle + $featureParagraph + $featureList + $verticalSpacer + + $billingContent + $supportContent + EOD; + + echo renderEmailTemplate( "Your upgrades are about to expire", $content ); + ?> + + \ No newline at end of file diff --git a/index.php b/index.php index 0b82c42..a147ce3 100644 --- a/index.php +++ b/index.php @@ -20,8 +20,18 @@ '' . renderRegularText("Expired plan") . '', - 2 => '' . renderRegularText("Expiring plan") . '', - 3 => '' . renderRegularText("Missing payment information") . '' + 2 => '' . renderRegularText("Expiring plan") . '', + 3 => '' . renderRegularText("Expiring domain") . '', + 4 => '' . renderRegularText("Expiring subscriptions") . '', + 5 => '' . renderRegularText("Missing payment information") . '', + 6 => '' . renderRegularText("Pre-renewal") . '', + 7 => '' . renderRegularText("Expiring card") . '', + 8 => '' . renderRegularText("Renewal failure") . '', + 9 => '' . renderRegularText("Refund") . '', + 10 => '' . renderRegularText("Updated billing information") . '', + 11 => '' . renderRegularText("Cancelled plan") . '', + 12 => '' . renderRegularText("Cancelled subscription") . '', + 12 => '' . renderRegularText("Suspended site") . '', ), "checkmark"); echo renderEmailTemplate( "Email templates", $listOfPages . renderVerticalSpacer("30px") ); diff --git a/missing-payment-info.php b/missing-payment-info.php index fc33a80..8271016 100644 --- a/missing-payment-info.php +++ b/missing-payment-info.php @@ -21,7 +21,7 @@ $product = renderItem( "WordPress.com Personal", $color["error"], - "Expires Aug 22, 2020", + "Expires August 22, 2020", "Plan for " . renderRegularText("Filippo Di Trapani") . "", ); $button_cta = renderRegularText("Add a payment method", $color["white"], "14px"); diff --git a/pre-renewal.php b/pre-renewal.php new file mode 100644 index 0000000..d515956 --- /dev/null +++ b/pre-renewal.php @@ -0,0 +1,74 @@ + + + + + + + WordPress.com + + + + + + + + + + + + + renderRegularText("Ability to set filippodt.com as your primary address."), + 2 => renderRegularText("Remove WordPress.com ads from your site."), + 3 => renderRegularText("Access to live chat when you need immediate support."), + 4 => renderRegularText("Increased storage space for your photos, audio files, or videos."), + ), "checkmark"); + + $billingContent = renderBillingHistory(); + + $recentPurchaseTitle = renderBoldText("Recently renewed"); + $horizontalRule = renderHorizontalRule(); + $recentPurchaseDetails = renderItem( + "filippodt.com", + $color['success'], + "Renewed for $20 on July 22, 2020", + ".com domain registration" ); + + $supportContent = renderSupport(); + + $content = << + + \ No newline at end of file diff --git a/refund.php b/refund.php new file mode 100644 index 0000000..d611f32 --- /dev/null +++ b/refund.php @@ -0,0 +1,92 @@ + + + + + + + WordPress.com + + + + + + + + + + + + + renderRegularText("Ability to set filippodt.com as your primary address."), + 2 => renderRegularText("Remove WordPress.com ads from your site."), + 3 => renderRegularText("Access to live chat when you need immediate support."), + 4 => renderRegularText("Increased storage space for your photos, audio files, or videos."), + ), "checkmark"); + + $button_cta = renderRegularText("Add another year for both", $color["white"], "14px"); + $button = renderPrimaryButton( $button_cta ); + + + $billingContent = renderBillingHistory(); + + $recentPurchaseTitle = renderBoldText("Recently renewed"); + $recentPurchaseDetails = renderItem( + "filippodt.com", + $color['success'], + "Renewed for $20 on July 22, 2020", + ".com domain registration" ); + + $supportContent = renderSupport(); + + $content = << + + \ No newline at end of file diff --git a/renewal-failure.php b/renewal-failure.php new file mode 100644 index 0000000..81ba28a --- /dev/null +++ b/renewal-failure.php @@ -0,0 +1,87 @@ + + + + + + + WordPress.com + + + + + + + + + + + + + " . renderRegularText("Please note that if we can’t process your payment, your upgrades will be removed from your site.") . "

"; + $product = renderItem( + "WordPress.com Personal", + $color["warning"], + "Expires August 22, 2020", + "Plan for " . renderRegularText("Filippo Di Trapani") . "", + ); + $domain = renderItem( + "filippodt.com", + $color["warning"], + "Expires August 28, 2020", + "Primary domain for " . renderRegularText("Filippo Di Trapani") . "", + ); + + + $billingContent = renderBillingHistory(); + + $supportContent = renderSupport(); + + $content = << + + \ No newline at end of file diff --git a/styles.php b/styles.php index 518c5b6..5e79fb7 100644 --- a/styles.php +++ b/styles.php @@ -31,15 +31,22 @@ function renderStyles(){ } .primary-button a:hover, - .primary-button:hover { + .primary-button a:hover font { background: $color[black] !important; border-color: $color[black] !important; + color: $color[white] !important; } - .primary-button:active, - .primary-button a:active { + .primary-button:hover, + .primary-button:active { + border-color: $color[white] !important; + } + + .primary-button a:active, + .primary-button a:active font { background: $color[link] !important; border-color: $color[link] !important; + color: $color[white] !important; } EOD; diff --git a/suspended.php b/suspended.php new file mode 100644 index 0000000..b4b0c80 --- /dev/null +++ b/suspended.php @@ -0,0 +1,96 @@ + + + + + + + WordPress.com + + + + + + + + + + + + + " . renderRegularText("Your recent purchase was disputed through your bank or credit card company and the original payment was reveresed. When this happens, the transaction is reported as unauthorized or fraudulent and we are fined $20 by our payment processor. ") . renderBoldText("While the charge is in dispute, your subscription has been suspended.") . "

"; + + $howToContinueTitle = renderSecondaryTitle("How to continue using your subscription"); + + $howToContinueOne = renderRegularText("1."); + $howToContinueTwo = renderRegularText("2."); + + $howToContinueFirstBullet = renderRegularText("If the dispute was done recently, you might be able to cancel it with your bank. Once you’ve canceled the dispute, please reply to this email and we will assist you in restoring the subscription."); + $howToContinueSecondBullet = renderRegularText("If you prefer not to cancel the dispute or it is too late, you will be refunded once the payment provider has completed the dispute resolution which can take up to 75 days. In this case, a $20 fee must be paid if you’d like to start a new subscription."); + + $refundTitle = renderSecondaryTitle("How to get a refund"); + $refundText = "

" . renderRegularText("While the dispute is active, we do not have the option to issue a refund. If you no longer intend to use this subscription and would like a direct refund, please cancel the dispute through your bank or credit card so that we have the option to refund the charge. Once you have cancelled the dispute you can cancel your subscription and request a refund.") . "

"; + + $supportContent = renderSupport(); + + $content = << + + + $howToContinueOne + + +

$howToContinueFirstBullet

+ + + + + $howToContinueTwo + + +

$howToContinueSecondBullet

+ + + + + $verticalSpacer + + $refundTitle + $refundText + + $verticalSpacer + + $supportContent + EOD; + + echo renderEmailTemplate( "Your subscription has been suspended", $content ); + ?> + + \ No newline at end of file diff --git a/updated-payment-method.php b/updated-payment-method.php new file mode 100644 index 0000000..3676356 --- /dev/null +++ b/updated-payment-method.php @@ -0,0 +1,71 @@ + + + + + + + WordPress.com + + + + + + + + + + + + + + + \ No newline at end of file