Advertisement
Guest User

Untitled

a guest
Apr 26th, 2013
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.54 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Admin new order email
  4.  *
  5.  * @author WooThemes
  6.  * @package WooCommerce/Templates/Emails/HTML
  7.  * @version 2.0.0
  8.  */
  9. if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
  10.  
  11. <?php do_action( 'woocommerce_email_header', $email_heading ); ?>
  12.  
  13. <p><?php printf( __( 'You have received an order from %s. Their order is as follows:', 'woocommerce' ), $order->billing_first_name . ' ' . $order->billing_last_name ); ?></p>
  14.  
  15. <?php do_action( 'woocommerce_email_before_order_table', $order, true ); ?>
  16.  
  17. <h2><?php printf( __( 'Order: %s', 'woocommerce'), $order->get_order_number() ); ?> (<?php printf( '<time datetime="%s">%s</time>', date_i18n( 'c', strtotime( $order->order_date ) ), date_i18n( woocommerce_date_format(), strtotime( $order->order_date ) ) ); ?>)</h2>
  18.  
  19. <table cellspacing="0" cellpadding="6" style="width: 100%; border: 1px solid #eee;" border="1" bordercolor="#eee">
  20.     <thead>
  21.         <tr>
  22.             <th scope="col" style="text-align:left; border: 1px solid #eee;"><?php _e( 'Product', 'woocommerce' ); ?></th>
  23.             <th scope="col" style="text-align:left; border: 1px solid #eee;"><?php _e( 'Quantity', 'woocommerce' ); ?></th>
  24.             <th scope="col" style="text-align:left; border: 1px solid #eee;"><?php _e( 'Price', 'woocommerce' ); ?></th>
  25.         </tr>
  26.     </thead>
  27.     <tbody>
  28.         <?php echo $order->email_order_items_table( false, true ); ?>
  29.     </tbody>
  30.     <tfoot>
  31.         <?php
  32.             if ( $totals = $order->get_order_item_totals() ) {
  33.                 $i = 0;
  34.                 foreach ( $totals as $total ) {
  35.                     $i++;
  36.                     ?><tr>
  37.                         <th scope="row" colspan="2" style="text-align:left; border: 1px solid #eee; <?php if ( $i == 1 ) echo 'border-top-width: 4px;'; ?>"><?php echo $total['label']; ?></th>
  38.                         <td style="text-align:left; border: 1px solid #eee; <?php if ( $i == 1 ) echo 'border-top-width: 4px;'; ?>"><?php echo $total['value']; ?></td>
  39.                     </tr><?php
  40.                 }
  41.             }
  42.         ?>
  43.     </tfoot>
  44. </table>
  45.  
  46. <?php do_action('woocommerce_email_after_order_table', $order, true); ?>
  47.  
  48. <?php do_action( 'woocommerce_email_order_meta', $order, true ); ?>
  49.  
  50. <h2><?php _e( 'Customer details', 'woocommerce' ); ?></h2>
  51.  
  52. <?php if ( $order->billing_email ) : ?>
  53.     <p><strong><?php _e( 'Email:', 'woocommerce' ); ?></strong> <?php echo $order->billing_email; ?></p>
  54. <?php endif; ?>
  55. <?php if ( $order->billing_phone ) : ?>
  56.     <p><strong><?php _e( 'Tel:', 'woocommerce' ); ?></strong> <?php echo $order->billing_phone; ?></p>
  57. <?php endif; ?>
  58.  
  59. <?php woocommerce_get_template( 'emails/email-addresses.php', array( 'order' => $order ) ); ?>
  60.  
  61. <?php do_action( 'woocommerce_email_footer' ); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement