PluginProbe ʕ •ᴥ•ʔ
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution / 3.1.0
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution v3.1.0
4.9.2 4.9.1 4.9.0 2.0.0 2.1.0 2.2.0 2.2.1 2.2.2 2.3.0 2.4.0 2.5.0 2.5.1 3.0.0 3.1.0 3.1.1 4.0.0 4.0.1 4.1.0 4.1.1 4.2.0 4.2.1 4.3.0 4.3.1 4.4.0 4.5.0 4.5.1 4.6.0 4.6.1 4.6.2 4.6.3 4.6.4 4.6.5 4.6.6 4.6.7 4.6.8 4.6.9 4.7.0 4.7.1 4.7.2 4.7.3 4.7.4 4.7.5 4.7.6 4.7.7 4.7.8 4.7.9 4.8.0 4.8.1 4.8.2 4.8.3 4.8.4 4.8.5 4.8.6 4.8.7 4.8.8 4.8.9 trunk 0.1.2-beta 0.1.3-beta 0.1.4-beta 1.0.0 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.2.1 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.4.0 1.4.1 1.5.0 1.5.1 1.6.0 1.6.1 1.7.0 1.8.0 1.8.1 1.9.0
shopengine / widgets / cart-table / screens / cart.php
shopengine / widgets / cart-table / screens Last commit date
cart.php 3 years ago default.php 3 years ago empty.php 3 years ago view.php 3 years ago
cart.php
200 lines
1 <?php
2
3 defined('ABSPATH') || exit;
4 ?>
5 <div class="shopengine-cart-table">
6 <?php do_action('woocommerce_before_cart'); ?>
7
8 <form class="shopengine-cart-form woocommerce-cart-form" action="<?php echo esc_url(wc_get_cart_url()); ?>" method="post">
9
10 <?php do_action('woocommerce_before_cart_table'); ?>
11
12 <!-- shopengine cart table start -->
13 <div class="shopengine-table">
14
15 <!-- -------------------------------
16 shopengine cart table head start
17 ------------------------------------->
18 <div class="shopengine-table__head">
19 <div class="shopengine-table__head--th product-name"><?php echo esc_html($settings['shopengine_cart_table_title']) ?></div>
20 <div class="shopengine-table__head--th product-price"><?php echo esc_html($settings['shopengine_cart_table_price']) ?></div>
21 <div class="shopengine-table__head--th product-quantity"><?php echo esc_html($settings['shopengine_cart_table_quantity']) ?></div>
22 <div class="shopengine-table__head--th product-subtotal"><?php echo esc_html($settings['shopengine_cart_table_subtotal']) ?></div>
23 </div> <!-- shopengine cart table head end -->
24
25 <!---------------------------------------
26 shopengine cart table body start
27 ------------------------------------- -->
28 <div class="shopengine-table__body">
29 <?php do_action('woocommerce_before_cart_contents'); ?>
30
31 <?php
32 foreach(WC()->cart->get_cart() as $cart_item_key => $cart_item) {
33 $_product = apply_filters('woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key);
34 $product_id = apply_filters('woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key);
35
36 if($_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters('woocommerce_cart_item_visible', true, $cart_item, $cart_item_key)) {
37 $product_permalink = apply_filters('woocommerce_cart_item_permalink', $_product->is_visible() ? $_product->get_permalink($cart_item) : '', $cart_item, $cart_item_key);
38 ?>
39 <!-- shopengine cart table body item start -->
40 <div class="shopengine-table__body-item" <?php echo esc_attr(apply_filters('woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key)); ?>">
41
42 <!--
43 @class : table-first-body-column
44 @content : remove button, thumbnail, product name
45 -->
46
47 <div class="shopengine-table__body-item--td table-first-body-column">
48
49
50 <!-- Product Thumbnail and remove button together -->
51 <div class="product-thumbnail" data-title="<?php esc_attr_e('Image', 'shopengine'); ?>"> <?php
52 $thumbnail = apply_filters('woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key);
53 $product = esc_html__("View Product Full Details","shopengine");
54 if(!$product_permalink) {
55 shopengine_content_render(\ShopEngine\Utils\Helper::render( $thumbnail ));
56 } else {
57 shopengine_content_render(sprintf('<a title="' . $product . '" href="%s">%s</a>', esc_url($product_permalink), $thumbnail));
58 } ?>
59
60 <!-- remove button -->
61 <div class="product-remove">
62 <?php
63 $cart = esc_html__("Remove Cart Item","shopengine");
64 ob_start();
65 \Elementor\Icons_Manager::render_icon( $settings['shopengine_table_remove_button_icon_change'], [ 'aria-hidden' => 'true' ] );
66 $remove_icon = ob_get_clean();
67 shopengine_content_render(
68 apply_filters(
69 'woocommerce_cart_item_remove_link',
70 sprintf(
71 '<a title="' . $cart . '" href="%s" class="remove" aria-label="%s" data-product_id="%s" data-product_sku="%s">
72 %s
73 </a>',
74 esc_url(wc_get_cart_remove_url($cart_item_key)),
75 esc_html__('Remove this item', 'shopengine'),
76 esc_attr($product_id),
77 esc_attr($_product->get_sku()),
78 $remove_icon,
79 ),
80 $cart_item_key
81 )
82 );
83 ?>
84 </div>
85 </div>
86
87
88 </div>
89
90 <!-- product name -->
91 <div class="shopengine-table__body-item--td product-name" data-title="<?php esc_attr_e('Product', 'shopengine'); ?>">
92 <?php
93 if(!$product_permalink) {
94 echo wp_kses_post(apply_filters('woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key) . '&nbsp;');
95 } else {
96 echo wp_kses_post(apply_filters('woocommerce_cart_item_name', sprintf('<a href="%s">%s</a>', esc_url($product_permalink), $_product->get_name()), $cart_item, $cart_item_key));
97 }
98
99 do_action('woocommerce_after_cart_item_name', $cart_item, $cart_item_key);
100
101 // Meta data.
102 shopengine_content_render(wc_get_formatted_cart_item_data($cart_item));
103
104 // Backorder notification.
105 if($_product->backorders_require_notification() && $_product->is_on_backorder($cart_item['quantity'])) {
106 echo wp_kses_post(apply_filters('woocommerce_cart_item_backorder_notification', '<p class="backorder_notification">' . esc_html__('Available on backorder', 'shopengine') . '</p>', $product_id));
107 }
108 ?>
109
110 </div>
111
112 <!-- product price -->
113 <div class="shopengine-table__body-item--td product-price" data-title="<?php esc_attr_e('Price', 'shopengine'); ?>">
114 <?php
115 shopengine_content_render(apply_filters('woocommerce_cart_item_price', WC()->cart->get_product_price($_product), $cart_item, $cart_item_key));
116 ?>
117 </div>
118
119 <!-- product quantity -->
120 <div class="shopengine-table__body-item--td product-quantity" data-title="<?php esc_attr_e('Quantity', 'shopengine'); ?>">
121 <div class="shopengine-cart-quantity">
122 <?php
123 if($_product->is_sold_individually()) {
124 $product_quantity = sprintf( '1 <input type="hidden" name="cart[%s][qty]" value="1" />', $cart_item_key );
125 } else {
126 echo "<span class='minus-button'>&minus;</span>";
127 $product_quantity = woocommerce_quantity_input(
128 array(
129 'input_name' => "cart[{$cart_item_key}][qty]",
130 'input_value' => $cart_item['quantity'],
131 'max_value' => $_product->get_max_purchase_quantity(),
132 'min_value' => '0',
133 'product_name' => $_product->get_name(),
134 ),
135 $_product,
136 false
137 );
138 echo "<span data-max=".intval($_product->get_max_purchase_quantity())." class='plus-button'>&plus;</span>";
139 }
140
141 shopengine_content_render(apply_filters('woocommerce_cart_item_quantity', $product_quantity, $cart_item_key, $cart_item));
142 ?>
143 </div>
144
145 </div>
146
147 <!-- product subtotal -->
148 <div class="shopengine-table__body-item--td product-subtotal" data-title="<?php esc_attr_e('Subtotal', 'shopengine'); ?>">
149 <?php
150 shopengine_content_render(apply_filters('woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal($_product, $cart_item['quantity']), $cart_item, $cart_item_key));
151 ?>
152 </div>
153
154 </div> <!-- shopengine cart table body item end -->
155 <?php
156 }
157 }
158 ?>
159
160 <?php do_action('woocommerce_cart_contents'); ?>
161 <?php do_action('woocommerce_after_cart_contents'); ?>
162
163 </div> <!-- shopengine cart table body end -->
164
165 <!--------------------------------
166 shopengine cart table footer start
167 ------------------------------- -->
168 <div class="shopengine-table__footer">
169
170 <div class="button-group-left">
171 <button class="return-to-shop shopengine-footer-button">
172 <i class="eicon-arrow-left"></i>
173 <a title="<?php esc_html_e('Return To Shop','shopengine')?>" href="<?php echo esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ); ?>">
174 <?php echo esc_html( apply_filters( 'woocommerce_return_to_shop_text', esc_html($settings['shopengine_cart_continue_shopping_btn']) ) ); ?>
175 </a>
176 </button>
177 </div>
178
179 <div class="button-group-right">
180 <button type="submit" class="button update-cart-btn shopengine-footer-button" name="update_cart">
181 <i class="eicon-redo"></i>
182 <?php echo esc_html($settings['shopengine_cart_table_update']);?>
183 </button>
184
185 <button class="shopengine-footer-button clear-btn" type="submit" name="empty_cart">
186 <i class="eicon-trash-o"></i>
187 <?php echo esc_html($settings['shopengine_cart_table_clear_all']);?>
188 </button>
189 </div>
190 <?php do_action('woocommerce_cart_actions'); ?>
191 <?php wp_nonce_field('woocommerce-cart', 'woocommerce-cart-nonce'); ?>
192
193 </div> <!-- shopengine cart table footer end -->
194
195 </div> <!-- shopengine cart table end -->
196 <?php do_action('woocommerce_after_cart_table'); ?>
197 </form>
198
199 <?php do_action('woocommerce_after_cart'); ?>
200 </div>