PageRenderTime 55ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/components/com_virtuemart/themes/default/templates/order_emails/confirmation_email.tpl.php

http://vanphongphamdm.googlecode.com/
PHP | 308 lines | 296 code | 7 blank | 5 comment | 40 complexity | f9d77550754ba2128391e3ebc219bc35 MD5 | raw file
Possible License(s): BSD-3-Clause, LGPL-2.1, Apache-2.0
  1. <?php
  2. // $Id: confirmation_email.tpl.php 1393 2008-05-02 11:42:19Z soeren_nb $
  3. if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' );
  4. ?>
  5. <html>
  6. <head>
  7. <title><?php echo $VM_LANG->_('PHPSHOP_ORDER_PRINT_PO_LBL') ?></title>
  8. <style type="text/css">
  9. <!--
  10. .Stil1 {
  11. font-family: Verdana, Arial, Helvetica, sans-serif;
  12. font-size: 12px;
  13. }
  14. .Stil2 {font-family: Verdana, Arial, Helvetica, sans-serif}
  15. -->
  16. </style>
  17. </head>
  18. <body>
  19. <table width="100%" align="center" border="0" cellspacing="0" cellpadding="10">
  20. <tr valign="top">
  21. <td width=53% align="left" class="Stil1"><?php echo ps_vendor::formatted_store_address(true) ?></td>
  22. <td width="47%" align="right"><img src="cid:vendor_image" alt="vendor_image" border="0" /></td>
  23. </tr>
  24. <tr>
  25. <td colspan="2" class="Stil1"><?php echo $order_header_msg ?></td>
  26. </tr>
  27. <tr bgcolor="white">
  28. <td colspan="2">
  29. <h3 class="Stil2"><?php echo $VM_LANG->_('PHPSHOP_ORDER_PRINT_PO_LBL') ?></h3>
  30. </td>
  31. </tr>
  32. </table>
  33. <table border=0 cellspacing=0 cellpadding=2 width=100%>
  34. <!-- begin customer information -->
  35. <tr bgcolor="#CCCCCC" class="sectiontableheader">
  36. <td colspan="2" class="Stil2"><b><?php echo $VM_LANG->_('PHPSHOP_ACC_ORDER_INFO') ?></b></td>
  37. </tr>
  38. <tr class="Stil1">
  39. <td><?php echo $VM_LANG->_('PHPSHOP_ORDER_PRINT_PO_NUMBER')?>:</td><td><?php echo $order_id ?></td>
  40. </tr>
  41. <tr class="Stil1">
  42. <td><?php echo $VM_LANG->_('PHPSHOP_ORDER_PRINT_PO_DATE') ?>:</td><td><?php echo $order_date ?></td>
  43. </tr>
  44. <tr class="Stil1">
  45. <td><?php echo $VM_LANG->_('PHPSHOP_ORDER_PRINT_PO_STATUS') ?>:</td><td><?php echo $order_status ?></td>
  46. </tr>
  47. <!-- end customer information -->
  48. <!-- begin 2 column bill-ship to -->
  49. <tr class="sectiontableheader">
  50. <td colspan="2">&nbsp;</td>
  51. </tr>
  52. <tr bgcolor="#CCCCCC" class="sectiontableheader">
  53. <td colspan="2"><b class="Stil2"><?php echo $VM_LANG->_('PHPSHOP_ORDER_PRINT_CUST_INFO_LBL') ?></b></td>
  54. </tr>
  55. <tr valign=top>
  56. <td width=50%> <!-- begin billto -->
  57. <table width=100% cellspacing=0 cellpadding=2 border=0>
  58. <?php
  59. foreach( $registrationfields as $field ) {
  60. if( $field->name == 'email') $field->name = 'user_email';
  61. if( $field->name == 'delimiter_sendregistration') continue;
  62. if( $field->type == 'captcha') continue;
  63. if( $field->type == 'delimiter') { ?>
  64. <tr class="Stil1">
  65. <td colspan="2"><b class="Stil1"><?php echo $VM_LANG->_($field->title) ? $VM_LANG->_($field->title) : $field->title ?></b></td>
  66. </tr>
  67. <?php
  68. } else { ?>
  69. <tr class="Stil1">
  70. <td><?php echo $VM_LANG->_($field->title) ? $VM_LANG->_($field->title) : $field->title ?>:</td>
  71. <td><?php
  72. switch($field->name) {
  73. case 'country':
  74. require_once(CLASSPATH.'ps_country.php');
  75. $country = new ps_country();
  76. $dbc = $country->get_country_by_code($dbbt->f($field->name));
  77. if( $dbc !== false ) echo $dbc->f('country_name');
  78. break;
  79. default:
  80. echo $dbbt->f($field->name);
  81. break;
  82. }
  83. ?></td>
  84. </tr>
  85. <?php
  86. } ?>
  87. <?php
  88. }
  89. ?>
  90. </table>
  91. <!-- end billto -->
  92. </td>
  93. <td width=50%>
  94. <!-- begin shipto -->
  95. <table width=100% border=0 cellpadding=2 cellspacing=0 class="Stil1">
  96. <tr>
  97. <td colspan="2"><b><?php echo $VM_LANG->_('PHPSHOP_ORDER_PRINT_SHIP_TO_LBL') ?></b></td>
  98. </tr>
  99. <?php
  100. foreach( $shippingfields as $field ) {
  101. if( $field->name == 'email') $field->name = 'user_email';
  102. if( $field->type == 'delimiter') { ?>
  103. <tr class="Stil1">
  104. <td colspan="2"><b class="Stil1"><?php echo $VM_LANG->_($field->title) ? $VM_LANG->_($field->title) : $field->title ?></b></td>
  105. </tr>
  106. <?php
  107. } else { ?>
  108. <tr class="Stil1">
  109. <td><?php echo $VM_LANG->_($field->title) ? $VM_LANG->_($field->title) : $field->title ?>:</td>
  110. <td><?php
  111. switch($field->name) {
  112. case 'country':
  113. require_once(CLASSPATH.'ps_country.php');
  114. $country = new ps_country();
  115. $dbc = $country->get_country_by_code($dbst->f($field->name));
  116. if( $dbc !== false ) echo $dbc->f('country_name');
  117. break;
  118. default:
  119. echo $dbst->f($field->name);
  120. break;
  121. }
  122. ?></td>
  123. </tr>
  124. <?php
  125. } ?>
  126. <?php
  127. }
  128. ?>
  129. </table>
  130. <!-- end shipto -->
  131. <!-- end customer information --> </td>
  132. </tr>
  133. <tr>
  134. <td colspan="2">&nbsp;</td>
  135. </tr>
  136. <tr>
  137. <td colspan="2">
  138. <table width="100%" border="0" cellspacing="0" cellpadding="1">
  139. </table>
  140. </td>
  141. </tr>
  142. <tr>
  143. <td colspan="2">&nbsp;</td>
  144. </tr>
  145. <!-- begin order items information -->
  146. <tr bgcolor="#CCCCCC" class="Stil2">
  147. <td colspan="2"><b><?php echo $VM_LANG->_('PHPSHOP_ORDER_ITEM') ?></b></td>
  148. </tr>
  149. <tr>
  150. <td colspan="2">
  151. <table width=100% cellspacing=0 cellpadding=2 border=0>
  152. <tr align=left class="Stil1">
  153. <th><?php echo $VM_LANG->_('PHPSHOP_CART_QUANTITY') ?></th>
  154. <th><?php echo $VM_LANG->_('PHPSHOP_CART_NAME') ?></th>
  155. <th><?php echo $VM_LANG->_('PHPSHOP_CART_SKU') ?></th>
  156. <th><?php echo $VM_LANG->_('PHPSHOP_CART_PRICE') ?></th>
  157. <th><?php echo $VM_LANG->_('PHPSHOP_CART_SUBTOTAL') ?></th>
  158. </tr>
  159. <?php
  160. // CREATE THE LIST WITH ALL ORDER ITEMS
  161. $order_items = "";
  162. $sub_total = 0.00;
  163. while($dboi->next_record()) {
  164. $my_qty = $dboi->f("product_quantity");
  165. if ($auth["show_price_including_tax"] == 1) {
  166. $price = $dboi->f("product_final_price");
  167. $my_price = $CURRENCY_DISPLAY->getFullValue($dboi->f("product_final_price"), '', $db->f('order_currency'));
  168. } else {
  169. $price = $dboi->f("product_item_price");
  170. $my_price = $CURRENCY_DISPLAY->getFullValue($dboi->f("product_item_price"), '', $db->f('order_currency'));
  171. }
  172. $my_subtotal = $my_qty * $price;
  173. $sub_total += $my_subtotal;
  174. ?>
  175. <tr class="Stil1">
  176. <td><?php echo $my_qty ?></td>
  177. <td><?php $dboi->p("product_name")?> <?php echo ($dboi->f("product_attribute") ? ' ('.$dboi->f("product_attribute").')' : ''); ?></td>
  178. <td><?php echo $ps_product->get_field($dboi->f("product_id"), "product_sku") ?></td>
  179. <td><?php echo $my_price ?></td>
  180. <td><?php echo $CURRENCY_DISPLAY->getFullValue($my_subtotal, '', $db->f('order_currency')) ?></td>
  181. </tr>
  182. <?php
  183. }
  184. ?>
  185. <tr class="Stil1">
  186. <td colspan=4 align=right>&nbsp;&nbsp;</td>
  187. <td>&nbsp;</td>
  188. </tr>
  189. <tr class="Stil1">
  190. <td colspan=4 align=right><?php echo $VM_LANG->_('PHPSHOP_ORDER_PRINT_SUBTOTAL') ?> :</td>
  191. <td><?php echo $order_subtotal ?></td>
  192. </tr>
  193. <?php
  194. // DISCOUNT HANDLING
  195. if ( PAYMENT_DISCOUNT_BEFORE == '1') {
  196. if ($order_discount > 0 || $order_discount < 0) {
  197. ?>
  198. <tr class="Stil1">
  199. <td align="right" colspan="4"><?php echo $order_discount_lbl ?>: </td>
  200. <td> <?php echo $order_discount_plusminus .' '. $CURRENCY_DISPLAY->getFullValue(abs($order_discount), '', $db->f('order_currency')) ?></td>
  201. </tr>
  202. <?php
  203. }
  204. if ($coupon_discount > 0 || $coupon_discount < 0) {
  205. ?>
  206. <tr class="Stil1">
  207. <td align="right" colspan="4"><?php echo $VM_LANG->_('PHPSHOP_COUPON_DISCOUNT') ?>: </td>
  208. <td><?php echo $coupon_discount_plusminus. ' '.$CURRENCY_DISPLAY->getFullValue(abs($coupon_discount), '', $db->f('order_currency')) ?></td>
  209. </tr>
  210. <?php
  211. }
  212. }
  213. ?>
  214. <tr class="Stil1">
  215. <td colspan=4 align=right><?php echo $VM_LANG->_('PHPSHOP_ORDER_PRINT_SHIPPING') ?> :</td>
  216. <td><?php echo $order_shipping ?></td>
  217. </tr>
  218. <tr class="Stil1">
  219. <td colspan=4 align=right><?php echo $VM_LANG->_('PHPSHOP_ORDER_PRINT_TOTAL_TAX') ?> :</td>
  220. <td><?php echo $order_tax ?></td>
  221. </tr>
  222. <?php
  223. if ( PAYMENT_DISCOUNT_BEFORE != '1') {
  224. if ($order_discount > 0 || $order_discount < 0) {
  225. ?>
  226. <tr class="Stil1">
  227. <td align="right" colspan="4"><?php echo $order_discount_lbl ?>: </td>
  228. <td> <?php echo $order_discount_plusminus .' '. $CURRENCY_DISPLAY->getFullValue(abs($order_discount), '', $db->f('order_currency')) ?></td>
  229. </tr>
  230. <?php
  231. }
  232. if ($coupon_discount > 0 || $coupon_discount < 0) {
  233. ?>
  234. <tr class="Stil1">
  235. <td align="right" colspan="4"><?php echo $VM_LANG->_('PHPSHOP_COUPON_DISCOUNT') ?>: </td>
  236. <td><?php echo $coupon_discount_plusminus. ' '.$CURRENCY_DISPLAY->getFullValue(abs($coupon_discount), '', $db->f('order_currency')) ?></td>
  237. </tr>
  238. <?php
  239. }
  240. }
  241. ?>
  242. <tr class="Stil1">
  243. <td colspan=4 align=right><b><?php echo $VM_LANG->_('PHPSHOP_CART_TOTAL') .": " ?></b></td>
  244. <td><?php echo $order_total ?></td>
  245. </tr>
  246. </table>
  247. </td>
  248. </tr>
  249. <!-- end order items information -->
  250. <!-- begin customer note -->
  251. <tr class="sectiontableheader">
  252. <td colspan="2">&nbsp;</td>
  253. </tr>
  254. <tr bgcolor="#CCCCCC" class="sectiontableheader">
  255. <td colspan="2"><b class="Stil2"><?php echo $VM_LANG->_('PHPSHOP_ORDER_PRINT_CUSTOMER_NOTE') ?>:</b></td>
  256. </tr>
  257. <tr>
  258. <td colspan="2">
  259. <?php echo $customer_note ?>
  260. </td>
  261. </tr>
  262. <tr class="sectiontableheader">
  263. <td colspan="2">&nbsp;</td>
  264. </tr>
  265. <tr bgcolor="#CCCCCC" class="sectiontableheader">
  266. <td><b class="Stil2"><?php echo $payment_info_lbl ?></b></td>
  267. <td><b class="Stil2"><?php echo $shipping_info_lbl ?></b></td>
  268. </tr>
  269. <tr>
  270. <td><?php echo $payment_info_details ?></td>
  271. <td><?php echo $shipping_info_details ?></td>
  272. </tr>
  273. </table>
  274. <br>
  275. <p class="Stil2"></p>
  276. <p class="Stil2">
  277. <?php
  278. // EMAIL FOOTER MESSAGE
  279. if( $is_email_to_shopper ) {
  280. $footer_html = "<br /><br />".$VM_LANG->_('PHPSHOP_CHECKOUT_EMAIL_SHOPPER_HEADER2')."<br />";
  281. if( VM_REGISTRATION_TYPE != 'NO_REGISTRATION' ) {
  282. $footer_html .= "<br /><a title=\"".$VM_LANG->_('PHPSHOP_CHECKOUT_EMAIL_SHOPPER_HEADER5')."\" href=\"$order_link\">"
  283. . $VM_LANG->_('PHPSHOP_CHECKOUT_EMAIL_SHOPPER_HEADER5')."</a>";
  284. }
  285. $footer_html .= "<br /><br />".$VM_LANG->_('PHPSHOP_CHECKOUT_EMAIL_SHOPPER_HEADER3')."<br />";
  286. $footer_html .= $VM_LANG->_('CMN_EMAIL').": <a href=\"mailto:" . $from_email."\">".$from_email."</a>";
  287. // New in version 1.0.5
  288. if( @VM_ONCHECKOUT_SHOW_LEGALINFO == '1' && !empty( $legal_info_title )) {
  289. $footer_html .= "<br /><br />____________________________________________<br />";
  290. $footer_html .= '<h5>'.$legal_info_title.'</h5>';
  291. $footer_html .= $legal_info_html.'<br />';
  292. }
  293. } else {
  294. $footer_html = '<br /><br /><a title="'.$VM_LANG->_('PHPSHOP_CHECKOUT_EMAIL_SHOPPER_HEADER5').'" href="'.$order_link.'">'
  295. . $VM_LANG->_('PHPSHOP_CHECKOUT_EMAIL_SHOPPER_HEADER5').'</a>';
  296. }
  297. echo $footer_html;
  298. ?>
  299. </p>
  300. </body>
  301. </html>