Exemple #1
1
			</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(); ?>

			<?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 ) : ?>
			<tr class="fee">
				<th><?php echo esc_html( $fee->name ); ?></th>
				<td><?php wc_cart_totals_fee_html( $fee ); ?></td>
			</tr>
		<?php endforeach; ?>

		<?php if ( WC()->cart->tax_display_cart == 'excl' ) : ?>
			<?php if ( get_option( 'woocommerce_tax_total_display' ) == 'itemized' ) : ?>
				<?php foreach ( WC()->cart->get_tax_totals() as $code => $tax ) : ?>
					<tr class="tax-rate tax-rate-<?php echo sanitize_title( $code ); ?>">
Exemple #2
0
		<?php 
do_action('woocommerce_after_cart_contents');
?>
	</tbody>
</table>

<?php 
do_action('woocommerce_after_cart_table');
?>

</form>

<div class="cart-collaterals">

	<?php 
do_action('woocommerce_cart_collaterals');
?>

	<?php 
woocommerce_cart_totals();
?>

	<?php 
woocommerce_shipping_calculator();
?>

</div>

<?php 
do_action('woocommerce_after_cart');
function mango_shipping_calculator()
{
    $cart_ver = mango_cart_version();
    if (WC()->cart->needs_shipping()) {
        if ($cart_ver == "v_1") {
            ?>
            <div class="col-md-6">
        <?php 
        }
        ?>
        <h4 class="title-border-tb"><?php 
        _e("Get shipping Estimates", 'mango');
        ?>
 </h4>
        <?php 
        if (WC()->cart->needs_shipping() && WC()->cart->show_shipping()) {
            ?>
            <?php 
            do_action('woocommerce_cart_totals_before_shipping');
            ?>
            <?php 
            wc_cart_totals_shipping_html();
            ?>
            <?php 
            do_action('woocommerce_cart_totals_after_shipping');
            ?>
        <?php 
        } elseif (WC()->cart->needs_shipping()) {
            ?>
            <?php 
            woocommerce_shipping_calculator();
            ?>
        <?php 
        }
        if ($cart_ver == "v_1") {
            ?>
            </div>
        <?php 
        }
    }
}