email-template-woo.php
2 years ago
email-template.php
2 years ago
pisol-eqw-body.php
2 years ago
pisol-eqw-email-body.php
2 years ago
pisol-eqw-email.php
2 years ago
pisol-eqw-shortcode.php
2 years ago
email-template-woo.php
360 lines
| 1 | <?php |
| 2 | if ( ! defined( 'ABSPATH' ) ) { |
| 3 | exit; |
| 4 | } |
| 5 | |
| 6 | $bg = get_option( 'woocommerce_email_background_color' ); |
| 7 | $body = get_option( 'woocommerce_email_body_background_color' ); |
| 8 | $base = get_option( 'woocommerce_email_base_color' ); |
| 9 | $base_text = wc_light_or_dark( $base, '#202020', '#ffffff' ); |
| 10 | $text = get_option( 'woocommerce_email_text_color' ); |
| 11 | |
| 12 | // Pick a contrasting color for links. |
| 13 | $link_color = wc_hex_is_light( $base ) ? $base : $base_text; |
| 14 | |
| 15 | if ( wc_hex_is_light( $body ) ) { |
| 16 | $link_color = wc_hex_is_light( $base ) ? $base_text : $base; |
| 17 | } |
| 18 | |
| 19 | $bg_darker_10 = wc_hex_darker( $bg, 10 ); |
| 20 | $body_darker_10 = wc_hex_darker( $body, 10 ); |
| 21 | $base_lighter_20 = wc_hex_lighter( $base, 20 ); |
| 22 | $base_lighter_40 = wc_hex_lighter( $base, 40 ); |
| 23 | $text_lighter_20 = wc_hex_lighter( $text, 20 ); |
| 24 | $text_lighter_40 = wc_hex_lighter( $text, 40 ); |
| 25 | |
| 26 | // !important; is a gmail hack to prevent styles being stripped if it doesn't like something. |
| 27 | // body{padding: 0;} ensures proper scale/positioning of the email in the iOS native email app. |
| 28 | ?> |
| 29 | <!DOCTYPE html> |
| 30 | <html <?php language_attributes(); ?>> |
| 31 | <head> |
| 32 | <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo( 'charset' ); ?>" /> |
| 33 | <meta content="width=device-width, initial-scale=1.0" name="viewport"> |
| 34 | <title><?php echo get_bloginfo( 'name', 'display' ); ?></title> |
| 35 | <style> |
| 36 | body { |
| 37 | background-color: <?php echo esc_attr( $bg ); ?>; |
| 38 | padding: 0; |
| 39 | text-align: center; |
| 40 | } |
| 41 | |
| 42 | #outer_wrapper { |
| 43 | background-color: <?php echo esc_attr( $bg ); ?>; |
| 44 | } |
| 45 | |
| 46 | #wrapper { |
| 47 | margin: 0 auto; |
| 48 | padding: 70px 0; |
| 49 | -webkit-text-size-adjust: none !important; |
| 50 | width: 100%; |
| 51 | max-width: 600px; |
| 52 | } |
| 53 | |
| 54 | #template_container { |
| 55 | box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1) !important; |
| 56 | background-color: <?php echo esc_attr( $body ); ?>; |
| 57 | border: 1px solid <?php echo esc_attr( $bg_darker_10 ); ?>; |
| 58 | border-radius: 3px !important; |
| 59 | } |
| 60 | |
| 61 | #template_header { |
| 62 | background-color: <?php echo esc_attr( $base ); ?>; |
| 63 | border-radius: 3px 3px 0 0 !important; |
| 64 | color: <?php echo esc_attr( $base_text ); ?>; |
| 65 | border-bottom: 0; |
| 66 | font-weight: bold; |
| 67 | line-height: 100%; |
| 68 | vertical-align: middle; |
| 69 | font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; |
| 70 | } |
| 71 | |
| 72 | #template_header h1, |
| 73 | #template_header h1 a { |
| 74 | color: <?php echo esc_attr( $base_text ); ?>; |
| 75 | background-color: inherit; |
| 76 | } |
| 77 | |
| 78 | #template_header_image img { |
| 79 | margin-left: 0; |
| 80 | margin-right: 0; |
| 81 | } |
| 82 | |
| 83 | #template_footer td { |
| 84 | padding: 0; |
| 85 | border-radius: 6px; |
| 86 | } |
| 87 | |
| 88 | #template_footer #credit { |
| 89 | border: 0; |
| 90 | color: <?php echo esc_attr( $text_lighter_40 ); ?>; |
| 91 | font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; |
| 92 | font-size: 12px; |
| 93 | line-height: 150%; |
| 94 | text-align: center; |
| 95 | padding: 24px 0; |
| 96 | } |
| 97 | |
| 98 | #template_footer #credit p { |
| 99 | margin: 0 0 16px; |
| 100 | } |
| 101 | |
| 102 | #body_content { |
| 103 | background-color: <?php echo esc_attr( $body ); ?>; |
| 104 | } |
| 105 | |
| 106 | #body_content table td { |
| 107 | padding: 48px 48px 32px; |
| 108 | } |
| 109 | |
| 110 | #body_content table td td { |
| 111 | padding: 12px; |
| 112 | } |
| 113 | |
| 114 | #body_content table td th { |
| 115 | padding: 12px; |
| 116 | } |
| 117 | |
| 118 | #body_content td ul.wc-item-meta { |
| 119 | font-size: small; |
| 120 | margin: 1em 0 0; |
| 121 | padding: 0; |
| 122 | list-style: none; |
| 123 | } |
| 124 | |
| 125 | #body_content td ul.wc-item-meta li { |
| 126 | margin: 0.5em 0 0; |
| 127 | padding: 0; |
| 128 | } |
| 129 | |
| 130 | #body_content td ul.wc-item-meta li p { |
| 131 | margin: 0; |
| 132 | } |
| 133 | |
| 134 | #body_content p { |
| 135 | margin: 0 0 16px; |
| 136 | } |
| 137 | |
| 138 | #body_content_inner { |
| 139 | color: <?php echo esc_attr( $text_lighter_20 ); ?>; |
| 140 | font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; |
| 141 | font-size: 14px; |
| 142 | line-height: 150%; |
| 143 | text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>; |
| 144 | } |
| 145 | |
| 146 | .td { |
| 147 | color: <?php echo esc_attr( $text_lighter_20 ); ?>; |
| 148 | border: 1px solid <?php echo esc_attr( $body_darker_10 ); ?>; |
| 149 | vertical-align: middle; |
| 150 | } |
| 151 | |
| 152 | .address { |
| 153 | padding: 12px; |
| 154 | color: <?php echo esc_attr( $text_lighter_20 ); ?>; |
| 155 | border: 1px solid <?php echo esc_attr( $body_darker_10 ); ?>; |
| 156 | } |
| 157 | |
| 158 | .text { |
| 159 | color: <?php echo esc_attr( $text ); ?>; |
| 160 | font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; |
| 161 | } |
| 162 | |
| 163 | .link { |
| 164 | color: <?php echo esc_attr( $link_color ); ?>; |
| 165 | } |
| 166 | |
| 167 | #header_wrapper { |
| 168 | padding: 36px 48px; |
| 169 | display: block; |
| 170 | } |
| 171 | |
| 172 | h1 { |
| 173 | color: <?php echo esc_attr( $base ); ?>; |
| 174 | font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; |
| 175 | font-size: 30px; |
| 176 | font-weight: 300; |
| 177 | line-height: 150%; |
| 178 | margin: 0; |
| 179 | text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>; |
| 180 | text-shadow: 0 1px 0 <?php echo esc_attr( $base_lighter_20 ); ?>; |
| 181 | } |
| 182 | |
| 183 | h2 { |
| 184 | color: <?php echo esc_attr( $base ); ?>; |
| 185 | display: block; |
| 186 | font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; |
| 187 | font-size: 18px; |
| 188 | font-weight: bold; |
| 189 | line-height: 130%; |
| 190 | margin: 0 0 18px; |
| 191 | text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>; |
| 192 | } |
| 193 | |
| 194 | h3 { |
| 195 | color: <?php echo esc_attr( $base ); ?>; |
| 196 | display: block; |
| 197 | font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; |
| 198 | font-size: 16px; |
| 199 | font-weight: bold; |
| 200 | line-height: 130%; |
| 201 | margin: 16px 0 8px; |
| 202 | text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>; |
| 203 | } |
| 204 | |
| 205 | a { |
| 206 | color: <?php echo esc_attr( $link_color ); ?>; |
| 207 | font-weight: normal; |
| 208 | text-decoration: underline; |
| 209 | } |
| 210 | |
| 211 | img { |
| 212 | border: none; |
| 213 | display: inline-block; |
| 214 | font-size: 14px; |
| 215 | font-weight: bold; |
| 216 | height: auto; |
| 217 | outline: none; |
| 218 | text-decoration: none; |
| 219 | text-transform: capitalize; |
| 220 | vertical-align: middle; |
| 221 | margin-<?php echo is_rtl() ? 'left' : 'right'; ?>: 10px; |
| 222 | max-width: 100%; |
| 223 | } |
| 224 | |
| 225 | .shop_table, .pi-customer-detail{ |
| 226 | color: #636363; |
| 227 | border: 1px solid #e5e5e5; |
| 228 | vertical-align: middle; |
| 229 | width: 100%; |
| 230 | font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; |
| 231 | } |
| 232 | |
| 233 | .shop_table th, .pi-customer-detail th{ |
| 234 | color: #636363; |
| 235 | border: 1px solid #e5e5e5; |
| 236 | vertical-align: middle; |
| 237 | padding: 12px; |
| 238 | text-align: left; |
| 239 | } |
| 240 | |
| 241 | .shop_table td, .pi-customer-detail td{ |
| 242 | color: #636363; |
| 243 | border: 1px solid #e5e5e5; |
| 244 | padding: 12px; |
| 245 | text-align: left; |
| 246 | vertical-align: middle; |
| 247 | font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; |
| 248 | word-wrap: break-word; |
| 249 | } |
| 250 | |
| 251 | .pisol-form-detail-container{ |
| 252 | margin-top:20px; |
| 253 | } |
| 254 | |
| 255 | .pisol-form-detail-container > tbody > tr > td{ |
| 256 | padding:0px !important; |
| 257 | } |
| 258 | |
| 259 | /** |
| 260 | * Media queries are not supported by all email clients, however they do work on modern mobile |
| 261 | * Gmail clients and can help us achieve better consistency there. |
| 262 | */ |
| 263 | @media screen and (max-width: 600px) { |
| 264 | #header_wrapper { |
| 265 | padding: 27px 36px !important; |
| 266 | font-size: 24px; |
| 267 | } |
| 268 | |
| 269 | #body_content table > tbody > tr > td { |
| 270 | padding: 10px !important; |
| 271 | } |
| 272 | |
| 273 | #body_content_inner { |
| 274 | font-size: 10px !important; |
| 275 | } |
| 276 | } |
| 277 | |
| 278 | <?php do_action('pisol_eqw_additional_email_css', 'both'); ?> |
| 279 | </style> |
| 280 | </head> |
| 281 | <body <?php echo is_rtl() ? 'rightmargin' : 'leftmargin'; ?>="0" marginwidth="0" topmargin="0" marginheight="0" offset="0"> |
| 282 | <table width="100%" id="outer_wrapper"> |
| 283 | <tr> |
| 284 | <td><!-- Deliberately empty to support consistent sizing and layout across multiple email clients. --></td> |
| 285 | <td width="600"> |
| 286 | <div id="wrapper" dir="<?php echo is_rtl() ? 'rtl' : 'ltr'; ?>"> |
| 287 | <table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%"> |
| 288 | <tr> |
| 289 | <td align="center" valign="top"> |
| 290 | <div id="template_header_image" style="margin-bottom:20px;"> |
| 291 | |
| 292 | </div> |
| 293 | <table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_container"> |
| 294 | <tr> |
| 295 | <td align="center" valign="top"> |
| 296 | <!-- Header --> |
| 297 | <table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_header"> |
| 298 | <tr> |
| 299 | <td id="header_wrapper"> |
| 300 | <h1><?php echo __('Enquiry no.', 'pisol-enquiry-quotation-woocommerce'); ?> #{enquiry_no}</h1> |
| 301 | </td> |
| 302 | </tr> |
| 303 | </table> |
| 304 | <!-- End Header --> |
| 305 | </td> |
| 306 | </tr> |
| 307 | <tr> |
| 308 | <td align="center" valign="top"> |
| 309 | <!-- Body --> |
| 310 | <table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_body"> |
| 311 | <tr> |
| 312 | <td valign="top" id="body_content"> |
| 313 | <!-- Content --> |
| 314 | <table border="0" cellpadding="20" cellspacing="0" width="100%"> |
| 315 | <tr> |
| 316 | <td valign="top"> |
| 317 | <div id="body_content_inner"> |
| 318 | {content} |
| 319 | </div> |
| 320 | </td> |
| 321 | </tr> |
| 322 | </table> |
| 323 | <!-- End Content --> |
| 324 | </td> |
| 325 | </tr> |
| 326 | </table> |
| 327 | <!-- End Body --> |
| 328 | </td> |
| 329 | </tr> |
| 330 | </table> |
| 331 | </td> |
| 332 | </tr> |
| 333 | <tr> |
| 334 | <td align="center" valign="top"> |
| 335 | <!-- Footer --> |
| 336 | <table border="0" cellpadding="10" cellspacing="0" width="100%" id="template_footer"> |
| 337 | <tr> |
| 338 | <td valign="top"> |
| 339 | <table border="0" cellpadding="10" cellspacing="0" width="100%"> |
| 340 | <tr> |
| 341 | <td colspan="2" valign="middle" id="credit"> |
| 342 | |
| 343 | </td> |
| 344 | </tr> |
| 345 | </table> |
| 346 | </td> |
| 347 | </tr> |
| 348 | </table> |
| 349 | <!-- End Footer --> |
| 350 | </td> |
| 351 | </tr> |
| 352 | </table> |
| 353 | </div> |
| 354 | </td> |
| 355 | <td><!-- Deliberately empty to support consistent sizing and layout across multiple email clients. --></td> |
| 356 | </tr> |
| 357 | </table> |
| 358 | </body> |
| 359 | </html> |
| 360 |