PluginProbe
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster / 1.7.4
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster v1.7.4
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 1.7.4, at includes/elementor/modules/checkout/templates/review-order.php

139 lines 5.9 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
20 <table class="shop_table woocommerce-checkout-review-order-table" cellspacing="0">
21 <thead>
22 <?php ob_start(); ?>
23 <tr>
24 <th class="product-name"><?php esc_html_e( 'Product', 'woocommerce' ); ?></th>
25 <th class="product-total"><?php esc_html_e( 'Subtotal', 'woocommerce' ); ?></th>
26 </tr>
27 <?php ob_get_clean(); ?>
28 </thead>
29 <tbody>
30 <?php
31 do_action( 'woocommerce_review_order_before_cart_contents' );
32
33 foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
34 $_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
35
36 if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_checkout_cart_item_visible', true, $cart_item, $cart_item_key ) ) {
37 ob_start();
38 ?>
39 <tr class="<?php echo esc_attr( apply_filters( 'woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key ) ); ?>">
40 <td class="product-name">
41 <?php echo wp_kses_post( apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key ) ) . '&nbsp;'; ?>
42 <?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 ?>
43 <?php echo wc_get_formatted_cart_item_data( $cart_item ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
44 </td>
45 <td class="product-total">
46 <?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 ?>
47 </td>
48 </tr>
49 <?php
50 $row = ob_get_clean();
51
52 do_action( 'sellkit-one-page-checkout-custom-order-item', $row, $_product, $cart_item, $cart_item_key );
53 }
54 }
55
56 do_action( 'woocommerce_review_order_after_cart_contents' );
57 do_action( 'sellkit-checkout-widget-custom-coupon-form' );
58 ?>
59
60 </tbody>
61
62 <tfoot class="sellkit-checkout-widget-order-summary-tfoot">
63 <tr class="cart-subtotal">
64 <th class="sellkit-checkout-widget-divider"><?php esc_html_e( 'Subtotal', 'woocommerce' ); ?></th>
65 <td class="sellkit-checkout-widget-divider"><?php wc_cart_totals_subtotal_html(); ?></td>
66 </tr>
67
68 <?php do_action( 'sellkit-checkout-widget-display-shipping-price' ); ?>
69
70 <?php
71 add_filter( 'woocommerce_cart_totals_coupon_label', function( $label, $coupon ) {
72 return __( 'Discount', 'sellkit' ) . '<span class="sellkit-coupon-label">'. $coupon->get_code() .'</span>'; //phpcs:ignore
73 }, 10, 2 );
74 ?>
75
76 <?php foreach ( WC()->cart->get_coupons() as $code => $coupon ) : ?>
77 <tr class="cart-discount coupon-<?php echo esc_attr( sanitize_title( $code ) ); ?>">
78 <th>
79 <?php wc_cart_totals_coupon_label( $coupon ); ?>
80 <?php
81 $coupon = new WC_Coupon( $coupon );
82 $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
83 ?>
84 <span
85 class="woocommerce-remove-coupon"
86 data-coupon="<?php echo $code; ?>"
87 data-link="<?php echo $link; ?>"
88 >
89 <span class="woo-remove-coupon" title="<?php echo esc_attr__( 'Remove coupon', 'sellkit' ); ?>"></span>
90 </span>
91 </th>
92 <td><?php wc_cart_totals_coupon_html( $coupon ); ?></td>
93 </tr>
94 <?php endforeach; ?>
95
96 <?php /* ! shipping method moved. */ ?>
97
98 <?php foreach ( WC()->cart->get_fees() as $fee ) : ?>
99 <tr class="fee">
100 <th><?php echo esc_html( $fee->name ); ?></th>
101 <td><?php wc_cart_totals_fee_html( $fee ); ?></td>
102 </tr>
103 <?php endforeach; ?>
104
105 <?php if ( wc_tax_enabled() && ! WC()->cart->display_prices_including_tax() ) : ?>
106 <?php if ( 'itemized' === get_option( 'woocommerce_tax_total_display' ) ) : ?>
107 <?php foreach ( WC()->cart->get_tax_totals() as $code => $tax ) : /* phpcs:ignore */ ?>
108 <tr class="tax-rate tax-rate-<?php echo esc_attr( sanitize_title( $code ) ); ?>">
109 <th><?php echo esc_html( $tax->label ); ?></th>
110 <td><?php echo wp_kses_post( $tax->formatted_amount ); ?></td>
111 </tr>
112 <?php endforeach; ?>
113 <?php else : ?>
114 <tr class="tax-total">
115 <th><?php echo esc_html( WC()->countries->tax_or_vat() ); ?></th>
116 <td><?php wc_cart_totals_taxes_total_html(); ?></td>
117 </tr>
118 <?php endif; ?>
119 <?php endif; ?>
120
121 <?php do_action( 'woocommerce_review_order_before_order_total' ); ?>
122
123 <tr class="order-total">
124 <th class="sellkit-checkout-widget-divider sellkit-order-total"><?php esc_html_e( 'Total', 'woocommerce' ); ?></th>
125 <td class="sellkit-checkout-widget-divider sellkit-order-total"><?php wc_cart_totals_order_total_html(); ?></td>
126 </tr>
127
128 <?php do_action( 'woocommerce_review_order_after_order_total' ); ?>
129 </tfoot>
130 </table>
131 <script>
132 if ( typeof window.sellkitCheckoutMakeSureJsWorks === 'function' ) {
133 window.sellkitCheckoutMakeSureJsWorks();
134 }
135 </script>
136 <?php if ( ! wp_doing_ajax() ) : ?>
137 <?php do_action( 'sellkit-checkout-after-order-summary' ); ?>
138 <?php endif; ?>
139