| 1 |
<?php |
| 2 |
/** |
| 3 |
* Template Name: Email body. |
| 4 |
* |
| 5 |
* Expected variables (passed from Cartflows_Admin_Report_Emails::get_email_content()): |
| 6 |
* - $preheader (string) Preheader text shown in inbox previews. |
| 7 |
* |
| 8 |
* @package CartFlows |
| 9 |
*/ |
| 10 |
|
| 11 |
if ( ! defined( 'ABSPATH' ) ) { |
| 12 |
exit; |
| 13 |
} |
| 14 |
|
| 15 |
// Defensive defaults so the template renders without notices if a variable is missing. |
| 16 |
$preheader = isset( $preheader ) ? $preheader : ''; |
| 17 |
|
| 18 |
ob_start(); |
| 19 |
?> |
| 20 |
<!doctype html> |
| 21 |
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"> |
| 22 |
<head> |
| 23 |
<meta charset="utf-8" /> |
| 24 |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
| 25 |
<meta name="viewport" content="width=device-width, initial-scale=1" /> |
| 26 |
<meta name="color-scheme" content="light" /> |
| 27 |
<meta name="supported-color-schemes" content="light" /> |
| 28 |
<title><?php echo esc_html__( 'CartFlows Weekly Report', 'cartflows' ); ?></title> |
| 29 |
<!--[if gte mso 15]> |
| 30 |
<xml> |
| 31 |
<o:OfficeDocumentSettings> |
| 32 |
<o:AllowPNG/> |
| 33 |
<o:PixelsPerInch>96</o:PixelsPerInch> |
| 34 |
</o:OfficeDocumentSettings> |
| 35 |
</xml> |
| 36 |
<![endif]--> |
| 37 |
<style> |
| 38 |
body, table, td, p, a, li, blockquote { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; } |
| 39 |
body { margin: 0; padding: 0; background: #f4f1ec; } |
| 40 |
table { border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; } |
| 41 |
img { border: 0; display: block; -ms-interpolation-mode: bicubic; } |
| 42 |
p { margin: 0; padding: 0; } |
| 43 |
a { color: #f06434; text-decoration: none; } |
| 44 |
a[x-apple-data-detectors] { color: inherit !important; text-decoration: none !important; } |
| 45 |
|
| 46 |
.modern-sans { |
| 47 |
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif; |
| 48 |
} |
| 49 |
|
| 50 |
@media only screen and (max-width: 640px) { |
| 51 |
.container { width: 100% !important; max-width: 100% !important; } |
| 52 |
.px-lg { padding-left: 24px !important; padding-right: 24px !important; } |
| 53 |
.stack { display: block !important; width: 100% !important; padding: 0 0 12px 0 !important; } |
| 54 |
.stack-last { padding-bottom: 0 !important; } |
| 55 |
.hero-num { font-size: 32px !important; } |
| 56 |
.kpi-num { font-size: 26px !important; } |
| 57 |
.chip-row { text-align: center !important; } |
| 58 |
} |
| 59 |
</style> |
| 60 |
</head> |
| 61 |
<body style="margin:0; padding:0; background-color:#f4f1ec;"> |
| 62 |
|
| 63 |
<div style="display:none; max-height:0; overflow:hidden; mso-hide:all; font-size:1px; line-height:1px; color:#f4f1ec;"> |
| 64 |
<?php echo esc_html( $preheader ); ?> |
| 65 |
</div> |
| 66 |
|
| 67 |
<center style="width:100%; background-color:#f4f1ec;"> |
| 68 |
<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color:#f4f1ec;"> |
| 69 |
<tr> |
| 70 |
<td align="center" valign="top" style="padding:36px 16px;"> |
| 71 |
|
| 72 |
<!--[if (gte mso 9)|(IE)]><table align="center" border="0" cellspacing="0" cellpadding="0" width="640"><tr><td><![endif]--> |
| 73 |
<table role="presentation" class="container" align="center" border="0" cellpadding="0" cellspacing="0" width="640" style="max-width:640px; background-color:#ffffff; border-radius:16px; overflow:hidden;"> |
| 74 |
<?php |
| 75 |
require CARTFLOWS_DIR . 'modules/email-report/templates/email-header.php'; |
| 76 |
require CARTFLOWS_DIR . 'modules/email-report/templates/email-content-section.php'; |
| 77 |
require CARTFLOWS_DIR . 'modules/email-report/templates/email-stat-content.php'; |
| 78 |
|
| 79 |
if ( ! _is_cartflows_pro() ) { |
| 80 |
include CARTFLOWS_DIR . 'modules/email-report/templates/email-cf-pro-block.php'; |
| 81 |
} else { |
| 82 |
include CARTFLOWS_DIR . 'modules/email-report/templates/email-other-product-block.php'; |
| 83 |
} |
| 84 |
?> |
| 85 |
</table> |
| 86 |
<!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]--> |
| 87 |
|
| 88 |
<?php require CARTFLOWS_DIR . 'modules/email-report/templates/email-footer.php'; ?> |
| 89 |
|
| 90 |
</td> |
| 91 |
</tr> |
| 92 |
</table> |
| 93 |
</center> |
| 94 |
|
| 95 |
</body> |
| 96 |
</html> |
| 97 |
<?php |
| 98 |
return ob_get_clean(); |
| 99 |
|