Advertisement
melenia

Untitled

Jun 28th, 2018
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.22 KB | None | 0 0
  1. <?php global $wpo_wcpdf; ?>
  2. <?php do_action( 'wpo_wcpdf_before_document', $wpo_wcpdf->export->template_type, $wpo_wcpdf->export->order ); ?>
  3.  
  4. <div class="grey-head">
  5. <table class="head container pd2">
  6. <tr>
  7. <td class="shop-info">
  8.  
  9. </td>
  10. <td class="header">
  11. <?php
  12. if( $wpo_wcpdf->get_header_logo_id() ) {
  13. $wpo_wcpdf->header_logo();
  14. } else {
  15. echo apply_filters( 'wpo_wcpdf_invoice_title', __( 'Invoice', 'wpo_wcpdf' ) );
  16. }
  17. ?>
  18. </td>
  19. </tr>
  20. </table>
  21.  
  22. <h1 class="document-type-label pd2">
  23. <?php if( $wpo_wcpdf->get_header_logo_id() ) echo apply_filters( 'wpo_wcpdf_invoice_title', __( 'Invoice', 'wpo_wcpdf' ) ); ?>
  24. -Number: <?php $wpo_wcpdf->invoice_number(); ?></h1>
  25.  
  26. <?php do_action( 'wpo_wcpdf_after_document_label', $wpo_wcpdf->export->template_type, $wpo_wcpdf->export->order ); ?>
  27.  
  28. <table class="order-data-addresses pd2">
  29. <tr>
  30. <td class="address billing-address">
  31. <!-- <h3><?php _e( 'Billing Address:', 'wpo_wcpdf' ); ?></h3> -->
  32. <?php $wpo_wcpdf->billing_address(); ?>
  33. <?php if ( isset($wpo_wcpdf->settings->template_settings['invoice_email']) ) { ?>
  34. <div class="billing-email"><?php $wpo_wcpdf->billing_email(); ?></div>
  35. <?php } ?>
  36. <?php if ( isset($wpo_wcpdf->settings->template_settings['invoice_phone']) ) { ?>
  37. <div class="billing-phone"><?php $wpo_wcpdf->billing_phone(); ?></div>
  38. <?php } ?>
  39. </td>
  40. <td class="address shipping-address">
  41. <?php if ( isset($wpo_wcpdf->settings->template_settings['invoice_shipping_address']) && $wpo_wcpdf->ships_to_different_address()) { ?>
  42. <h3><?php _e( 'Ship To:', 'wpo_wcpdf' ); ?></h3>
  43. <?php $wpo_wcpdf->shipping_address(); ?>
  44. <?php } ?>
  45. </td>
  46. <td class="order-data">
  47. <table>
  48. <?php do_action( 'wpo_wcpdf_before_order_data', $wpo_wcpdf->export->template_type, $wpo_wcpdf->export->order ); ?>
  49. <?php if ( isset($wpo_wcpdf->settings->template_settings['display_date']) && $wpo_wcpdf->settings->template_settings['display_date'] == 'invoice_date') { ?>
  50. <tr class="invoice-date">
  51. <th><?php _e( 'Invoice Date', 'wpo_wcpdf' ); ?></th>
  52. <td>: <?php $wpo_wcpdf->invoice_date(); ?></td>
  53. </tr>
  54. <?php } ?>
  55. <tr class="order-number">
  56. <th><?php _e( 'Order Number', 'wpo_wcpdf' ); ?></th>
  57. <td>: <?php $wpo_wcpdf->order_number(); ?></td>
  58. </tr>
  59. <tr class="payment-method">
  60. <th><?php _e( 'Payment Method', 'wpo_wcpdf' ); ?></th>
  61. <td>: <?php $wpo_wcpdf->payment_method(); ?></td>
  62. </tr>
  63. <?php do_action( 'wpo_wcpdf_after_order_data', $wpo_wcpdf->export->template_type, $wpo_wcpdf->export->order ); ?>
  64. </table>
  65. </td>
  66. </tr>
  67. </table>
  68. </div>
  69. <?php do_action( 'wpo_wcpdf_before_order_details', $wpo_wcpdf->export->template_type, $wpo_wcpdf->export->order ); ?>
  70.  
  71. <table class="order-details">
  72. <thead>
  73. <tr>
  74. <th valign="middle" class="product"><?php _e('Product', 'wpo_wcpdf'); ?></th>
  75. <th valign="middle" class="quantity"><?php _e(' Users', 'wpo_wcpdf'); ?></th>
  76. <th valign="middle" class="price"><?php _e('Price', 'wpo_wcpdf'); ?></th>
  77. </tr>
  78. </thead>
  79. <tbody>
  80. <?php $items = $wpo_wcpdf->get_order_items(); if( sizeof( $items ) > 0 ) : foreach( $items as $item_id => $item ) : ?>
  81. <tr class="<?php echo apply_filters( 'wpo_wcpdf_item_row_class', $item_id, $wpo_wcpdf->export->template_type, $wpo_wcpdf->export->order, $item_id ); ?>">
  82. <td class="product">
  83. <?php $description_label = __( 'Description', 'wpo_wcpdf' ); // registering alternate label translation ?>
  84. <span class="item-name"><?php echo $item['name']; ?></span>
  85. <?php do_action( 'wpo_wcpdf_before_item_meta', $wpo_wcpdf->export->template_type, $item, $wpo_wcpdf->export->order ); ?>
  86. <!--<span class="item-meta"><?php echo $item['meta']; ?></span>-->
  87. <dl class="meta">
  88. <?php $description_label = __( 'SKU', 'wpo_wcpdf' ); // registering alternate label translation ?>
  89. <?php if( !empty( $item['sku'] ) ) : ?><dt class="sku"><?php _e( 'SKU:', 'wpo_wcpdf' ); ?></dt><dd class="sku"><?php echo $item['sku']; ?></dd><?php endif; ?>
  90. </dl>
  91. <?php do_action( 'wpo_wcpdf_after_item_meta', $wpo_wcpdf->export->template_type, $item, $wpo_wcpdf->export->order ); ?>
  92. </td>
  93. <td class="quantity"><?php echo $item['quantity']; ?></td>
  94. <td class="price"><?php echo $item['order_price']; ?></td>
  95. </tr>
  96. <?php endforeach; endif; ?>
  97. </tbody>
  98. <tfoot>
  99. <tr class="no-borders">
  100. <td class="no-borders">
  101. <div class="customer-notes">
  102. <?php do_action( 'wpo_wcpdf_before_customer_notes', $wpo_wcpdf->export->template_type, $wpo_wcpdf->export->order ); ?>
  103. <?php if ( $wpo_wcpdf->get_shipping_notes() ) : ?>
  104. <h3><?php _e( 'Customer Notes', 'wpo_wcpdf' ); ?></h3>
  105. <?php $wpo_wcpdf->shipping_notes(); ?>
  106. <?php endif; ?>
  107. <?php do_action( 'wpo_wcpdf_after_customer_notes', $wpo_wcpdf->export->template_type, $wpo_wcpdf->export->order ); ?>
  108. </div>
  109. </td>
  110. <td class="no-borders" colspan="2">
  111. <table class="totals">
  112. <tfoot>
  113. <?php foreach( $wpo_wcpdf->get_woocommerce_totals() as $key => $total ) : ?>
  114. <tr class="<?php echo $key; ?>">
  115. <td class="no-borders"></td>
  116. <th class="description"><?php echo $total['label']; ?></th>
  117. <td class="price"><span class="totals-price"><?php echo $total['value']; ?></span></td>
  118. </tr>
  119. <?php endforeach; ?>
  120. </tfoot>
  121. </table>
  122. </td>
  123. </tr>
  124. </tfoot>
  125. </table>
  126. <div class="footer-text">The order has been delivered on: <?php $wpo_wcpdf->invoice_date(); ?><br><span>Thank you very much for your business.<span><br><br><span>For EU customers with a valid VAT-ID: No VAT added to this invoice according to Reverse Charge.</span></div>
  127.  
  128. <?php do_action( 'wpo_wcpdf_after_order_details', $wpo_wcpdf->export->template_type, $wpo_wcpdf->export->order ); ?>
  129.  
  130. <?php
  131. $payment_method = method_exists($order, 'get_payment_method') ? $order->get_payment_method() : $order->payment_method;
  132. echo $payment_method;
  133. if ($payment_method == 'braintree_credit_card') { ?>
  134. <?php if ( $wpo_wcpdf->get_footer() ): ?>
  135. <div id="footer">
  136. <?php $wpo_wcpdf->footer(); ?>
  137. </div><!-- #letter-footer -->
  138. <?php endif; ?>
  139. <?php } ?>
  140. <?php do_action( 'wpo_wcpdf_after_document', $wpo_wcpdf->export->template_type, $wpo_wcpdf->export->order ); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement