Sample Invoice

Top  Previous  Next

The following invoice is generated in the 3P BackOffice from <subshop>\Templates\Order Invoice EN.htm using fields from the database. This invoice is attached only to emails that are sent from the 3P BackOffice. The 3P OpenCart store has it's own invoices, which can be changed by editing the file admin/view/template/sale/order_invoice.tpl. Details on this in the templates topic.

clip0026

The template code:

The template can be changed, but you should always include fields like {order_id}, {order_status_name}, {subtotal}, {tax}, {shipping_rate}, {total} and {message_body}. You should also put all style attributes inline, and refer only to local images in the same folder.

lightbulb_onIn the above example, the Flat Shipping Fee is not included in the VAT calculation (no Tax Class assigned in Administration > Extensions > Shipping), so you could move it below the VAT line. Click here and scroll to Order Totals for more information.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<title>{store_name} - Order {order_id}</title>

</head>

<body style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #000000;">

<div style="width: 680px;">

  <a href="{store_url}" title="{store_name}"><img src="3p_150.png" alt="logo" style="margin-bottom: 20px; border: none;" /></a>

  <p></p>

  <p style="margin-top: 0px; margin-bottom: 20px;">Thank you for your interest in {store_name} products. Your order has been received and will be processed once payment has been confirmed.</p>

    <table style="border-collapse: collapse; width: 100%; border-top: 1px solid #DDDDDD; border-left: 1px solid #DDDDDD; margin-bottom: 20px;">

    <thead>

      <tr>

        <td style="font-size: 12px; border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; background-color: #EFEFEF; font-weight: bold; text-align: left; padding: 7px; color: #222222;" colspan="2">Order Details</td>

      </tr>

    </thead>

    <tbody>

      <tr>

        <td style="font-size: 12px;        border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; text-align: left; padding: 7px;">

           <b>Order ID:</b> {order_id}<br />

          <b>Date Added:</b> {date_added}<br />

          <b>Payment Method:</b> {payment_method}<br />

          <b>Shipping Method:</b> {shipping_method}</td>

        <td style="font-size: 12px;        border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; text-align: left; padding: 7px;">

          <b>Email:</b> {email}<br />

          <b>Telephone:</b> {telephone}<br />

          <b>IP Address:</b> {ip}<br />

          <b>Status:</b> {order_status_name}<br /></td>

      </tr>

    </tbody>

  </table>

    <table style="border-collapse: collapse; width: 100%; border-top: 1px solid #DDDDDD; border-left: 1px solid #DDDDDD; margin-bottom: 20px;">

    <thead>

      <tr>

        <td style="font-size: 12px; border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; background-color: #EFEFEF; font-weight: bold; text-align: left; padding: 7px; color: #222222;">Payment Address</td>

        <td style="font-size: 12px; border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; background-color: #EFEFEF; font-weight: bold; text-align: left; padding: 7px; color: #222222;">Shipping Address</td>

      </tr>

    </thead>

    <tbody>

      <tr>

        <td style="font-size: 12px;        border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; text-align: left; padding: 7px;">{payment_address_format}</td>

        <td style="font-size: 12px;        border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; text-align: left; padding: 7px;">{shipping_address_format}</td>

      </tr>

    </tbody>

  </table>

  <table style="border-collapse: collapse; width: 100%; border-top: 1px solid #DDDDDD; border-left: 1px solid #DDDDDD; margin-bottom: 20px;">

    <thead>

      <tr>

        <td style="font-size: 12px; border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; background-color: #EFEFEF; font-weight: bold; text-align: left; padding: 7px; color: #222222;">Product</td>

        <td style="font-size: 12px; border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; background-color: #EFEFEF; font-weight: bold; text-align: left; padding: 7px; color: #222222;">Model</td>

        <td style="font-size: 12px; border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; background-color: #EFEFEF; font-weight: bold; text-align: right; padding: 7px; color: #222222;">Quantity</td>

        <td style="font-size: 12px; border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; background-color: #EFEFEF; font-weight: bold; text-align: right; padding: 7px; color: #222222;">Price</td>

        <td style="font-size: 12px; border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; background-color: #EFEFEF; font-weight: bold; text-align: right; padding: 7px; color: #222222;">Total</td>

      </tr>

    </thead>

    <tbody>

      <tr>{order_items}</tr>

    </tbody>

    <tfoot>

      <tr>

        <td style="font-size: 12px;        border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; text-align: right; padding: 7px;" colspan="4"><b>Sub-Total:</b></td>

        <td style="font-size: 12px;        border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; text-align: right; padding: 7px;">{sub_total}</td>

      </tr>

      <tr>

        <td style="font-size: 12px;        border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; text-align: right; padding: 7px;" colspan="4"><b>Tax:</b></td>

        <td style="font-size: 12px;        border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; text-align: right; padding: 7px;">{tax}</td>

      </tr>

      <tr>

        <td style="font-size: 12px;        border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; text-align: right; padding: 7px;" colspan="4"><b>Shipping Rate:</b></td>

        <td style="font-size: 12px;        border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; text-align: right; padding: 7px;">{shipping_rate}</td>

      </tr>

      <tr>

        <td style="font-size: 12px;        border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; text-align: right; padding: 7px;" colspan="4"><b>Total {currency_code}:</b></td>

        <td style="font-size: 12px;        border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; text-align: right; padding: 7px;">{total}</td>

      </tr>

    </tfoot>

  </table><br>

  

  <p style="margin-top: 0px; margin-bottom: 20px;">{message_body}</p>

  <p style="margin-top: 0px; margin-bottom: 20px;">Please reply to this email if you have any questions.</p>

  

  Thank you,<br><br>

  {store_name}<br>

  {store_owner}<br>

  {store_url}<br>

  {store_email}</span></font><br>

  <br>

  

</div>

</body></html>

2015 © 3P Photobook Publisher