How to display number of item in cart and cart total amount?

In this tutorial we’ll learn how to display number of items in cart and cart total. This can be done easily with the help of following lines of code. <?php global $woocommerce; ?> <a class=”cart-contents” href=”<?php echo $woocommerce->cart->get_cart_url(); ?>” title=”<?php _e(‘View your shopping cart’, ‘woothemes’); ?>”> <?php echo sprintf(_n(‘%d item’, ‘%d items’, $woocommerce->cart->cart_contents_count, ‘woothemes’), $woocommerce->cart->cart_contents_count);?> […]

Read More