This template used to work in our old version of ablecommerce, we're updating to 7.0.6 - this is the error message I get when I tried to test the email:
Some error has occurred while parsing email contents using nVelocity. Please fix the email Store Name Confirmation - Order Number $order.OrderId' before trying to send email. Error details:
Encountered "=" at line 258, column 46. Was expecting one of: ... "-" ... "+" ... "*" ... "/" ... "%" ... "&&" ... "||" ... "<" ... "<=" ... ">" ... ">=" ... "==" ... "!=" ...
Thank you!
Code: Select all
<html>
<head>
<style type="text/css">
table.email {
width: 550px;
margin: 0;
padding: 5px;
border: 1px solid #5F54B9;
}
table.email td,
table.email th {
font: 12px arial, verdana, sans-serif;
text-decoration: none;
}
table.email td {
color: #000;
background-color: #FFF;
padding: 3px;
text-align: left;
}
table.email th {
color: #FFF;
background-color: #49176D;
font-weight: bold;
padding: 5px;
text-align: center;
}
</style>
</head>
<body>
<table class="email">
<tr>
<td colspan="2" class="email">
<p><strong>Thank you for your order $order.BillToFirstName $order.BillToLastName !</strong></p>
<p>If you would like to check the status of your order, manage addresses, update your email, or customize many other options, please visit your personal
<a href="${store.StoreUrl}Members/MyAccount.aspx">My Account</a> page.</p>
<p>Thank you for shopping with us.<br>
$store.Name</p>
</td>
</tr>
</table>
<table class="email">
<tr>
<th class="email">Order Summary</th>
</tr>
</table>
<table class="email">
<tr>
<td class="email"><div align="right"><strong>Email Address:</strong></div></td>
<td class="email">${order.BillToEmail}</td>
</tr>
<tr>
<td class="email" width="140"><div align="right"><strong>Order Number:</strong> </div></td>
<td class="email" width="500"><p><h2>$order.OrderId</h2></p></td>
</tr>
<tr>
<td class="email"><div align="right"><strong>Ordered on:</strong></div></td>
<td class="email">$order.OrderDate.ToString("G")</td>
</tr>
<tr>
<td class="email"><div align="right"><strong>Ordered by:</strong></div></td>
<td class="email">$order.BillToFirstName $order.BillToLastName</td>
</tr>
<tr>
<td><div align="right"><strong>Order Total:</strong></div></td>
<td>$order.Items.TotalPriceById().ToString("C")</td>
</tr>
</table>
<table class="email">
<tr valign="top">
<td class="email" width="50%"><strong>Billing Address:</strong>
<div style="padding-left:30px;">
$order.FormatAddress(true)
<br/>Phone: $order.BillToPhone
#if ($order.BillToCompany.Length > 0)
<br/>Company: $order.BillToCompany
#end
</div>
</td>
<td class="email" width="50%">
<strong>Payment Method:</strong>
<div style="padding-left:30px;">
#foreach($payment in $payments)
$payment.PaymentMethodName<br />
$payment.ReferenceNumber<br />
#end
</div>
</td>
</tr>
</table>
#set ($shipNo = 1)
#foreach($shipment in $order.Shipments)
#beforeall
<table class="email">
<tr>
<th class="email">Shipment Information</th>
</tr>
</table>
#each
<table class="email">
<tr>
<td colspan="4" class="email" style="text-align: center;">
<strong><u>Shipment $shipNo of $order.Shipments.Count</u></strong>
</td>
</tr>
<tr>
<td class="email" colspan="4" style="text-align: center;">
<table width="100%">
<tr>
<td class="email" valign="top">
<strong>Ship To:</strong>
<div style="padding-left:30px;">
$shipment.FormatToAddress(true)
<br/> Phone: $shipment.ShipToPhone
#if ($shipment.ShipToCompany.Length > 0)
<br/>Company: $shipment.ShipToCompany
#end
#if ($shipment.ShipMessage.Length > 0)
<br/><strong>Ship Message:</strong> $shipment.ShipMessage
#end
</div>
</td>
<td class="email" valign="top">
<strong>Shipment Method:</strong>
<div style="padding-left:30px;">
$shipment.ShipMethodName</div>
<div style="padding-left:30px;"></div>
</td>
</tr>
<tr>
<td colspan="3" valign="top">
<img src="${store.StoreUrl}/BarCode/${shipment.OrderId}-${shipNo}.bmp" alt="Bar Code" />
</td>
</tr>
</table>
</td>
</tr>
#set ($shipNo = $shipNo + 1)
#set ($giftDisplayed = 0)
#foreach($orderItem in $order.Items.FilterByShipmentAndSort($shipment.OrderShipmentId))
#beforeall
<tr>
<td style="background:#cccccc; color:#00000; text-align: center;"><strong>SKU</strong></td>
<td style="background:#cccccc; color:#00000; text-align: center;"><strong>Description</strong></td>
<td style="background:#cccccc; color:#00000; text-align: center;"><strong>Quantity</strong></td>
<td style="background:#cccccc; color:#00000; text-align: center;"><strong>Price</strong></td>
</tr>
#each
#if (($orderItem.OrderItemType == "Product") || ($orderItem.OrderItemType == "Discount") || ($orderItem.OrderItemType == "GiftWrap") || ($orderItem.OrderItemType == "Coupon"))
<tr class="email">
<td class="email" style="text-align: center;">
#if (($orderItem.OrderItemType == "Product"))
$orderItem.Sku
#elseif (($orderItem.OrderItemType == "Discount"))
DISCOUNT
#elseif (($orderItem.OrderItemType == "GiftWrap"))
GIFTWRAP
#end </td>
<td class="email">
$orderItem.Name
#if ($orderItem.LineMessage.Length > 0)
($orderItem.LineMessage)
#end
#if ($orderItem.VariantName.Length > 0)
($orderItem.VariantName)
#end
#foreach($orderItemInput in $orderItem.Inputs)
#if (!$orderItemInput.IsMerchantField)
<br /><b>$orderItemInput.Name:</b> $orderItemInput.InputValue
#end
#end
#if ($orderItem.WrapStyle)
<br>
Gift Wrap: $orderItem.WrapStyle.Name
#end
</td>
<td class="email" style="text-align: center;">$orderItem.Quantity</td>
<td class="email" style="text-align: right;">$orderItem.ExtendedPrice.ToString("C")</td>
</tr>#end #if ($orderItem.GiftMessage.Length > 0 && $giftDisplayed ==0)) <strong>Gift Message</strong>: $orderItem.GiftMessage #set ($giftDisplayed = 1) #end #end
<tr class="email"><td colspan="4"> #if ($orderItem.GiftMessage.Length > 0 && $giftDisplayed ==0)
<strong>Gift Message</strong>: $orderItem.GiftMessage
#set ($giftDisplayed = 1)
#end</td>
</tr>
</table>
#end
<!-- Output Non-Shipping Items -->
#foreach($orderItem in $order.Items.FilterByShipmentAndSort())
#beforeall
<table class="email">
<tr>
<th class="email">Non-Shipping Items</th>
</tr>
</table>
<table class="email">
<tr>
<td style="background:#cccccc; color:#00000; text-align: center;"><strong>SKU</strong></td>
<td style="background:#cccccc; color:#00000; text-align: center;"><strong>Name</strong></td>
<td style="background:#cccccc; color:#00000; text-align: center;"><strong>Price</strong></td>
<td style="background:#cccccc; color:#00000; text-align: center;"><strong>Quantity</strong></td>
<td style="background:#cccccc; color:#00000; text-align: center;"><strong>Total</strong></td>
</tr>
#each
#if (($orderItem.OrderItemType == "Product"))
<tr>
<td class="email" style="text-align: center;">$orderItem.Sku</td>
<td class="email">
$orderItem.Name
#if ($orderItem.VariantName.Length > 0)
($orderItem.VariantName)
#end
#foreach($orderItemInput in $orderItem.Inputs)
#if (!$orderItemInput.IsMerchantField)
<br /><b>$orderItemInput.Name:</b> $orderItemInput.InputValue
#end
#end
</td>
<td class="email" style="text-align: right;">$orderItem.Price.ToString("C")</td>
<td class="email" style="text-align: center;">$orderItem.Quantity</td>
<td class="email" style="text-align: right;">$orderItem.ExtendedPrice.ToString("C")</td>
</tr>
#end
#afterall
</table>
#end
<table class="email">
<tr>
<th class="email" colspan="3">Order Totals</th>
</tr>
<tr>
<td width="40%" style="background:#cccccc; color:#00000; text-align: right;">
<strong>Subtotal:</strong>
</td>
<td width="15%" class="email" style="text-align: right;">
$order.Items.TotalPriceById(0).ToString("C")
</td>
<td width="55%" rowspan="8"><p align="center"><strong>Thanks again for shopping with us!</strong></p>
<p align="center"><a href="${store.StoreUrl}"><strong>$store.Name</strong></a></p></td>
</tr>
<tr>
<td width="40%" style="background:#cccccc; color:#00000; text-align: right;">
<strong>Tax:</strong>
</td>
<td width="15%" class="email" style="text-align: right;">
$order.Items.TotalPriceById(3).ToString("C")
</td>
</tr>
#if($order.Items.TotalPriceById(1, 2, 6) = "0")
#else
<tr>
<td width="40%" style="background:#cccccc; color:#00000; text-align: right;">
<strong>Shipping and Handling:</strong>
</td>
<td width="15%" class="email" style="text-align: right;">
$order.Items.TotalPriceById(1, 2, 6).ToString("C")
</td>
</tr>
#end
#if($order.Items.TotalPriceById(5) = "0")
#else
<tr>
<td width="40%" style="background:#cccccc; color:#00000; text-align: right;">
<strong>Coupons:</strong>
</td>
<td width="15%" class="email" style="text-align: right;">
$order.Items.TotalPriceById(5).ToString("C")
</td>
<div style="display: none;">$order.Items.TotalPriceById(4, 5).ToString("C")</div>
</tr>
#end
#if($order.Items.TotalPriceById(4) = "0")
#else
<tr>
<td width="40%" style="background:#cccccc; color:#00000; text-align: right;">
<strong>Discounts:</strong>
</td>
<td width="15%" class="email" style="text-align: right;">
$order.Items.TotalPriceById(4).ToString("C")
</td>
<div style="display: none;">$order.Items.TotalPriceById(4, 5).ToString("C") </div>
</tr>
#end
<tr>
<td width="30%" style="background:#cccccc; color:#00000; text-align: right;">
<strong>Total:</strong>
</td>
<td width="15%" class="email" style="text-align: right;">
$order.Items.TotalPriceById().ToString("C")
</td>
</tr>
</table>
</body>
</html>[code]