I have used the following code to accomplish this…
PHP:
$cart_data = wpdmpp_get_cart_data();
if($cart_data[4]['quantity'] >= 1){
$cart_qty = $cart_data[4]['quantity'];
}else{
$cart_qty = 0;
}
Script:
jQuery(function($) {
$(document).ready(function() {
$('.cart-nav span').text('<?php echo($cart_qty); ?>')
});
});
And in my menu navigation link to the shopping cart I simply put <span>
tags around a 0 for default. I would like a better way of doing this if possible.