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0-beta.1 3.2.2 6.3.0-rc.1 3.2.3 6.3.0-rc.2 3.2.4 6.3.1 3.2.5 6.3.2 3.2.6 6.4.0 3.3.0 6.4.0-beta.1 3.3.1 6.4.0-rc.1 3.3.2 6.4.1 3.3.2-rc.1 6.4.2 3.3.3 6.5.0 3.3.4 6.5.0-beta.1 3.3.5 6.5.0-rc.1 3.3.6 6.5.0-rc.2 3.4.0 6.5.1 3.4.0-beta.1 6.5.2 3.4.0-rc.2 6.6.0 3.4.1 6.6.0-beta.1 3.4.2 6.6.0-rc.1 3.4.3 6.6.0-rc.2 3.4.4 6.6.1 3.4.5 6.6.2 3.4.6 6.7.0 3.4.7 6.7.0-beta.1 3.4.8 6.7.0-beta.2 3.5.0 6.7.0-rc.1 3.5.0-beta.1 6.7.1 3.5.0-rc.1 6.8.0 3.5.0-rc.2 6.8.0-beta.1 3.5.1 6.8.0-beta.2 3.5.10 6.8.0-rc.1 3.5.2 6.8.1 3.5.3 6.8.2 3.5.4 6.8.3 3.5.5 6.9.0 3.5.6 6.9.0-beta.1 3.5.7 6.9.0-beta.2 3.5.8 6.9.0-rc.1 3.5.9 6.9.1 3.6.0 6.9.2 3.6.0-beta.1 6.9.3 3.6.0-rc.1 6.9.4 3.6.0-rc.2 6.9.5 3.6.0-rc.3 7.0.0 3.6.1 7.0.0-beta.1 3.6.2 7.0.0-beta.2 3.6.3 7.0.0-beta.3 3.6.4 7.0.0-rc.1 3.6.5 7.0.0-rc.2 3.6.6 7.0.1 3.6.7 7.0.2 3.7.0 7.1.0 3.7.0-beta.1 7.1.0-beta.1 3.7.0-rc.1 7.1.0-beta.2 3.7.0-rc.2 7.1.0-rc.1 3.7.1 7.1.0-rc.2 3.7.2 7.1.1
woocommerce / templates / cart / cart.php
woocommerce / templates / cart Last commit date
cart-empty.php 3 years ago cart-item-data.php 5 years ago cart-shipping.php 3 years ago cart-totals.php 5 years ago cart.php 2 years ago cross-sells.php 5 years ago mini-cart.php 2 years ago proceed-to-checkout-button.php 3 years ago shipping-calculator.php 3 years ago
cart.php
196 lines
1 <?php
2 /**
3 * Cart Page
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/cart/cart.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 7.9.0
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 do_action( 'woocommerce_before_cart' ); ?>
21
22 <form class="woocommerce-cart-form" action="<?php echo esc_url( wc_get_cart_url() ); ?>" method="post">
23 <?php do_action( 'woocommerce_before_cart_table' ); ?>
24
25 <table class="shop_table shop_table_responsive cart woocommerce-cart-form__contents" cellspacing="0">
26 <thead>
27 <tr>
28 <th class="product-remove"><span class="screen-reader-text"><?php esc_html_e( 'Remove item', 'woocommerce' ); ?></span></th>
29 <th class="product-thumbnail"><span class="screen-reader-text"><?php esc_html_e( 'Thumbnail image', 'woocommerce' ); ?></span></th>
30 <th class="product-name"><?php esc_html_e( 'Product', 'woocommerce' ); ?></th>
31 <th class="product-price"><?php esc_html_e( 'Price', 'woocommerce' ); ?></th>
32 <th class="product-quantity"><?php esc_html_e( 'Quantity', 'woocommerce' ); ?></th>
33 <th class="product-subtotal"><?php esc_html_e( 'Subtotal', 'woocommerce' ); ?></th>
34 </tr>
35 </thead>
36 <tbody>
37 <?php do_action( 'woocommerce_before_cart_contents' ); ?>
38
39 <?php
40 foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
41 $_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
42 $product_id = apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key );
43 /**
44 * Filter the product name.
45 *
46 * @since 2.1.0
47 * @param string $product_name Name of the product in the cart.
48 * @param array $cart_item The product in the cart.
49 * @param string $cart_item_key Key for the product in the cart.
50 */
51 $product_name = apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key );
52
53 if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_cart_item_visible', true, $cart_item, $cart_item_key ) ) {
54 $product_permalink = apply_filters( 'woocommerce_cart_item_permalink', $_product->is_visible() ? $_product->get_permalink( $cart_item ) : '', $cart_item, $cart_item_key );
55 ?>
56 <tr class="woocommerce-cart-form__cart-item <?php echo esc_attr( apply_filters( 'woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key ) ); ?>">
57
58 <td class="product-remove">
59 <?php
60 echo apply_filters( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
61 'woocommerce_cart_item_remove_link',
62 sprintf(
63 '<a href="%s" class="remove" aria-label="%s" data-product_id="%s" data-product_sku="%s">&times;</a>',
64 esc_url( wc_get_cart_remove_url( $cart_item_key ) ),
65 /* translators: %s is the product name */
66 esc_attr( sprintf( __( 'Remove %s from cart', 'woocommerce' ), wp_strip_all_tags( $product_name ) ) ),
67 esc_attr( $product_id ),
68 esc_attr( $_product->get_sku() )
69 ),
70 $cart_item_key
71 );
72 ?>
73 </td>
74
75 <td class="product-thumbnail">
76 <?php
77 $thumbnail = apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key );
78
79 if ( ! $product_permalink ) {
80 echo $thumbnail; // PHPCS: XSS ok.
81 } else {
82 printf( '<a href="%s">%s</a>', esc_url( $product_permalink ), $thumbnail ); // PHPCS: XSS ok.
83 }
84 ?>
85 </td>
86
87 <td class="product-name" data-title="<?php esc_attr_e( 'Product', 'woocommerce' ); ?>">
88 <?php
89 if ( ! $product_permalink ) {
90 echo wp_kses_post( $product_name . '&nbsp;' );
91 } else {
92 /**
93 * This filter is documented above.
94 *
95 * @since 2.1.0
96 */
97 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 ) );
98 }
99
100 do_action( 'woocommerce_after_cart_item_name', $cart_item, $cart_item_key );
101
102 // Meta data.
103 echo wc_get_formatted_cart_item_data( $cart_item ); // PHPCS: XSS ok.
104
105 // Backorder notification.
106 if ( $_product->backorders_require_notification() && $_product->is_on_backorder( $cart_item['quantity'] ) ) {
107 echo wp_kses_post( apply_filters( 'woocommerce_cart_item_backorder_notification', '<p class="backorder_notification">' . esc_html__( 'Available on backorder', 'woocommerce' ) . '</p>', $product_id ) );
108 }
109 ?>
110 </td>
111
112 <td class="product-price" data-title="<?php esc_attr_e( 'Price', 'woocommerce' ); ?>">
113 <?php
114 echo apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key ); // PHPCS: XSS ok.
115 ?>
116 </td>
117
118 <td class="product-quantity" data-title="<?php esc_attr_e( 'Quantity', 'woocommerce' ); ?>">
119 <?php
120 if ( $_product->is_sold_individually() ) {
121 $min_quantity = 1;
122 $max_quantity = 1;
123 } else {
124 $min_quantity = 0;
125 $max_quantity = $_product->get_max_purchase_quantity();
126 }
127
128 $product_quantity = woocommerce_quantity_input(
129 array(
130 'input_name' => "cart[{$cart_item_key}][qty]",
131 'input_value' => $cart_item['quantity'],
132 'max_value' => $max_quantity,
133 'min_value' => $min_quantity,
134 'product_name' => $product_name,
135 ),
136 $_product,
137 false
138 );
139
140 echo apply_filters( 'woocommerce_cart_item_quantity', $product_quantity, $cart_item_key, $cart_item ); // PHPCS: XSS ok.
141 ?>
142 </td>
143
144 <td class="product-subtotal" data-title="<?php esc_attr_e( 'Subtotal', 'woocommerce' ); ?>">
145 <?php
146 echo apply_filters( 'woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ); // PHPCS: XSS ok.
147 ?>
148 </td>
149 </tr>
150 <?php
151 }
152 }
153 ?>
154
155 <?php do_action( 'woocommerce_cart_contents' ); ?>
156
157 <tr>
158 <td colspan="6" class="actions">
159
160 <?php if ( wc_coupons_enabled() ) { ?>
161 <div class="coupon">
162 <label for="coupon_code" class="screen-reader-text"><?php esc_html_e( 'Coupon:', 'woocommerce' ); ?></label> <input type="text" name="coupon_code" class="input-text" id="coupon_code" value="" placeholder="<?php esc_attr_e( 'Coupon code', 'woocommerce' ); ?>" /> <button type="submit" class="button<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?>" name="apply_coupon" value="<?php esc_attr_e( 'Apply coupon', 'woocommerce' ); ?>"><?php esc_html_e( 'Apply coupon', 'woocommerce' ); ?></button>
163 <?php do_action( 'woocommerce_cart_coupon' ); ?>
164 </div>
165 <?php } ?>
166
167 <button type="submit" class="button<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?>" name="update_cart" value="<?php esc_attr_e( 'Update cart', 'woocommerce' ); ?>"><?php esc_html_e( 'Update cart', 'woocommerce' ); ?></button>
168
169 <?php do_action( 'woocommerce_cart_actions' ); ?>
170
171 <?php wp_nonce_field( 'woocommerce-cart', 'woocommerce-cart-nonce' ); ?>
172 </td>
173 </tr>
174
175 <?php do_action( 'woocommerce_after_cart_contents' ); ?>
176 </tbody>
177 </table>
178 <?php do_action( 'woocommerce_after_cart_table' ); ?>
179 </form>
180
181 <?php do_action( 'woocommerce_before_cart_collaterals' ); ?>
182
183 <div class="cart-collaterals">
184 <?php
185 /**
186 * Cart collaterals hook.
187 *
188 * @hooked woocommerce_cross_sell_display
189 * @hooked woocommerce_cart_totals - 10
190 */
191 do_action( 'woocommerce_cart_collaterals' );
192 ?>
193 </div>
194
195 <?php do_action( 'woocommerce_after_cart' ); ?>
196