uc-order-invoice.html.twig in Ubercart 8.4
{#
* This file is the default customer invoice template for Ubercart.
*
* Available variables:
* - products: An array of product objects in the order, with the following
* members:
* - title: The product title.
* - model: The product SKU.
* - qty: The quantity ordered.
* - total_price: The formatted total price for the quantity ordered.
* - individual_price: If quantity is more than 1, the formatted product
* price of a single item.
* - details: Any extra details about the product, such as attributes.
* - line_items: An array of line item arrays attached to the order, each with
* the following keys:
* - type: The type of line item (subtotal, shipping, etc.).
* - title: The line item display title.
* - formatted_amount: The formatted amount of the line item.
* - shippable: TRUE if the order is shippable.
*
* Tokens: All site, store and order tokens are also available as
* variables, such as site_logo, store_name and order_first_name.
*
* Display options:
* - op: 'view', 'print', 'checkout-mail' or 'admin-mail', depending on
* which variant of the invoice is being rendered.
* - business_header: TRUE if the invoice header should be displayed.
* - shipping_method: TRUE if shipping information should be displayed.
* - help_text: TRUE if the store help message should be displayed.
* - email_text: TRUE if the "do not reply to this email" message should
* be displayed.
* - store_footer: TRUE if the store URL should be displayed.
* - thank_you_message: TRUE if the 'thank you for your order' message
* should be displayed.
*
* @see template_preprocess_uc_order()
*/
#}
<table width="95%" border="0" cellspacing="0" cellpadding="1" align="center" bgcolor="#006699" style="font-family: verdana, arial, helvetica; font-size: small;">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="5" align="center" bgcolor="#FFFFFF" style="font-family: verdana, arial, helvetica; font-size: small;">
{% if business_header %}
<tr valign="top">
<td>
<table width="100%" style="font-family: verdana, arial, helvetica; font-size: small;">
<tr>
<td>{{ site_logo }}</td>
<td width="98%">
<div style="padding-left: 1em;">
<span style="font-size: large;">{{ store_name }}</span><br />
{{ site_slogan }}
</div>
</td>
<td nowrap="nowrap">{{ store_address }}<br />{{ store_phone }}</td>
</tr>
</table>
</td>
</tr>
{% endif %}
<tr valign="top">
<td>
{% if thank_you_message %}
<p><b>{{ 'Thanks for your order, @order_first_name!'|t({'@order_first_name': order_first_name}) }}</b></p>
{% if order.data.new_user_name %}
<p><b>{{ 'An account has been created for you with the following details:'|t }}</b></p>
<p><b>{{ 'Username:'|t }}</b> {{ order_new_username }}<br />
<b>{{ 'Password:'|t }}</b> {{ order_new_password }}</p>
{% endif %}
<p><b>{{ 'Want to manage your order online?'|t }}</b><br />
{{ 'If you need to check the status of your order, please visit our home page at @store_link and click on "My account" in the menu or login with the following link:'|t({'@store_link': store_link}) }}
<br /><br />{{ site_login_link }}</p>
{% endif %}
<table cellpadding="4" cellspacing="0" border="0" width="100%" style="font-family: verdana, arial, helvetica; font-size: small;">
<tr>
<td colspan="2" bgcolor="#006699" style="color: white;">
<b>{{ 'Purchasing Information:'|t }}</b>
</td>
</tr>
<tr>
<td nowrap="nowrap"><b>{{ 'E-mail Address:'|t }}</b></td>
<td width="98%">{{ order_email }}</td>
</tr>
<tr>
<td colspan="2">
<table width="100%" cellspacing="0" cellpadding="0" style="font-family: verdana, arial, helvetica; font-size: small;">
<tr>
<td valign="top" width="50%">
<b>{{ 'Billing Address:'|t }}</b><br />
{{ order_billing_address }}<br />
<br />
<b>{{ 'Billing Phone:'|t }}</b><br />
{{ order_billing_phone }}<br />
</td>
{% if shippable %}
<td valign="top" width="50%">
<b>{{ 'Shipping Address:'|t }}</b><br />
{{ order_shipping_address }}<br />
<br />
<b>{{ 'Shipping Phone:'|t }}</b><br />
{{ order_shipping_phone }}<br />
</td>
{% endif %}
</tr>
</table>
</td>
</tr>
<tr>
<td nowrap="nowrap">
<b>{{ 'Order Grand Total:'|t }}</b>
</td>
<td width="98%">
<b>{{ order_total }}</b>
</td>
</tr>
{% if order_payment_method %}
<tr>
<td nowrap="nowrap"><b>{{ 'Payment Method:'|t }}</b></td>
<td width="98%">{{ order_payment_method }}</td>
</tr>
{% endif %}
<tr>
<td colspan="2" bgcolor="#006699" style="color: white;">
<b>{{ 'Order Summary:'|t }}</b>
</td>
</tr>
{% if shippable %}
<tr>
<td colspan="2" bgcolor="#EEEEEE">
<font color="#CC6600"><b>{{ 'Shipping Details:'|t }}</b></font>
</td>
</tr>
{% endif %}
<tr>
<td colspan="2">
<table border="0" cellpadding="1" cellspacing="0" width="100%" style="font-family: verdana, arial, helvetica; font-size: small;">
<tr>
<td nowrap="nowrap"><b>{{ 'Order #:'|t }}</b></td>
<td width="98%">{{ order_link }}</td>
</tr>
<tr>
<td nowrap="nowrap"><b>{{ 'Order Date: '|t }}</b></td>
<td width="98%">{{ order_created }}</td>
</tr>
{% if shipping_method and shippable %}
<tr>
<td nowrap="nowrap"><b>{{ 'Shipping Method:'|t }}</b></td>
<td width="98%">{{ order_shipping_method }}</td>
</tr>
{% endif %}
<tr>
<td nowrap="nowrap">{{ 'Products Subtotal:'|t }} </td>
<td width="98%">{{ order_subtotal }}</td>
</tr>
{% for item in line_items if item.type != 'subtotal' and item.type != 'total' %}
<tr>
<td nowrap="nowrap">{{ item.title }}:</td>
<td>{{ item.formatted_amount }}</td>
</tr>
{% endfor %}
<tr>
<td> </td>
<td>------</td>
</tr>
<tr>
<td nowrap="nowrap"><b>{{ 'Total for this Order:'|t }} </b></td>
<td><b>{{ order_total }}</b></td>
</tr>
<tr>
<td colspan="2">
<br /><br /><b>{{ 'Products on order:'|t }} </b>
<table width="100%" style="font-family: verdana, arial, helvetica; font-size: small;">
{% for product in products %}
<tr>
<td valign="top" nowrap="nowrap"><b>{{ product.qty }} x </b></td>
<td width="98%">
<b>{{ product.title }} - {{ product.total_price }}</b>
{{ product.individual_price }}<br />
{{ 'SKU'|t }}: {{ product.model }}<br />
{{ product.details }}
</td>
</tr>
{% endfor %}
</table>
</td>
</tr>
</table>
</td>
</tr>
{% if help_text or email_text or store_footer %}
<tr>
<td colspan="2">
<hr noshade="noshade" size="1" /><br />
{% if help_text %}
<p><b>{{ 'Where can I get help with reviewing my order?'|t }}</b><br />
{{ 'To learn more about managing your orders on @store_link, please visit our <a href="@store_help_url">help page</a>.'|t({'@store_link': store_link, '@store_help_url': store_help_url}) }}
<br /></p>
{% endif %}
{% if email_text %}
<p>{{ 'Please note: This e-mail message is an automated notification. Please do not reply to this message.'|t }}</p>
<p>{{ 'Thanks again for shopping with us.'|t }}</p>
{% endif %}
{% if store_footer %}
<p><b>{{ store_link }}</b><br /><b>{{ site_slogan }}</b></p>
{% endif %}
</td>
</tr>
{% endif %}
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
File
uc_order/templates/uc-order-invoice.html.twig
View source
- {#
- * This file is the default customer invoice template for Ubercart.
- *
- * Available variables:
- * - products: An array of product objects in the order, with the following
- * members:
- * - title: The product title.
- * - model: The product SKU.
- * - qty: The quantity ordered.
- * - total_price: The formatted total price for the quantity ordered.
- * - individual_price: If quantity is more than 1, the formatted product
- * price of a single item.
- * - details: Any extra details about the product, such as attributes.
- * - line_items: An array of line item arrays attached to the order, each with
- * the following keys:
- * - type: The type of line item (subtotal, shipping, etc.).
- * - title: The line item display title.
- * - formatted_amount: The formatted amount of the line item.
- * - shippable: TRUE if the order is shippable.
- *
- * Tokens: All site, store and order tokens are also available as
- * variables, such as site_logo, store_name and order_first_name.
- *
- * Display options:
- * - op: 'view', 'print', 'checkout-mail' or 'admin-mail', depending on
- * which variant of the invoice is being rendered.
- * - business_header: TRUE if the invoice header should be displayed.
- * - shipping_method: TRUE if shipping information should be displayed.
- * - help_text: TRUE if the store help message should be displayed.
- * - email_text: TRUE if the "do not reply to this email" message should
- * be displayed.
- * - store_footer: TRUE if the store URL should be displayed.
- * - thank_you_message: TRUE if the 'thank you for your order' message
- * should be displayed.
- *
- * @see template_preprocess_uc_order()
- */
- #}
- <table width="95%" border="0" cellspacing="0" cellpadding="1" align="center" bgcolor="#006699" style="font-family: verdana, arial, helvetica; font-size: small;">
- <tr>
- <td>
- <table width="100%" border="0" cellspacing="0" cellpadding="5" align="center" bgcolor="#FFFFFF" style="font-family: verdana, arial, helvetica; font-size: small;">
- {% if business_header %}
- <tr valign="top">
- <td>
- <table width="100%" style="font-family: verdana, arial, helvetica; font-size: small;">
- <tr>
- <td>{{ site_logo }}</td>
- <td width="98%">
- <div style="padding-left: 1em;">
- <span style="font-size: large;">{{ store_name }}</span><br />
- {{ site_slogan }}
- </div>
- </td>
- <td nowrap="nowrap">{{ store_address }}<br />{{ store_phone }}</td>
- </tr>
- </table>
- </td>
- </tr>
- {% endif %}
-
- <tr valign="top">
- <td>
- {% if thank_you_message %}
- <p><b>{{ 'Thanks for your order, @order_first_name!'|t({'@order_first_name': order_first_name}) }}</b></p>
-
- {% if order.data.new_user_name %}
- <p><b>{{ 'An account has been created for you with the following details:'|t }}</b></p>
- <p><b>{{ 'Username:'|t }}</b> {{ order_new_username }}<br />
- <b>{{ 'Password:'|t }}</b> {{ order_new_password }}</p>
- {% endif %}
-
- <p><b>{{ 'Want to manage your order online?'|t }}</b><br />
- {{ 'If you need to check the status of your order, please visit our home page at @store_link and click on "My account" in the menu or login with the following link:'|t({'@store_link': store_link}) }}
- <br /><br />{{ site_login_link }}</p>
- {% endif %}
-
- <table cellpadding="4" cellspacing="0" border="0" width="100%" style="font-family: verdana, arial, helvetica; font-size: small;">
- <tr>
- <td colspan="2" bgcolor="#006699" style="color: white;">
- <b>{{ 'Purchasing Information:'|t }}</b>
- </td>
- </tr>
- <tr>
- <td nowrap="nowrap"><b>{{ 'E-mail Address:'|t }}</b></td>
- <td width="98%">{{ order_email }}</td>
- </tr>
- <tr>
- <td colspan="2">
- <table width="100%" cellspacing="0" cellpadding="0" style="font-family: verdana, arial, helvetica; font-size: small;">
- <tr>
- <td valign="top" width="50%">
- <b>{{ 'Billing Address:'|t }}</b><br />
- {{ order_billing_address }}<br />
- <br />
- <b>{{ 'Billing Phone:'|t }}</b><br />
- {{ order_billing_phone }}<br />
- </td>
- {% if shippable %}
- <td valign="top" width="50%">
- <b>{{ 'Shipping Address:'|t }}</b><br />
- {{ order_shipping_address }}<br />
- <br />
- <b>{{ 'Shipping Phone:'|t }}</b><br />
- {{ order_shipping_phone }}<br />
- </td>
- {% endif %}
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td nowrap="nowrap">
- <b>{{ 'Order Grand Total:'|t }}</b>
- </td>
- <td width="98%">
- <b>{{ order_total }}</b>
- </td>
- </tr>
-
- {% if order_payment_method %}
- <tr>
- <td nowrap="nowrap"><b>{{ 'Payment Method:'|t }}</b></td>
- <td width="98%">{{ order_payment_method }}</td>
- </tr>
- {% endif %}
-
- <tr>
- <td colspan="2" bgcolor="#006699" style="color: white;">
- <b>{{ 'Order Summary:'|t }}</b>
- </td>
- </tr>
-
- {% if shippable %}
- <tr>
- <td colspan="2" bgcolor="#EEEEEE">
- <font color="#CC6600"><b>{{ 'Shipping Details:'|t }}</b></font>
- </td>
- </tr>
- {% endif %}
-
- <tr>
- <td colspan="2">
-
- <table border="0" cellpadding="1" cellspacing="0" width="100%" style="font-family: verdana, arial, helvetica; font-size: small;">
- <tr>
- <td nowrap="nowrap"><b>{{ 'Order #:'|t }}</b></td>
- <td width="98%">{{ order_link }}</td>
- </tr>
-
- <tr>
- <td nowrap="nowrap"><b>{{ 'Order Date: '|t }}</b></td>
- <td width="98%">{{ order_created }}</td>
- </tr>
-
- {% if shipping_method and shippable %}
- <tr>
- <td nowrap="nowrap"><b>{{ 'Shipping Method:'|t }}</b></td>
- <td width="98%">{{ order_shipping_method }}</td>
- </tr>
- {% endif %}
-
- <tr>
- <td nowrap="nowrap">{{ 'Products Subtotal:'|t }} </td>
- <td width="98%">{{ order_subtotal }}</td>
- </tr>
-
- {% for item in line_items if item.type != 'subtotal' and item.type != 'total' %}
-
- <tr>
- <td nowrap="nowrap">{{ item.title }}:</td>
- <td>{{ item.formatted_amount }}</td>
- </tr>
-
- {% endfor %}
-
- <tr>
- <td> </td>
- <td>------</td>
- </tr>
-
- <tr>
- <td nowrap="nowrap"><b>{{ 'Total for this Order:'|t }} </b></td>
- <td><b>{{ order_total }}</b></td>
- </tr>
-
- <tr>
- <td colspan="2">
- <br /><br /><b>{{ 'Products on order:'|t }} </b>
-
- <table width="100%" style="font-family: verdana, arial, helvetica; font-size: small;">
-
- {% for product in products %}
- <tr>
- <td valign="top" nowrap="nowrap"><b>{{ product.qty }} x </b></td>
- <td width="98%">
- <b>{{ product.title }} - {{ product.total_price }}</b>
- {{ product.individual_price }}<br />
- {{ 'SKU'|t }}: {{ product.model }}<br />
- {{ product.details }}
- </td>
- </tr>
- {% endfor %}
- </table>
-
- </td>
- </tr>
- </table>
-
- </td>
- </tr>
-
- {% if help_text or email_text or store_footer %}
- <tr>
- <td colspan="2">
- <hr noshade="noshade" size="1" /><br />
-
- {% if help_text %}
- <p><b>{{ 'Where can I get help with reviewing my order?'|t }}</b><br />
- {{ 'To learn more about managing your orders on @store_link, please visit our <a href="@store_help_url">help page</a>.'|t({'@store_link': store_link, '@store_help_url': store_help_url}) }}
- <br /></p>
- {% endif %}
-
- {% if email_text %}
- <p>{{ 'Please note: This e-mail message is an automated notification. Please do not reply to this message.'|t }}</p>
-
- <p>{{ 'Thanks again for shopping with us.'|t }}</p>
- {% endif %}
-
- {% if store_footer %}
- <p><b>{{ store_link }}</b><br /><b>{{ site_slogan }}</b></p>
- {% endif %}
- </td>
- </tr>
- {% endif %}
-
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>