uc-order--customer.tpl.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. <?php
  2. /**
  3. * @file
  4. * This file is the default customer invoice template for Ubercart.
  5. *
  6. * Available variables:
  7. * - $products: An array of product objects in the order, with the following
  8. * members:
  9. * - title: The product title.
  10. * - model: The product SKU.
  11. * - qty: The quantity ordered.
  12. * - total_price: The formatted total price for the quantity ordered.
  13. * - individual_price: If quantity is more than 1, the formatted product
  14. * price of a single item.
  15. * - details: Any extra details about the product, such as attributes.
  16. * - $line_items: An array of line item arrays attached to the order, each with
  17. * the following keys:
  18. * - line_item_id: The type of line item (subtotal, shipping, etc.).
  19. * - title: The line item display title.
  20. * - formatted_amount: The formatted amount of the line item.
  21. * - $shippable: TRUE if the order is shippable.
  22. *
  23. * Tokens: All site, store and order tokens are also available as
  24. * variables, such as $site_logo, $store_name and $order_first_name.
  25. *
  26. * Display options:
  27. * - $op: 'view', 'print', 'checkout-mail' or 'admin-mail', depending on
  28. * which variant of the invoice is being rendered.
  29. * - $business_header: TRUE if the invoice header should be displayed.
  30. * - $shipping_method: TRUE if shipping information should be displayed.
  31. * - $help_text: TRUE if the store help message should be displayed.
  32. * - $email_text: TRUE if the "do not reply to this email" message should
  33. * be displayed.
  34. * - $store_footer: TRUE if the store URL should be displayed.
  35. * - $thank_you_message: TRUE if the 'thank you for your order' message
  36. * should be displayed.
  37. *
  38. * @see template_preprocess_uc_order()
  39. */
  40. ?>
  41. <table width="95%" border="0" cellspacing="0" cellpadding="1" align="center" bgcolor="#006699" style="font-family: verdana, arial, helvetica; font-size: small;">
  42. <tr>
  43. <td>
  44. <table width="100%" border="0" cellspacing="0" cellpadding="5" align="center" bgcolor="#FFFFFF" style="font-family: verdana, arial, helvetica; font-size: small;">
  45. <?php if ($business_header): ?>
  46. <tr valign="top">
  47. <td>
  48. <table width="100%" style="font-family: verdana, arial, helvetica; font-size: small;">
  49. <tr>
  50. <td>
  51. <?php print $site_logo; ?>
  52. </td>
  53. <td width="98%">
  54. <div style="padding-left: 1em;">
  55. <span style="font-size: large;"><?php print $store_name; ?></span><br />
  56. <?php print $site_slogan; ?>
  57. </div>
  58. </td>
  59. <td nowrap="nowrap">
  60. <?php print $store_address; ?><br /><?php print $store_phone; ?>
  61. </td>
  62. </tr>
  63. </table>
  64. </td>
  65. </tr>
  66. <?php endif; ?>
  67. <tr valign="top">
  68. <td>
  69. <?php if ($thank_you_message): ?>
  70. <p><b><?php print t('Thanks for your order, !order_first_name!', array('!order_first_name' => $order_first_name)); ?></b></p>
  71. <?php if (isset($order->data['new_user'])): ?>
  72. <p><b><?php print t('An account has been created for you with the following details:'); ?></b></p>
  73. <p><b><?php print t('Username:'); ?></b> <?php print $order_new_username; ?><br />
  74. <b><?php print t('Password:'); ?></b> <?php print $order_new_password; ?></p>
  75. <?php endif; ?>
  76. <p><b><?php print t('Want to manage your order online?'); ?></b><br />
  77. <?php print t('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:', array('!store_link' => $store_link)); ?>
  78. <br /><br /><?php print $site_login_link; ?></p>
  79. <?php endif; ?>
  80. <table cellpadding="4" cellspacing="0" border="0" width="100%" style="font-family: verdana, arial, helvetica; font-size: small;">
  81. <tr>
  82. <td colspan="2" bgcolor="#006699" style="color: white;">
  83. <b><?php print t('Purchasing Information:'); ?></b>
  84. </td>
  85. </tr>
  86. <tr>
  87. <td nowrap="nowrap">
  88. <b><?php print t('E-mail Address:'); ?></b>
  89. </td>
  90. <td width="98%">
  91. <?php print $order_email; ?>
  92. </td>
  93. </tr>
  94. <tr>
  95. <td colspan="2">
  96. <table width="100%" cellspacing="0" cellpadding="0" style="font-family: verdana, arial, helvetica; font-size: small;">
  97. <tr>
  98. <td valign="top" width="50%">
  99. <b><?php print t('Billing Address:'); ?></b><br />
  100. <?php print $order_billing_address; ?><br />
  101. <br />
  102. <b><?php print t('Billing Phone:'); ?></b><br />
  103. <?php print $order_billing_phone; ?><br />
  104. </td>
  105. <?php if ($shippable): ?>
  106. <td valign="top" width="50%">
  107. <b><?php print t('Shipping Address:'); ?></b><br />
  108. <?php print $order_shipping_address; ?><br />
  109. <br />
  110. <b><?php print t('Shipping Phone:'); ?></b><br />
  111. <?php print $order_shipping_phone; ?><br />
  112. </td>
  113. <?php endif; ?>
  114. </tr>
  115. </table>
  116. </td>
  117. </tr>
  118. <tr>
  119. <td nowrap="nowrap">
  120. <b><?php print t('Order Grand Total:'); ?></b>
  121. </td>
  122. <td width="98%">
  123. <b><?php print $order_total; ?></b>
  124. </td>
  125. </tr>
  126. <tr>
  127. <td nowrap="nowrap">
  128. <b><?php print t('Payment Method:'); ?></b>
  129. </td>
  130. <td width="98%">
  131. <?php print $order_payment_method; ?>
  132. </td>
  133. </tr>
  134. <tr>
  135. <td colspan="2" bgcolor="#006699" style="color: white;">
  136. <b><?php print t('Order Summary:'); ?></b>
  137. </td>
  138. </tr>
  139. <?php if ($shippable): ?>
  140. <tr>
  141. <td colspan="2" bgcolor="#EEEEEE">
  142. <font color="#CC6600"><b><?php print t('Shipping Details:'); ?></b></font>
  143. </td>
  144. </tr>
  145. <?php endif; ?>
  146. <tr>
  147. <td colspan="2">
  148. <table border="0" cellpadding="1" cellspacing="0" width="100%" style="font-family: verdana, arial, helvetica; font-size: small;">
  149. <tr>
  150. <td nowrap="nowrap">
  151. <b><?php print t('Order #:'); ?></b>
  152. </td>
  153. <td width="98%">
  154. <?php print $order_link; ?>
  155. </td>
  156. </tr>
  157. <tr>
  158. <td nowrap="nowrap">
  159. <b><?php print t('Order Date: '); ?></b>
  160. </td>
  161. <td width="98%">
  162. <?php print $order_created; ?>
  163. </td>
  164. </tr>
  165. <?php if ($shipping_method && $shippable): ?>
  166. <tr>
  167. <td nowrap="nowrap">
  168. <b><?php print t('Shipping Method:'); ?></b>
  169. </td>
  170. <td width="98%">
  171. <?php print $order_shipping_method; ?>
  172. </td>
  173. </tr>
  174. <?php endif; ?>
  175. <tr>
  176. <td nowrap="nowrap">
  177. <?php print t('Products Subtotal:'); ?>&nbsp;
  178. </td>
  179. <td width="98%">
  180. <?php print $order_subtotal; ?>
  181. </td>
  182. </tr>
  183. <?php foreach ($line_items as $item): ?>
  184. <?php if ($item['type'] == 'subtotal' || $item['type'] == 'total') continue; ?>
  185. <tr>
  186. <td nowrap="nowrap">
  187. <?php print $item['title']; ?>:
  188. </td>
  189. <td>
  190. <?php print $item['formatted_amount']; ?>
  191. </td>
  192. </tr>
  193. <?php endforeach; ?>
  194. <tr>
  195. <td>&nbsp;</td>
  196. <td>------</td>
  197. </tr>
  198. <tr>
  199. <td nowrap="nowrap">
  200. <b><?php print t('Total for this Order:'); ?>&nbsp;</b>
  201. </td>
  202. <td>
  203. <b><?php print $order_total; ?></b>
  204. </td>
  205. </tr>
  206. <tr>
  207. <td colspan="2">
  208. <br /><br /><b><?php print t('Products on order:'); ?>&nbsp;</b>
  209. <table width="100%" style="font-family: verdana, arial, helvetica; font-size: small;">
  210. <?php foreach ($products as $product): ?>
  211. <tr>
  212. <td valign="top" nowrap="nowrap">
  213. <b><?php print $product->qty; ?> x </b>
  214. </td>
  215. <td width="98%">
  216. <b><?php print $product->title; ?> - <?php print $product->total_price; ?></b>
  217. <?php print $product->individual_price; ?><br />
  218. <?php print t('SKU'); ?>: <?php print $product->model; ?><br />
  219. <?php print $product->details; ?>
  220. </td>
  221. </tr>
  222. <?php endforeach; ?>
  223. </table>
  224. </td>
  225. </tr>
  226. </table>
  227. </td>
  228. </tr>
  229. <?php if ($help_text || $email_text || $store_footer): ?>
  230. <tr>
  231. <td colspan="2">
  232. <hr noshade="noshade" size="1" /><br />
  233. <?php if ($help_text): ?>
  234. <p><b><?php print t('Where can I get help with reviewing my order?'); ?></b><br />
  235. <?php print t('To learn more about managing your orders on !store_link, please visit our <a href="!store_help_url">help page</a>.', array('!store_link' => $store_link, '!store_help_url' => $store_help_url)); ?>
  236. <br /></p>
  237. <?php endif; ?>
  238. <?php if ($email_text): ?>
  239. <p><?php print t('Please note: This e-mail message is an automated notification. Please do not reply to this message.'); ?></p>
  240. <p><?php print t('Thanks again for shopping with us.'); ?></p>
  241. <?php endif; ?>
  242. <?php if ($store_footer): ?>
  243. <p><b><?php print $store_link; ?></b><br /><b><?php print $site_slogan; ?></b></p>
  244. <?php endif; ?>
  245. </td>
  246. </tr>
  247. <?php endif; ?>
  248. </table>
  249. </td>
  250. </tr>
  251. </table>
  252. </td>
  253. </tr>
  254. </table>