/var/www/html_us/wp-content/themes/elessi-theme/woocommerce/checkout/review-order.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<?php

/**
 * Review order table
 * 
 * @author  NasaTheme
 * @package Elessi-theme/WooCommerce
 * @version 5.2.0
 */

defined('ABSPATH') || exit;

global 
$nasa_opt;
?>

<table class="shop_table woocommerce-checkout-review-order-table">
    <thead>
        <tr>
            <th class="product-name" ><?php esc_html_e('Product''elessi-theme'); ?></th>
            <th class="product-total"><?php esc_html_e('Subtotal''elessi-theme'); ?></th>
        </tr>
    </thead>
    
    <tbody>
        <?php
        do_action
('woocommerce_review_order_before_cart_contents');
        
        
$cart WC()->cart->get_cart();
        
        foreach (
$cart as $cart_item_key => $cart_item) :
            
$_product apply_filters('woocommerce_cart_item_product'$cart_item['data'], $cart_item$cart_item_key);

            if (
$_product && $_product->exists() && $cart_item['quantity'] > && apply_filters('woocommerce_checkout_cart_item_visible'true$cart_item$cart_item_key)) :
                
                
$product_name apply_filters('woocommerce_cart_item_name'$_product->get_name(), $cart_item$cart_item_key);
                
$product_price apply_filters('woocommerce_cart_item_price'WC()->cart->get_product_price($_product), $cart_item$cart_item_key); 
                
?>
                <tr class="<?php echo esc_attr(apply_filters('woocommerce_cart_item_class''cart_item'$cart_item$cart_item_key)); ?>">
                    <td class="product-name" colspan="2">
                        <div class="co-wrap-item">
                            <?php if (!isset($nasa_opt['mini_checkout_img']) || $nasa_opt['mini_checkout_img']) : ?>
                                <div class="co-wrap-img margin-right-15 rtl-margin-right-0 rtl-margin-left-15 nasa-relative">
                                    <?php echo apply_filters('woocommerce_cart_item_thumbnail'$_product->get_image('thumbnail'), $cart_item$cart_item_key); ?>

                                    <?php echo apply_filters('woocommerce_checkout_cart_item_quantity''<span class="product-quantity quantity-review-item">' sprintf('%s'$cart_item['quantity']) . '</span>'$cart_item$cart_item_key); ?>
                                </div>
                            <?php endif; ?>
                            
                            <div class="co-wrap-info nasa-flex flex-wrap jbw align-start">
                                <span class="co-product-name">
                                    <?php
                                    
echo $product_name;
                                    
                                    if (isset(
$nasa_opt['mini_checkout_img']) && !$nasa_opt['mini_checkout_img'] && (!isset($nasa_opt['mini_checkout_qty']) || !$nasa_opt['mini_checkout_qty'])) :
                                        echo 
apply_filters('woocommerce_checkout_cart_item_quantity''<strong class="product-quantity">' sprintf('&nbsp;&times;&nbsp;%s'$cart_item['quantity']) . '</strong>'$cart_item$cart_item_key );
                                    endif;
                                    
?>
                                </span>
                                
                                <?php echo wc_get_formatted_cart_item_data($cart_item); ?>
                                
                                <?php
                                
if (isset($nasa_opt['mini_checkout_qty']) && $nasa_opt['mini_checkout_qty']) :
                                    if (
$_product->is_sold_individually()) :
                                        
$min_quantity 1;
                                        
$max_quantity 1;
                                    else :
                                        
$min_quantity 0;
                                        
$max_quantity $_product->get_max_purchase_quantity();
                                    endif;
                                    
                                    
$product_quantity woocommerce_quantity_input(
                                        array(
                                            
'input_name'   => 'cart[' $cart_item_key '][qty]',
                                            
'input_value'  => $cart_item['quantity'],
                                            
'max_value'    => $max_quantity,
                                            
'min_value'    => $min_quantity,
                                            
'product_name' => $product_name
                                        
),
                                        
$_product,
                                        
false
                                    
);

                                    echo 
