I would like to know the best way to capture the amount of items in the Woocommerce carton in Wordpress, if there is any shortcode, etc.
I would like to know the best way to capture the amount of items in the Woocommerce carton in Wordpress, if there is any shortcode, etc.
To show in your template the total use this:
<?php
global $woocommerce;
$numero = sprintf(_n('%d', $woocommerce->cart->cart_contents_count, 'woothemes'));
echo $numero;
?>