You are here

uc-packing-slip.html.twig in Ubercart 8.4

{#
/**
 * This file is the default packing slip 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', or 'print', 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">
  <tr>
    <td>
      <table width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
        {% if business_header %}
        <tr valign="top">
          <td>
            <table width="100%">
              <tr>
                <td>
                  {{ site_logo }}
                </td>
                <td width="20%" nowrap="nowrap">
                  {{ store_address }}<br />{{ store_phone }}
                </td>
              </tr>
            </table>
          </td>
        </tr>
        {% endif %}

        <tr valign="top">
          <td>

            <table cellpadding="4" cellspacing="0" border="0" width="100%">
              <tr>
                <td colspan="2">
                  <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">
                    <tr>
                      <td valign="top" width="50%">
                        <b>{{ 'Billing Address:'|t }}</b><br />
                        {{ billing_address }}<br />
                        <br />
                        <b>{{ 'Billing Phone:'|t }}</b><br />
                        {{ billing_phone }}<br />
                      </td>
                      <td valign="top" width="50%">
                        <b>{{ 'Shipping Address:'|t }}</b><br />
                        {{ shipping_address }}<br />
                        <br />
                        <b>{{ 'Shipping Phone:'|t }}</b><br />
                        {{ shipping_phone }}<br />
                      </td>
                    </tr>
                  </table>

                </td>
              </tr>
              <tr>
                <td nowrap="nowrap">
                  <b>{{ 'Payment Method:'|t }}</b>
                </td>
                <td width="98%">
                  {{ payment_method }}
                </td>
              </tr>

              <tr>
                <td colspan="2">
                  <b>{{ 'Order Summary:'|t }}</b>
                </td>
              </tr>

              <tr>
                <td colspan="2">
                  <b>{{ 'Shipping Details:'|t }}</b>
                </td>
              </tr>

              <tr>
                <td colspan="2">

                  <table border="0" cellpadding="1" cellspacing="0" width="100%">
                    <tr>
                      <td nowrap="nowrap">
                        <b>{{ 'Order #:'|t }}</b>
                        {{ order_link }}
                      </td>
                    </tr>

                    <tr>
                      <td nowrap="nowrap">
                        <b>{{ 'Carrier:'|t }}</b>
                        {{ carrier }}
                      </td>
                    </tr>
                    <tr>
                      <td nowrap="nowrap">
                        <b>{{ 'Tracking #:'|t }}</b>
                        {{ tracking_number }}
                      </td>
                    </tr>

                    <tr>
                      <td colspan="2">
                        <br /><br /><b>{{ 'Products on order:'|t }}</b>

                        <table width="100%">

                          {% for package in packages %}
                          {% for product in package.products %}
                          <tr>
                            <td valign="top" nowrap="nowrap">
                              <b>{{ product.qty }} x </b>
                            </td>
                            <td width="98%">
                              <b>{{ product.title }}</b>
                              <br />
                              {{ 'SKU'|t }}: {{ product.model }}<br />
                              {{ product.details }}
                            </td>
                          </tr>
                          {% endfor %}
                          {% endfor %}
                        </table>

                      </td>
                    </tr>
                  </table>

                </td>
              </tr>

            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>

File

shipping/uc_fulfillment/templates/uc-packing-slip.html.twig
View source
  1. {#
  2. /**
  3. * This file is the default packing slip template for Ubercart.
  4. *
  5. * Available variables:
  6. * - products: An array of product objects in the order, with the following
  7. * members:
  8. * - title: The product title.
  9. * - model: The product SKU.
  10. * - qty: The quantity ordered.
  11. * - total_price: The formatted total price for the quantity ordered.
  12. * - individual_price: If quantity is more than 1, the formatted product
  13. * price of a single item.
  14. * - details: Any extra details about the product, such as attributes.
  15. * - line_items: An array of line item arrays attached to the order, each with
  16. * the following keys:
  17. * - type: The type of line item (subtotal, shipping, etc.).
  18. * - title: The line item display title.
  19. * - formatted_amount: The formatted amount of the line item.
  20. * - shippable: TRUE if the order is shippable.
  21. *
  22. * Tokens: All site, store and order tokens are also available as
  23. * variables, such as site_logo, store_name and order_first_name.
  24. *
  25. * Display options:
  26. * - op: 'view', or 'print', depending on which variant of the invoice
  27. * is being rendered.
  28. * - business_header: TRUE if the invoice header should be displayed.
  29. * - shipping_method: TRUE if shipping information should be displayed.
  30. * - help_text: TRUE if the store help message should be displayed.
  31. * - email_text: TRUE if the "do not reply to this email" message should
  32. * be displayed.
  33. * - store_footer: TRUE if the store URL should be displayed.
  34. * - thank_you_message: TRUE if the 'thank you for your order' message
  35. * should be displayed.
  36. *
  37. * @see template_preprocess_uc_order()
  38. */
  39. #}
  40. <table width="95%" border="0" cellspacing="0" cellpadding="1" align="center">
  41. <tr>
  42. <td>
  43. <table width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
  44. {% if business_header %}
  45. <tr valign="top">
  46. <td>
  47. <table width="100%">
  48. <tr>
  49. <td>
  50. {{ site_logo }}
  51. </td>
  52. <td width="20%" nowrap="nowrap">
  53. {{ store_address }}<br />{{ store_phone }}
  54. </td>
  55. </tr>
  56. </table>
  57. </td>
  58. </tr>
  59. {% endif %}
  60. <tr valign="top">
  61. <td>
  62. <table cellpadding="4" cellspacing="0" border="0" width="100%">
  63. <tr>
  64. <td colspan="2">
  65. <b>{{ 'Purchasing Information:'|t }}</b>
  66. </td>
  67. </tr>
  68. <tr>
  69. <td nowrap="nowrap">
  70. <b>{{ 'E-mail Address:'|t }}</b>
  71. </td>
  72. <td width="98%">
  73. {{ order_email }}
  74. </td>
  75. </tr>
  76. <tr>
  77. <td colspan="2">
  78. <table width="100%" cellspacing="0" cellpadding="0">
  79. <tr>
  80. <td valign="top" width="50%">
  81. <b>{{ 'Billing Address:'|t }}</b><br />
  82. {{ billing_address }}<br />
  83. <br />
  84. <b>{{ 'Billing Phone:'|t }}</b><br />
  85. {{ billing_phone }}<br />
  86. </td>
  87. <td valign="top" width="50%">
  88. <b>{{ 'Shipping Address:'|t }}</b><br />
  89. {{ shipping_address }}<br />
  90. <br />
  91. <b>{{ 'Shipping Phone:'|t }}</b><br />
  92. {{ shipping_phone }}<br />
  93. </td>
  94. </tr>
  95. </table>
  96. </td>
  97. </tr>
  98. <tr>
  99. <td nowrap="nowrap">
  100. <b>{{ 'Payment Method:'|t }}</b>
  101. </td>
  102. <td width="98%">
  103. {{ payment_method }}
  104. </td>
  105. </tr>
  106. <tr>
  107. <td colspan="2">
  108. <b>{{ 'Order Summary:'|t }}</b>
  109. </td>
  110. </tr>
  111. <tr>
  112. <td colspan="2">
  113. <b>{{ 'Shipping Details:'|t }}</b>
  114. </td>
  115. </tr>
  116. <tr>
  117. <td colspan="2">
  118. <table border="0" cellpadding="1" cellspacing="0" width="100%">
  119. <tr>
  120. <td nowrap="nowrap">
  121. <b>{{ 'Order #:'|t }}</b>
  122. {{ order_link }}
  123. </td>
  124. </tr>
  125. <tr>
  126. <td nowrap="nowrap">
  127. <b>{{ 'Carrier:'|t }}</b>
  128. {{ carrier }}
  129. </td>
  130. </tr>
  131. <tr>
  132. <td nowrap="nowrap">
  133. <b>{{ 'Tracking #:'|t }}</b>
  134. {{ tracking_number }}
  135. </td>
  136. </tr>
  137. <tr>
  138. <td colspan="2">
  139. <br /><br /><b>{{ 'Products on order:'|t }}</b>
  140. <table width="100%">
  141. {% for package in packages %}
  142. {% for product in package.products %}
  143. <tr>
  144. <td valign="top" nowrap="nowrap">
  145. <b>{{ product.qty }} x </b>
  146. </td>
  147. <td width="98%">
  148. <b>{{ product.title }}</b>
  149. <br />
  150. {{ 'SKU'|t }}: {{ product.model }}<br />
  151. {{ product.details }}
  152. </td>
  153. </tr>
  154. {% endfor %}
  155. {% endfor %}
  156. </table>
  157. </td>
  158. </tr>
  159. </table>
  160. </td>
  161. </tr>
  162. </table>
  163. </td>
  164. </tr>
  165. </table>
  166. </td>
  167. </tr>
  168. </table>