apply_filters('woocommerce_cart_item_quantity'$product_quantity$cart_item_key$cart_item); // PHPCS: XSS ok.
                                
endif;
                                
?>

                                <div class="product-total">
                                    <?php echo apply_filters('woocommerce_cart_item_subtotal'WC()->cart->get_product_subtotal($_product$cart_item['quantity']), $cart_item$cart_item_key); ?>
                                </div>
                            </div>
                        </div>
                    </td>
                </tr>
                
                <?php
                
            
endif;
        endforeach;

        
do_action('woocommerce_review_order_after_cart_contents');
        
?>
    </tbody>
    
    <tfoot>
        <?php do_action('nasa_review_order_before_cart_subtotal');?>

        <tr class="cart-subtotal">
            <th><?php esc_html_e('Subtotal''elessi-theme'); ?></th>
            <td ><?php wc_cart_totals_subtotal_html(); ?></td>
        </tr>

        <?php $coupons WC()->cart->get_coupons(); ?>
        <?php if ($coupons): ?>
            <?php foreach ($coupons as $code => $coupon) : ?>
                <tr class="cart-discount coupon-<?php echo esc_attr(sanitize_title($code)); ?>">
                    <th><?php wc_cart_totals_coupon_label($coupon); ?></th>
                    <td ><?php wc_cart_totals_coupon_html($coupon); ?></td>
                </tr>
            <?php endforeach; ?>
        <?php endif; ?>
        
        <?php if (WC()->cart->needs_shipping() && WC()->cart->show_shipping()) : ?>
            <?php do_action('woocommerce_review_order_before_shipping'); ?>
            
            <?php if (!defined('NASA_CHECKOUT_LAYOUT') || NASA_CHECKOUT_LAYOUT != 'modern') : ?>
                <?php wc_cart_totals_shipping_html(); ?>
            <?php else : ?>
                <tr class="order-shipping-modern hidden-tag"><th></th><td ></td></tr>
            <?php endif; ?>
            
            <?php do_action('woocommerce_review_order_after_shipping'); ?>
        <?php endif; ?>

        <?php $fees WC()->cart->get_fees(); ?>
        <?php if ($fees) : ?>
            <?php foreach ($fees as $fee) : ?>
                <tr class="fee">
                    <th><?php echo esc_html($fee->name); ?></th>
                    <td ><?php wc_cart_totals_fee_html($fee); ?></td>
                </tr>
            <?php endforeach; ?>
        <?php endif; ?>

        <?php if (wc_tax_enabled() && !WC()->cart->display_prices_including_tax()) : ?>
            <?php if ('itemized' === get_option('woocommerce_tax_total_display')) : ?>
                <?php
                $taxs 
WC()->cart->get_tax_totals();
                foreach (
$taxs as $code => $tax) : ?>
                    <tr class="tax-rate tax-rate-<?php echo esc_attr(sanitize_title($code)); ?>">
                        <th><?php echo esc_html($tax->label); ?></th>
                        <td ><?php echo wp_kses_post($tax->formatted_amount); ?></td>
                    </tr>
                <?php endforeach; ?>
            <?php else : ?>
                <tr class="tax-total">
                    <th><?php echo esc_html(WC()->countries->tax_or_vat()); ?></th>
                    <td ><?php wc_cart_totals_taxes_total_html(); ?></td>
                </tr>
            <?php endif; ?>
        <?php endif; ?>

        <?php do_action('woocommerce_review_order_before_order_total'); ?>

        <tr class="order-total">
            <th><?php esc_html_e('Total''elessi-theme'); ?></th>
            <td ><?php wc_cart_totals_order_total_html(); ?></td>
        </tr>

        <?php do_action('woocommerce_review_order_after_order_total'); ?>

    </tfoot>
</table>