Wednesday 18 September 2013

Show cart contents or total items on Woocommerce (Wordpress)

Show cart contents or total items on Woocommerce (Wordpress)
// To display the cart contents and total in your template use something like:
// To ajaxify your cart viewer so it updates when an item is added (via ajax) use:
global $woocommerce; 

echo '< a class="cart-contents" href="http://www.blogger.com/'.$woocommerce-%3Ecart-%3Eget_cart_url().'" 
title="'. _e('View your shopping cart', 'woothemes').'" >'. sprintf(_n('%d item', '%d items',
$woocommerce->cart->cart_contents_count, 'woothemes'), $woocommerce->cart->cart_contents_count)
.' - '. $woocommerce->cart->get_cart_total().'< /a>
- How to use WooCommerce without a Products Page
- Express Lane Shopping: Improving the WooCommerce add to cart button

No comments:

Post a Comment

Please post any queries and comments here.