cart->get_cart_contents_count(); ?>

cart->is_empty() ) : ?>
    cart->get_cart() as $cart_item_key => $cart_item ) { $_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key ); $product_id = apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key ); if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_widget_cart_item_visible', true, $cart_item, $cart_item_key ) ) { /** * This filter is documented in woocommerce/templates/cart/cart.php. * * @since 2.1.0 */ $product_name = apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key ); $thumbnail = apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key ); $product_price = apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key ); $product_permalink = apply_filters( 'woocommerce_cart_item_permalink', $_product->is_visible() ? $_product->get_permalink( $cart_item ) : '', $cart_item, $cart_item_key ); global $brandy_cart_settings; $click_effect = $brandy_cart_settings['click_effect'] ?? 'slide_in'; ?>
  • is_sold_individually() ) { $min_quantity = 1; $max_quantity = 1; } else { $min_quantity = 0; $max_quantity = $_product->get_max_purchase_quantity(); } $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. ?>
    ' . sprintf( '%s × %s', $cart_item['quantity'], $product_price ) . '', $cart_item, $cart_item_key ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
    ', /* translators: %s is the product name */ esc_attr( sprintf( __( 'Remove %s from cart', 'woocommerce' ), wp_strip_all_tags( $product_name ) ) ), esc_attr( $product_id ), esc_attr( $cart_item_key ), esc_attr( $_product->get_sku() ) ), $cart_item_key ); ?>

cart->is_empty() ) : ?>

wc_get_checkout_url(), 'text' => esc_html__( 'Checkout', 'woocommerce' ), 'class' => 'w-full text-center checkout', ) ); ?> ' . esc_html__( 'View cart', 'woocommerce' ) . ''; ?>