Guest User

Untitled

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