{if $myarray.email_use_html}
{include "header.inc"}
  <p> <strong>{$lg.EMAIL_TEXT_HELLO}</strong>,<br/>
      {$lg.EMAIL_TEXT_INTRO}
      {$lg.EMAIL_TEXT_INTRO_2} <a href="{$HTTP_SERVER}{$DIR_WS_CATALOG}/login.php"> {$lg.EMAIL_TEXT_ACCOUNT}</a> <br />
      <a href="mailto:{$STORE_OWNER}" style="color:#1E7EC8;">{$STORE_OWNER}</a>
  </p>
  <h3 style="border-bottom:2px solid #eee; font-size:1.05em; padding-bottom:1px; ">{$lg.EMAIL_TEXT_ORDER_NUMBER} {$myarray._oID} </h3><small>  {$myarray.date_purchased}</small>

  <table cellspacing="0" cellpadding="0" border="0" width="100%">
    <thead>
      <tr>
	<th align="left" width="48.5%" bgcolor="#d9e5ee" style="padding:5px 9px 6px 9px; border:1px solid #bebcb7; border-bottom:none; line-height:1em;"> {$lg.EMAIL_TEXT_BILLING_ADDRESS}</th>
	<th width="3%"></th>
	<th align="left" width="48.5%" bgcolor="#d9e5ee" style="padding:5px 9px 6px 9px; border:1px solid #bebcb7; border-bottom:none; line-height:1em;">{$lg.EMAIL_TEXT_DELIVERY_ADDRESS}</th>
      </tr>
    </thead>
    <tbody>
      <tr>
	<td valign="top" style="padding:7px 9px 9px 9px; border:1px solid #bebcb7; border-top:0; background:#f8f7f5;"> {$myarray.billToFormatted} </td>
	<td>&nbsp;</td>
	<td valign="top" style="padding:7px 9px 9px 9px; border:1px solid #bebcb7; border-top:0; background:#f8f7f5;">{$myarray.sendToFormatted}</td>
      </tr>
    </tbody>
  </table>
  <br/>
  <table cellspacing="0" cellpadding="0" border="0" width="100%">
    <thead>
      <tr>
	<th align="left" width="48.5%" bgcolor="#d9e5ee" style="padding:5px 9px 6px 9px; border:1px solid #bebcb7; border-bottom:none; line-height:1em;"> {$lg.EMAIL_TEXT_PAYMENT_METHOD}</th>
	<th width="3%"></th>
	<th align="left" width="48.5%" bgcolor="#d9e5ee" style="padding:5px 9px 6px 9px; border:1px solid #bebcb7; border-bottom:none; line-height:1em;">{$lg.EMAIL_TEXT_SHIPPING_METHOD}</th>
      </tr>
    </thead>
    <tbody>
      <tr>
	<td valign="top" style="padding:7px 9px 9px 9px; border:1px solid #bebcb7; border-top:0; background:#f8f7f5;"> {$myarray.payment_} </td>
	<td>&nbsp;</td>
	<td valign="top" style="padding:7px 9px 9px 9px; border:1px solid #bebcb7; border-top:0; background:#f8f7f5;">{$myarray.shipping_}</td>
      </tr>
    </tbody>
  </table>
  <br/>
  <table cellspacing="0" cellpadding="0" border="0" width="100%" style="border:1px solid #bebcb7; background:#f8f7f5;">
    <thead>
      <tr>
	<th align="left" bgcolor="#d9e5ee" style="padding:3px 9px">{$lg.EMAIL_TEXT_PRODUCTS}</th>
	<th align="left" bgcolor="#d9e5ee" style="padding:3px 9px">{$lg.EMAIL_TEXT_MODEL}</th>
	<th align="center" bgcolor="#d9e5ee" style="padding:3px 9px">{$lg.EMAIL_TEXT_QTY}</th>
	<th align="right" bgcolor="#d9e5ee" style="padding:3px 9px">{$lg.EMAIL_TEXT_PRICE}</th>
	<th align="right" bgcolor="#d9e5ee" style="padding:3px 9px">{$lg.EMAIL_TEXT_SUBTOTAL}</th>
      </tr>
    </thead>
    <tbody bgcolor="#eeeded">
      {loop $iterator=$myarray.order_products}
	<tr>
	  <td align="left" valign="top" style="padding:3px 9px"> <strong>{$iterator.name}</strong> </td>
	  <td align="left" valign="top" style="padding:3px 9px">{$iterator.model}</td>
	  <td align="center" valign="top" style="padding:3px 9px">{$iterator.qty}</td>
	  <td align="right" valign="top" style="padding:3px 9px"><span class="price">{$iterator.final_price_ttc}</span></td>
	  <td align="right" valign="top" style="padding:3px 9px"><span class="price">{$iterator.total_line_ttc}</span></td>
	</tr>
      {/loop}
    </tbody>
    <tfoot>
      {loop $iterator=$myarray.order_totals}
	<tr>
	  <td colspan="4" align="right" style="padding:3px 9px">{$iterator.title}</td>
	  <td align="right" style="padding:3px 9px"><span class="price">{$iterator.text}</span></td>
	</tr>
      {/loop}
    </tfoot>
  </table>
 {include "footer.inc"}
{else}

 {$lg.STORE_NAME}
 {$lg.EMAIL_SEPARATOR}{$myarray.br}{$myarray.br}

 {$lg.EMAIL_TEXT_ORDER_NUMBER} : {$myarray._oID} {$myarray.br}
 {$lg.EMAIL_TEXT_INVOICE_URL} {$myarray._oLinks} {$myarray.br}
 {$lg.EMAIL_TEXT_DATE_ORDERED} {$myarray.date_purchased} {$myarray.br}


 {$lg.EMAIL_SEPARATOR}{$myarray.br}{$myarray.br}

  {$lg.EMAIL_TEXT_DELIVERY_ADDRESS} {$myarray.billToFormatted} {$myarray.br}
  {$lg.EMAIL_TEXT_PAYMENT_METHOD} {$myarray.payment_} {$myarray.br}

 {$lg.EMAIL_SEPARATOR}  {$myarray.br}{$myarray.br}

  {loop $iterator=$myarray.order_products}
    {$lg.EMAIL_TEXT_PRODUCTS} : {$iterator.name} {$myarray.br}
    {$lg.EMAIL_TEXT_MODEL} : {$iterator.model}{$myarray.br}
    {$lg.EMAIL_TEXT_QTY} : {$iterator.qty}{$myarray.br}
    {$lg.EMAIL_TEXT_SUBTOTAL} : {$iterator.final_price}{$myarray.br}
  {/loop}

{$myarray.br}
 {$lg.EMAIL_SEPARATOR}{$myarray.br}{$myarray.br}

  {loop $iterator=$myarray.order_totals}
      {$iterator.title}  {$iterator.text} {$myarray.br}
    </tr>
  {/loop}

 {$lg.EMAIL_SEPARATOR}{$myarray.br}

 {$myarray._comments} {$myarray.br}
 {$lg.EMAIL_SEPARATOR}
 {$lg.EMAIL_TEXT_INVOICE_FOOTER_LG1}
{/if}




