Responsive cart and cart totals tables. #9015
This commit is contained in:
parent
9ac43ec4d4
commit
c114489d5b
File diff suppressed because one or more lines are too long
|
@ -43,6 +43,13 @@
|
|||
content: attr(data-title) ': ';
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
&.product-remove,
|
||||
&.actions {
|
||||
&:before {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:nth-child(2n) {
|
||||
|
|
|
@ -30,7 +30,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_shipping_package_name', $shipping_name, $index, $package ) );
|
||||
?></th>
|
||||
<td>
|
||||
<td data-title="<?php echo wp_kses_post( apply_filters( 'woocommerce_shipping_package_name', $shipping_name, $index, $package ) ); ?>">
|
||||
<?php if ( empty( $available_methods ) ) : ?>
|
||||
|
||||
<?php if ( ( WC()->countries->get_states( WC()->customer->get_shipping_country() ) && ! WC()->customer->get_shipping_state() ) || ! WC()->customer->get_shipping_postcode() ) : ?>
|
||||
|
|
|
@ -26,17 +26,17 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
|
||||
<h2><?php _e( 'Cart Totals', 'woocommerce' ); ?></h2>
|
||||
|
||||
<table cellspacing="0">
|
||||
<table cellspacing="0" class="shop_table_responsive">
|
||||
|
||||
<tr class="cart-subtotal">
|
||||
<th><?php _e( 'Subtotal', 'woocommerce' ); ?></th>
|
||||
<td><?php wc_cart_totals_subtotal_html(); ?></td>
|
||||
<td data-title="<?php _e( 'Subtotal', 'woocommerce' ); ?>"><?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>
|
||||
<td><?php wc_cart_totals_coupon_html( $coupon ); ?></td>
|
||||
<td data-title="<?php wc_cart_totals_coupon_label( $coupon ); ?>"><?php wc_cart_totals_coupon_html( $coupon ); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
||||
|
@ -52,7 +52,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
|
||||
<tr class="shipping">
|
||||
<th><?php _e( 'Shipping', 'woocommerce' ); ?></th>
|
||||
<td><?php woocommerce_shipping_calculator(); ?></td>
|
||||
<td data-title="<?php _e( 'Shipping', 'woocommerce' ); ?>"><?php woocommerce_shipping_calculator(); ?></td>
|
||||
</tr>
|
||||
|
||||
<?php endif; ?>
|
||||
|
@ -60,7 +60,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<?php foreach ( WC()->cart->get_fees() as $fee ) : ?>
|
||||
<tr class="fee">
|
||||
<th><?php echo esc_html( $fee->name ); ?></th>
|
||||
<td><?php wc_cart_totals_fee_html( $fee ); ?></td>
|
||||
<td data-title="<?php echo esc_html( $fee->name ); ?>"><?php wc_cart_totals_fee_html( $fee ); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
||||
|
@ -69,13 +69,13 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<?php foreach ( WC()->cart->get_tax_totals() as $code => $tax ) : ?>
|
||||
<tr class="tax-rate tax-rate-<?php echo sanitize_title( $code ); ?>">
|
||||
<th><?php echo esc_html( $tax->label ); ?></th>
|
||||
<td><?php echo wp_kses_post( $tax->formatted_amount ); ?></td>
|
||||
<td data-title="<?php echo esc_html( $tax->label ); ?>"><?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>
|
||||
<td data-title="<?php echo esc_html( WC()->countries->tax_or_vat() ); ?>"><?php wc_cart_totals_taxes_total_html(); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
@ -84,7 +84,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
|
||||
<tr class="order-total">
|
||||
<th><?php _e( 'Total', 'woocommerce' ); ?></th>
|
||||
<td><?php wc_cart_totals_order_total_html(); ?></td>
|
||||
<td data-title="<?php _e( 'Total', 'woocommerce' ); ?>"><?php wc_cart_totals_order_total_html(); ?></td>
|
||||
</tr>
|
||||
|
||||
<?php do_action( 'woocommerce_cart_totals_after_order_total' ); ?>
|
||||
|
|
|
@ -27,7 +27,7 @@ do_action( 'woocommerce_before_cart' ); ?>
|
|||
|
||||
<?php do_action( 'woocommerce_before_cart_table' ); ?>
|
||||
|
||||
<table class="shop_table cart" cellspacing="0">
|
||||
<table class="shop_table shop_table_responsive cart" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="product-remove"> </th>
|
||||
|
|
Loading…
Reference in New Issue