PluginProbe
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster / 2.7.0
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster v2.7.0
2.7.0 2.6.0 trunk 1.1.0 1.1.4 1.2.1 1.2.2 1.2.3 1.2.5 1.2.9 1.3.1 1.3.2 1.5.0 1.5.1 1.5.4 1.5.7 1.5.8 1.5.9 1.6.2 1.6.5 1.6.8 1.7.2 1.7.4 1.7.5 1.7.9 All 43 releases
sellkit / includes / elementor / modules / checkout / templates / review-order.php

review-order.php in SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster 2.7.0, at includes/elementor/modules/checkout/templates/review-order.php

142 lines 6.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Review order table
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/checkout/review-order.php.
6 *
7 * HOWEVER, on occasion WooCommerce will need to update template files and you
8 * (the theme developer) will need to copy the new files to your theme to
9 * maintain compatibility. We try to do this as little as possible, but it does
10 * happen. When this occurs the version of the template file will be bumped and
11 * the readme will list any important changes.
12 *
13 * @see https://docs.woocommerce.com/document/template-structure/
14 * @package WooCommerce\Templates
15 * @version 5.2.0
16 */
17
18 defined( 'ABSPATH' ) || exit;
19 // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals -- WooCommerce/Elementor template; variables mirror core docs.
20 ?>
21
22 <table class="shop_table woocommerce-checkout-review-order-table" cellspacing="0">
23 <thead>
24 <?php ob_start(); ?>
25 <tr>
26 <th class="product-name"><?php esc_html_e( 'Product', 'sellkit' ); ?></th>
27 <th class="product-total"><?php esc_html_e( 'Subtotal', 'sellkit' ); ?></th>
28 </tr>
29 <?php ob_get_clean(); ?>
30 </thead>
31 <tbody>
32 <?php
33 do_action( 'woocommerce_review_order_before_cart_contents' );
34
35 foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
36 $_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
37
38 if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_checkout_cart_item_visible', true, $cart_item, $cart_item_key ) ) {
39 ob_start();
40 ?>
41 <tr class="<?php echo esc_attr( apply_filters( 'woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key ) ); ?>">
42 <td class="product-name">
43 <?php echo wp_kses_post( apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key ) ) . '&nbsp;'; ?>
44 <?php echo apply_filters( 'woocommerce_checkout_cart_item_quantity', ' <strong class="product-quantity">' . sprintf( '&times;&nbsp;%s', $cart_item['quantity'] ) . '</strong>', $cart_item, $cart_item_key ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
45 <?php echo wc_get_formatted_cart_item_data( $cart_item ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
46 </td>
47 <td class="product-total">
48 <?php echo apply_filters( 'woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
49 </td>
50 </tr>
51 <?php
52 $row = ob_get_clean();
53
54 do_action( 'sellkit-one-page-checkout-custom-order-item', $row, $_product, $cart_item, $cart_item_key );
55 }
56 }
57
58 do_action( 'woocommerce_review_order_after_cart_contents' );
59 do_action( 'sellkit-checkout-widget-custom-coupon-form' );
60 ?>
61
62 </tbody>
63
64 <tfoot class="sellkit-checkout-widget-order-summary-tfoot">
65 <tr class="cart-subtotal">
66 <th class="sellkit-checkout-widget-divider"><?php esc_html_e( 'Subtotal', 'sellkit' ); ?></th>
67 <td class="sellkit-checkout-widget-divider"><?php wc_cart_totals_subtotal_html(); ?></td>
68 </tr>
69
70 <?php do_action( 'sellkit-checkout-widget-display-shipping-price' ); ?>
71
72 <?php
73 add_filter( 'woocommerce_cart_totals_coupon_label', function( $label, $coupon ) {
74 return __( 'Discount', 'sellkit' ) . '<span class="sellkit-coupon-label">'. $coupon->get_code() .'</span>'; //phpcs:ignore
75 }, 10, 2 );
76 ?>
77
78 <?php foreach ( WC()->cart->get_coupons() as $code => $coupon ) : ?>
79 <tr class="cart-discount coupon-<?php echo esc_attr( sanitize_title( $code ) ); ?>">
80 <th>
81 <?php wc_cart_totals_coupon_label( $coupon ); ?>
82 <?php
83 $coupon = new WC_Coupon( $coupon );
84 $link = esc_url( add_query_arg( 'remove_coupon', urlencode( $coupon->get_code() ), defined( 'WOOCOMMERCE_CHECKOUT' ) ? wc_get_checkout_url() : wc_get_cart_url() ) ); // phpcs:ignore
85 ?>
86 <span
87 class="woocommerce-remove-coupon"
88 data-coupon="<?php echo esc_attr( $code ); ?>"
89 data-link="<?php echo esc_attr( $link ); ?>"
90 >
91 <span class="woo-remove-coupon" title="<?php echo esc_attr__( 'Remove coupon', 'sellkit' ); ?>"></span>
92 </span>
93 </th>
94 <td><?php wc_cart_totals_coupon_html( $coupon ); ?></td>
95 </tr>
96 <?php endforeach; ?>
97
98 <?php /* ! shipping method moved. */ ?>
99
100 <?php foreach ( WC()->cart->get_fees() as $fee ) : ?>
101 <tr class="fee">
102 <th><?php echo esc_html( $fee->name ); ?></th>
103 <td><?php wc_cart_totals_fee_html( $fee ); ?></td>
104 </tr>
105 <?php endforeach; ?>
106
107 <?php if ( wc_tax_enabled() && ! WC()->cart->display_prices_including_tax() ) : ?>
108 <?php if ( 'itemized' === get_option( 'woocommerce_tax_total_display' ) ) : ?>
109 <?php foreach ( WC()->cart->get_tax_totals() as $code => $tax ) : /* phpcs:ignore */ ?>
110 <tr class="tax-rate tax-rate-<?php echo esc_attr( sanitize_title( $code ) ); ?>">
111 <th><?php echo esc_html( $tax->label ); ?></th>
112 <td><?php echo wp_kses_post( $tax->formatted_amount ); ?></td>
113 </tr>
114 <?php endforeach; ?>
115 <?php else : ?>
116 <tr class="tax-total">
117 <th><?php echo esc_html( WC()->countries->tax_or_vat() ); ?></th>
118 <td><?php wc_cart_totals_taxes_total_html(); ?></td>
119 </tr>
120 <?php endif; ?>
121 <?php endif; ?>
122
123 <!-- Discount are hooked here -->
124 <?php do_action( 'woocommerce_review_order_before_order_total' ); ?>
125
126 <tr class="order-total">
127 <th class="sellkit-checkout-widget-divider sellkit-order-total"><?php esc_html_e( 'Total', 'sellkit' ); ?></th>
128 <td class="sellkit-checkout-widget-divider sellkit-order-total"><?php wc_cart_totals_order_total_html(); ?></td>
129 </tr>
130
131 <?php do_action( 'woocommerce_review_order_after_order_total' ); ?>
132 </tfoot>
133 </table>
134 <script>
135 if ( typeof window.sellkitCheckoutMakeSureJsWorks === 'function' ) {
136 window.sellkitCheckoutMakeSureJsWorks();
137 }
138 </script>
139 <?php if ( ! wp_doing_ajax() ) : ?>
140 <?php do_action( 'sellkit-checkout-after-order-summary' ); ?>
141 <?php endif; ?>
142