Show calculate total when shipping is needed, but shipping is hidden.

Closes #7650
This commit is contained in:
Mike Jolley 2015-03-10 16:57:43 +00:00
parent 0ed3ce9023
commit 8554796c4b
7 changed files with 21 additions and 11 deletions

File diff suppressed because one or more lines are too long

View File

@ -1686,6 +1686,7 @@ p.demo_store {
border-left: 0;
border-right: 0;
padding: 6px 0;
line-height: 2em;
}
small {

View File

@ -1718,7 +1718,7 @@ abstract class WC_Abstract_Order {
if ( $subtotal = $this->get_subtotal_to_display( false, $tax_display ) ) {
$total_rows['cart_subtotal'] = array(
'label' => __( 'Cart Subtotal:', 'woocommerce' ),
'label' => __( 'Subtotal:', 'woocommerce' ),
'value' => $subtotal
);
}
@ -1791,7 +1791,7 @@ abstract class WC_Abstract_Order {
}
$total_rows['order_total'] = array(
'label' => __( 'Order Total:', 'woocommerce' ),
'label' => __( 'Total:', 'woocommerce' ),
'value' => $this->get_formatted_order_total()
);

View File

@ -157,6 +157,8 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
* Tweak - Allow wc_attribute_label to support product-level attribute names.
* Tweak - Added the option to not round the line total.
* Tweak - Improved coupon percent calculation for fixed discounts.
* Tweak - Show calculate total when shipping is needed, but shipping is hidden.
* Tweak - Cart total labels.
* Dev - API - reports/sales now also returns total refunds.
= 2.3.5 - 20/02/2015 =

View File

@ -10,7 +10,7 @@
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
exit;
}
?>
@ -19,7 +19,7 @@ if ( ! defined( 'ABSPATH' ) ) {
if ( $show_package_details ) {
printf( __( 'Shipping #%d', 'woocommerce' ), $index + 1 );
} else {
_e( 'Shipping and Handling', 'woocommerce' );
_e( 'Shipping', 'woocommerce' );
}
?></th>
<td>

View File

@ -4,11 +4,11 @@
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 2.3.0
* @version 2.3.6
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
exit;
}
?>
@ -21,7 +21,7 @@ if ( ! defined( 'ABSPATH' ) ) {
<table cellspacing="0">
<tr class="cart-subtotal">
<th><?php _e( 'Cart Subtotal', 'woocommerce' ); ?></th>
<th><?php _e( 'Subtotal', 'woocommerce' ); ?></th>
<td><?php wc_cart_totals_subtotal_html(); ?></td>
</tr>
@ -40,6 +40,13 @@ if ( ! defined( 'ABSPATH' ) ) {
<?php do_action( 'woocommerce_cart_totals_after_shipping' ); ?>
<?php elseif ( WC()->cart->needs_shipping() ) : ?>
<tr class="shipping">
<th><?php _e( 'Shipping', 'woocommerce' ); ?></th>
<td><?php woocommerce_shipping_calculator(); ?></td>
</tr>
<?php endif; ?>
<?php foreach ( WC()->cart->get_fees() as $fee ) : ?>
@ -68,7 +75,7 @@ if ( ! defined( 'ABSPATH' ) ) {
<?php do_action( 'woocommerce_cart_totals_before_order_total' ); ?>
<tr class="order-total">
<th><?php _e( 'Order Total', 'woocommerce' ); ?></th>
<th><?php _e( 'Total', 'woocommerce' ); ?></th>
<td><?php wc_cart_totals_order_total_html(); ?></td>
</tr>

View File

@ -47,7 +47,7 @@ if ( ! defined( 'ABSPATH' ) ) {
<tfoot>
<tr class="cart-subtotal">
<th><?php _e( 'Cart Subtotal', 'woocommerce' ); ?></th>
<th><?php _e( 'Subtotal', 'woocommerce' ); ?></th>
<td><?php wc_cart_totals_subtotal_html(); ?></td>
</tr>
@ -94,7 +94,7 @@ if ( ! defined( 'ABSPATH' ) ) {
<?php do_action( 'woocommerce_review_order_before_order_total' ); ?>
<tr class="order-total">
<th><?php _e( 'Order Total', 'woocommerce' ); ?></th>
<th><?php _e( 'Total', 'woocommerce' ); ?></th>
<td><?php wc_cart_totals_order_total_html(); ?></td>
</tr>