diff --git a/lib/Config/Populator.php b/lib/Config/Populator.php index a2aa6f3a49..fa8ef25058 100644 --- a/lib/Config/Populator.php +++ b/lib/Config/Populator.php @@ -38,6 +38,7 @@ class Populator { "AppWelcome", "WorldCup", "FoodBox", + "Discount", ); } diff --git a/lib/Config/PopulatorData/Templates/Discount.php b/lib/Config/PopulatorData/Templates/Discount.php new file mode 100644 index 0000000000..5f3b924075 --- /dev/null +++ b/lib/Config/PopulatorData/Templates/Discount.php @@ -0,0 +1,466 @@ +template_image_url = '//ps.w.org/mailpoet/assets/newsletter-templates/discount'; + $this->social_icon_url = $assets_url . '/img/newsletter_editor/social-icons'; + } + + function get() { + return array( + 'name' => __("Discount", 'mailpoet'), + 'description' => __("A useful layout for a simple discount email.", 'mailpoet'), + 'readonly' => 1, + 'thumbnail' => $this->getThumbnail(), + 'body' => json_encode($this->getBody()), + ); + } + + private function getBody() { + return array( + 'content' => array( + 'type' => 'container', + 'orientation' => 'vertical', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + 0 => array( + 'type' => 'container', + 'orientation' => 'horizontal', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + 0 => array( + 'type' => 'container', + 'orientation' => 'vertical', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + 0 => array( + 'type' => 'spacer', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + 'height' => '20px', + ), + ), + ), + 1 => array( + 'type' => 'image', + 'link' => 'http://example.org', + 'src' => $this->template_image_url . '/bicycle-header3.png', + 'alt' => 'bicycle-header3', + 'fullWidth' => false, + 'width' => '423px', + 'height' => '135px', + 'styles' => array( + 'block' => array( + 'textAlign' => 'center', + ), + ), + ), + 2 => array( + 'type' => 'text', + 'text' => '

+

Hi [subscriber:firstname | default:reader]

+

+

Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec ut venenatis ipsum. Etiam efficitur magna a convallis consectetur. Nunc dapibus cursus mauris vel sollicitudin. Etiam magna libero, posuere ac nulla nec, iaculis pulvinar arcu.

', + ), + 3 => array( + 'type' => 'spacer', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + 'height' => '20px', + ), + ), + ), + ), + ), + ), + ), + 1 => array( + 'type' => 'container', + 'orientation' => 'horizontal', + 'styles' => array( + 'block' => array( + 'backgroundColor' => '#ebdddd', + ), + ), + 'blocks' => array( + 0 => array( + 'type' => 'container', + 'orientation' => 'vertical', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + 0 => array( + 'type' => 'divider', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + 'padding' => '16px', + 'borderStyle' => 'dashed', + 'borderWidth' => '2px', + 'borderColor' => '#9a5fa1', + ), + ), + ), + 1 => array( + 'type' => 'text', + 'text' => '

15% odio felis fringilla eget enim

', + ), + 2 => array( + 'type' => 'text', + 'text' => '

FUSCE LOBORTIS: WELOVEMAILPOET

', + ), + 3 => array( + 'type' => 'divider', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + 'padding' => '16px', + 'borderStyle' => 'dashed', + 'borderWidth' => '2px', + 'borderColor' => '#9a5fa1', + ), + ), + ), + ), + ), + ), + ), + 2 => array( + 'type' => 'container', + 'orientation' => 'horizontal', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + 0 => array( + 'type' => 'container', + 'orientation' => 'vertical', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + 0 => array( + 'type' => 'spacer', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + 'height' => '20px', + ), + ), + ), + 1 => array( + 'type' => 'button', + 'text' => 'SHOP NOW', + 'url' => 'http://example.org', + 'styles' => array( + 'block' => array( + 'backgroundColor' => '#9a5fa1', + 'borderColor' => '#854f8b', + 'borderWidth' => '3px', + 'borderRadius' => '5px', + 'borderStyle' => 'solid', + 'width' => '288px', + 'lineHeight' => '50px', + 'fontColor' => '#ffffff', + 'fontFamily' => 'Verdana', + 'fontSize' => '18px', + 'fontWeight' => 'normal', + 'textAlign' => 'center', + ), + ), + ), + 2 => array( + 'type' => 'text', + 'text' => '

Use your discount on these great products...

', + ), + 3 => array( + 'type' => 'spacer', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + 'height' => '20px', + ), + ), + ), + ), + ), + ), + ), + 3 => array( + 'type' => 'container', + 'orientation' => 'horizontal', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + 0 => array( + 'type' => 'container', + 'orientation' => 'vertical', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + 0 => array( + 'type' => 'image', + 'link' => 'http://example.org', + 'src' => $this->template_image_url . '/red-icycle-2.jpg', + 'alt' => 'red-icycle', + 'fullWidth' => false, + 'width' => '558px', + 'height' => '399px', + 'styles' => array( + 'block' => array( + 'textAlign' => 'center', + ), + ), + ), + 1 => array( + 'type' => 'text', + 'text' => '

Lovely Red Bicycle

+

Quisque nec vulputate velit, non sagittis ex. Suspendisse ligula urna, tempus sed iaculis sit amet, convallis at arcu.

+

$289.99

', + ), + 2 => array( + 'type' => 'button', + 'text' => 'Tempus', + 'url' => 'http://example.org', + 'styles' => array( + 'block' => array( + 'backgroundColor' => '#9a5fa1', + 'borderColor' => '#854f8b', + 'borderWidth' => '3px', + 'borderRadius' => '5px', + 'borderStyle' => 'solid', + 'width' => '180px', + 'lineHeight' => '40px', + 'fontColor' => '#ffffff', + 'fontFamily' => 'Verdana', + 'fontSize' => '18px', + 'fontWeight' => 'normal', + 'textAlign' => 'center', + ), + ), + ), + ), + ), + 1 => array( + 'type' => 'container', + 'orientation' => 'vertical', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + 0 => array( + 'type' => 'image', + 'link' => 'http://example.org', + 'src' => $this->template_image_url . '/orange-bicycle.jpg', + 'alt' => 'orange-bicycle', + 'fullWidth' => false, + 'width' => '639px', + 'height' => '457px', + 'styles' => array( + 'block' => array( + 'textAlign' => 'center', + ), + ), + ), + 1 => array( + 'type' => 'text', + 'text' => '

Little Orange Bicycle

+

Praesent molestie mollis sapien vel dignissim. Maecenas ultrices, odio eget dapibus iaculis, ligula ex aliquet leo.

+

$209.99

', + ), + 2 => array( + 'type' => 'button', + 'text' => 'Tempus', + 'url' => 'http://example.org', + 'styles' => array( + 'block' => array( + 'backgroundColor' => '#9a5fa1', + 'borderColor' => '#854f8b', + 'borderWidth' => '3px', + 'borderRadius' => '5px', + 'borderStyle' => 'solid', + 'width' => '180px', + 'lineHeight' => '40px', + 'fontColor' => '#ffffff', + 'fontFamily' => 'Verdana', + 'fontSize' => '18px', + 'fontWeight' => 'normal', + 'textAlign' => 'center', + ), + ), + ), + ), + ), + ), + ), + 4 => array( + 'type' => 'container', + 'orientation' => 'horizontal', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + 0 => array( + 'type' => 'container', + 'orientation' => 'vertical', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + 0 => array( + 'type' => 'spacer', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + 'height' => '22px', + ), + ), + ), + 1 => array( + 'type' => 'divider', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + 'padding' => '20px', + 'borderStyle' => 'solid', + 'borderWidth' => '1px', + 'borderColor' => '#9e9e9e', + ), + ), + ), + 2 => array( + 'type' => 'text', + 'text' => '

Diam et vestibulum facilisis:

+ ', + ), + 3 => array( + 'type' => 'social', + 'iconSet' => 'grey', + 'icons' => array( + 0 => array( + 'type' => 'socialIcon', + 'iconType' => 'facebook', + 'link' => 'http://example.com', + 'image' => $this->social_icon_url . '/02-grey/Facebook.png', + 'height' => '32px', + 'width' => '32px', + 'text' => 'Facebook', + ), + 1 => array( + 'type' => 'socialIcon', + 'iconType' => 'twitter', + 'link' => 'http://example.com', + 'image' => $this->social_icon_url . '/02-grey/Twitter.png', + 'height' => '32px', + 'width' => '32px', + 'text' => 'Twitter', + ), + ), + ), + 4 => array( + 'type' => 'footer', + 'text' => '

Unsubscribe | Manage subscription

1 Store Street, Shopville, CA 1345

', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + 'text' => array( + 'fontColor' => '#343434', + 'fontFamily' => 'Verdana', + 'fontSize' => '12px', + 'textAlign' => 'center', + ), + 'link' => array( + 'fontColor' => '#488e88', + 'textDecoration' => 'none', + ), + ), + ), + ), + ), + ), + ), + ), + ), + 'globalStyles' => array( + 'text' => array( + 'fontColor' => '#343434', + 'fontFamily' => 'Verdana', + 'fontSize' => '14px', + ), + 'h1' => array( + 'fontColor' => '#488e88', + 'fontFamily' => 'Trebuchet MS', + 'fontSize' => '22px', + ), + 'h2' => array( + 'fontColor' => '#9a5fa1', + 'fontFamily' => 'Verdana', + 'fontSize' => '24px', + ), + 'h3' => array( + 'fontColor' => '#9a5fa1', + 'fontFamily' => 'Trebuchet MS', + 'fontSize' => '18px', + ), + 'link' => array( + 'fontColor' => '#488e88', + 'textDecoration' => 'underline', + ), + 'wrapper' => array( + 'backgroundColor' => '#afe3de', + ), + 'body' => array( + 'backgroundColor' => '#afe3de', + ), + ), + ); + } + + private function getThumbnail() { + } + +} \ No newline at end of file