-
-
Save OlegShchavelev/98839720397c4d679c295d72a44c4f9e to your computer and use it in GitHub Desktop.
minishop2 custom email
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{var $style = [ | |
'logo' => 'display:block;margin: auto;', | |
'a' => 'color:#348eda;', | |
'p' => 'font-family: Arial;color: #666666;font-size: 12px;', | |
'h' => 'font-family:Arial;color: #111111;font-weight: 200;line-height: 1.2em;margin: 40px 20px;text-align:center;', | |
'h1' => 'font-size: 36px;', | |
'h2' => 'font-size: 28px;', | |
'h3' => 'font-size: 22px;', | |
'th' => 'font-family: Arial;text-align: left;color: #111111;', | |
'td' => 'font-family: Arial;text-align: left;color: #111111;border: 1px solid #eee;padding: 10px;', | |
]} | |
{var $site_url = ('site_url' | option) | preg_replace : '#/$#' : ''} | |
{var $assets_url = 'assets_url' | option} | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<title>{'site_name' | option}</title> | |
</head> | |
<body style="margin:0;padding:0;background:#f6f6f6;"> | |
<div style="height:100%;padding-top:20px;background:#f6f6f6;"> | |
<!-- body --> | |
<table class="body-wrap" style="padding:0 20px 20px 20px;width: 100%;background:#f6f6f6;margin-top:10px;"> | |
<tr> | |
<td></td> | |
<td class="container" style="border:1px solid #f0f0f0;background:#ffffff;width:800px;margin:auto;"> | |
<div class="content"> | |
{block 'logo'} | |
<a href="{$site_url}"> | |
<img style="{$style.logo}" | |
src="{$site_url}{$assets_url}template/images/logo.jpg" | |
alt="{$site_url}" | |
width="254" height="79"/> | |
</a> | |
{/block} | |
<table style="width:100%;"> | |
<tr> | |
<td> | |
<h3 style="{$style.h}{$style.h3}"> | |
{block 'title'} | |
miniShop2 | |
{/block} | |
</h3> | |
{block 'products'} | |
<table style="width:90%;margin:auto;word-wrap:break-word;table-layout: fixed;"> | |
<thead> | |
<tr> | |
{*<th> </th>*} | |
<th style="{$style.th}">{'ms2_cart_title' | lexicon}</th> | |
<th style="{$style.th}">{'ms2_cart_count' | lexicon}</th> | |
<th style="{$style.th}">{'ms2_cart_cost' | lexicon}</th> | |
</tr> | |
</thead> | |
{foreach $products as $product} | |
<tr> | |
<td style="{$style.th}{$style.td}"> | |
{if $product.id?} | |
<a href="{$product.id | url : ['scheme' => 'full']}" | |
style="{$style.a}"> | |
{$product.name} | |
</a> | |
{else} | |
{$product.name} | |
{/if} | |
{if $product.options?} | |
<div class="small"> | |
{$product.options | join : '; '} | |
</div> | |
{/if} | |
</td> | |
<td style="{$style.th}{$style.td}">{$product.count} {'ms2_frontend_count_unit' | lexicon}</td> | |
<td style="{$style.th}{$style.td}">{$product.price} {'ms2_frontend_currency' | lexicon}</td> | |
</tr> | |
{/foreach} | |
<tfoot> | |
<tr> | |
<th {*colspan="1"*}>Всего</th> | |
<th style="{$style.th}"> | |
{$total.cart_count} {'ms2_frontend_count_unit' | lexicon} | |
</th> | |
<th style="{$style.th}"> | |
{$total.cart_cost} {'ms2_frontend_currency' | lexicon} | |
</th> | |
</tr> | |
</tfoot> | |
</table> | |
<h3 style="{$style.h}{$style.h3}">Данные вашего заказа:</h3> | |
<table style="width:90%;margin:auto;word-wrap:break-word;table-layout: fixed;"> | |
<tbody> | |
{set $exit = ['id', 'user_id','updatedon']} | |
{set $address['weight'] = $total.weight ~ 'кг'} | |
{set $address['delivery_cost'] = $total.delivery_cost ~ 'р'} | |
{set $address['cart_cost'] = $total.cart_cost ~ 'р'} | |
{foreach $address as $key => $item} | |
{if !($key in $exit)} | |
{if $item} | |
<tr> | |
{set $lxc = 'ms2_email_' ~ $key} | |
<td style="{$style.td}">{$lxc | lexicon}</td> | |
<td style="{$style.td}">{$item}</td> | |
</tr> | |
{/if} | |
{/if} | |
{/foreach} | |
</tbody> | |
<table> | |
{*$address | print*} | |
{*$total | print*} | |
{*$order | print*} | |
<h3 style="{$style.h}{$style.h3}"> | |
{'ms2_frontend_order_cost' | lexicon}: | |
{if $total.delivery_cost} | |
{$total.cart_cost} {'ms2_frontend_currency' | lexicon} + {$total.delivery_cost} | |
{'ms2_frontend_currency' | lexicon} = | |
{/if} | |
<strong>{$total.cost}</strong> {'ms2_frontend_currency' | lexicon} | |
</h3> | |
{/block} | |
</td> | |
</tr> | |
</table> | |
</div> | |
<!-- /content --> | |
</td> | |
<td></td> | |
</tr> | |
</table> | |
<!-- /body --> | |
<!-- footer --> | |
<table style="clear:both !important;width: 100%;"> | |
<tr> | |
<td></td> | |
<td class="container"> | |
<!-- content --> | |
<div class="content"> | |
<table style="width:100%;text-align: center;"> | |
<tr> | |
<td align="center"> | |
<p style="{$style.p}"> | |
{block 'footer'} | |
<a href="{$site_url}" style="color: #999999;"> | |
{'site_name' | option} | |
</a> | |
{/block} | |
</p> | |
</td> | |
</tr> | |
</table> | |
</div> | |
<!-- /content --> | |
</td> | |
<td></td> | |
</tr> | |
</table> | |
<!-- /footer --> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment