/** * Test wc_cart_totals_subtotal_html() * * @todo test with taxes incl./excl. * @since 2.4 */ public function test_wc_cart_totals_subtotal_html() { $product = \WC_Helper_Product::create_simple_product(); WC()->cart->add_to_cart($product->id, 1); $this->expectOutputString(wc_price($product->price), wc_cart_totals_subtotal_html()); \WC_Helper_Product::delete_product($product->id); }
</tr> <?php } } do_action('woocommerce_review_order_after_cart_contents'); ?> </tbody> <tfoot> <tr class="cart-subtotal"> <th><?php _e('Subtotal', 'woocommerce'); ?> </th> <td><?php wc_cart_totals_subtotal_html(); ?> </td> </tr> <?php foreach (WC()->cart->get_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>
public function output_cart() { if (!Essential_Grid_Woocommerce::is_woo_exists()) { return true; } echo '<!-- THE CART BUTTON -->'; echo '<div class="esg-cartbutton-wrapper ' . $this->special_class . '"'; if ($this->spacing !== false) { echo $this->spacing; } echo '>'; echo '<div class="esg-cartbutton">'; echo '<a href="' . esc_url(WC()->cart->get_cart_url()) . '">'; echo '<i class="eg-icon-basket"></i><span class="ess-cart-content">'; echo WC()->cart->get_cart_contents_count(); echo __(' items - ', EG_TEXTDOMAIN); wc_cart_totals_subtotal_html(); echo '</span>'; echo '</a>'; echo '</div>'; //<a href="#"><div class="esg-sortbutton-order eg-icon-down-open tp-asc"></div></a> echo '</div><!-- END OF CART BUTTON -->'; }
$order_total_fix = __( 'Order Total', 'yit' ); } ?> <div class="span6 cart_totals <?php if ( WC()->customer->has_calculated_shipping() ) echo 'calculated_shipping'; ?>"> <div class="border-1 border"> <div class="border-2 border"> <?php do_action( 'woocommerce_before_cart_totals' ); ?> <h2><?php echo $cart_tatals_fix; ?></h2> <table align="right" cellspacing="0" cellpadding="0"> <tbody> <tr class="cart-subtotal"> <th><strong><?php echo $cart_subtotal; ?></strong></th> <td><strong><?php wc_cart_totals_subtotal_html(); ?></strong></td> </tr> <?php foreach ( WC()->cart->get_coupons( 'cart' ) as $code => $coupon ) : ?> <tr class="discount coupon-<?php echo esc_attr( $code ); ?>"> <th><?php echo $fix_coupon; ?> <?php echo esc_html( $code ); ?></th> <td><?php wc_cart_totals_coupon_html( $coupon ); ?></td> </tr> <?php endforeach; ?> <?php if ( WC()->cart->needs_shipping() && WC()->cart->show_shipping() ) : ?> <?php do_action( 'woocommerce_cart_totals_before_shipping' ); ?> <?php wc_cart_totals_shipping_html(); ?>
/** * @deprecated */ function woocommerce_cart_totals_subtotal_html() { wc_cart_totals_subtotal_html(); }
?> <?php if ( ! $is_ajax ) : ?><div id="order_review"><?php endif; ?> <table class="shop_table"> <thead> <tr> <th class="product-name"><?php echo $fix_product; ?></th> <th class="product-quantity"><?php echo $fix_qty; ?></th> <th class="product-total"><?php echo $fix_totals; ?></th> </tr> </thead> <tfoot> <tr class="cart-subtotal"> <th><?php echo $cart_subtotal; ?></th> <td colspan="2"><?php wc_cart_totals_subtotal_html(); ?></td> </tr> <?php foreach ( WC()->cart->get_coupons( 'cart' ) as $code => $coupon ) : ?> <tr class="cart-discount coupon-<?php echo esc_attr( $code ); ?>"> <th ><?php echo $fix_coupon; ?> <?php echo esc_html( $code ); ?></th> <td colspan="2"><?php wc_cart_totals_coupon_html( $coupon ); ?></td> </tr> <?php endforeach; ?> <?php if ( WC()->cart->needs_shipping() && WC()->cart->show_shipping() ) : ?> <?php do_action( 'woocommerce_review_order_before_shipping' ); ?> <?php wc_cart_totals_shipping_html(); ?>
echo $cart_decimal; ?> </span> <?php if (strpos(get_option('woocommerce_currency_pos'), 'right') !== false) { ?> <span class="cart-subtotal-currency"><?php echo $cart_currency; ?> </span> <?php } ?> <?php } else { echo function_exists('wc_cart_totals_subtotal_html') ? wc_cart_totals_subtotal_html() : $woocommerce->cart->get_cart_subtotal(); } ?> </div> <?php if ($show_cart_widget == '1') { ?> <?php the_widget('YIT_Widget_Cart'); ?> <?php } ?> <?php }