adding discount to premium page
This commit is contained in:
@ -36,3 +36,4 @@
|
||||
@require 'welcome_wizard'
|
||||
@require 'intro'
|
||||
@require 'in_app_announcements'
|
||||
@require 'discounts'
|
||||
|
24
assets/css/src/discounts.styl
Normal file
24
assets/css/src/discounts.styl
Normal file
@ -0,0 +1,24 @@
|
||||
.mailpoet-discount-container
|
||||
margin: 15px
|
||||
padding: 20px
|
||||
background: white
|
||||
border: 1px solid #FF5301
|
||||
text-align: center
|
||||
|
||||
.mailpoet-discount-container h1
|
||||
margin: 0
|
||||
line-height: 1.2em
|
||||
font-size: 2.8em
|
||||
font-weight: 400
|
||||
|
||||
.mailpoet-discount-container p
|
||||
line-height: 1.2em
|
||||
font-size: 1.2em
|
||||
|
||||
.mailpoet-discount-container a
|
||||
display: inline-block
|
||||
padding: 10px 30px
|
||||
background: #FF5301
|
||||
border: 1px solid #CC4200
|
||||
color: white
|
||||
text-decoration: none
|
@ -391,7 +391,8 @@ class Menu {
|
||||
function premium() {
|
||||
$data = array(
|
||||
'subscriber_count' => Subscriber::getTotalSubscribers(),
|
||||
'sub_menu' => self::MAIN_PAGE_SLUG
|
||||
'sub_menu' => self::MAIN_PAGE_SLUG,
|
||||
'display_discount' => time() <= strtotime('2018-11-30 23:59:59')
|
||||
);
|
||||
|
||||
$this->displayPage('premium.html', $data);
|
||||
|
@ -3,7 +3,6 @@
|
||||
namespace MailPoet\Util\Notices;
|
||||
|
||||
use MailPoet\Util\Helpers;
|
||||
use MailPoet\WP\Notice as WPNotice;
|
||||
|
||||
class PHPVersionWarnings {
|
||||
|
||||
@ -27,7 +26,7 @@ class PHPVersionWarnings {
|
||||
$error = Helpers::replaceLinkTags($error_string, 'https://beta.docs.mailpoet.com/article/251-upgrading-the-websites-php-version', array('target' => '_blank'));
|
||||
$extra_classes = 'mailpoet-dismissible-notice is-dismissible';
|
||||
|
||||
return WPNotice::displayError($error, $extra_classes, self::OPTION_NAME);
|
||||
return \MailPoet\WP\Notice::displayError($error, $extra_classes, self::OPTION_NAME);
|
||||
}
|
||||
|
||||
function disable() {
|
||||
|
@ -36,7 +36,6 @@ class PermanentNotices {
|
||||
}
|
||||
|
||||
function ajaxDismissNoticeHandler() {
|
||||
error_log('YOOOOOOOOOOOOOOOOO POST YES!');
|
||||
if(!isset($_POST['type'])) return;
|
||||
switch($_POST['type']) {
|
||||
case (PHPVersionWarnings::OPTION_NAME):
|
||||
|
@ -1,8 +1,17 @@
|
||||
<% extends 'layout.html' %>
|
||||
|
||||
<% block content %>
|
||||
|
||||
<div class="wrap mailpoet-about-wrap">
|
||||
|
||||
<% if display_discount %>
|
||||
<div class="mailpoet-discount-container">
|
||||
<h1><%= __('Discounts up to 40% for a limited time') %></h1>
|
||||
<p><%= __("Don’t miss out on our only sale of the year which ends on November 30.") %></p>
|
||||
<p><%= __("There’s never been a better time to change gears.") %></p>
|
||||
<a href=" https://account.mailpoet.com/?s=<%= subscriber_count %>&utm_source=plugin&utm_medium=premium&utm_campaign=discount">Save up to 40%</a>
|
||||
</div>
|
||||
<% endif %>
|
||||
|
||||
<h1 style="text-align: center; margin-right: 0;"><%= __('What is MailPoet Premium?') %></h1>
|
||||
|
||||
<p class="about-text" style="text-align: center; margin-right: 0;"><%= __("Check out the brief video below. Or, keep reading!") %></p>
|
||||
|
Reference in New Issue
Block a user