tirpitz Posted March 6, 2011 Share Posted March 6, 2011 hello how can I get the count of products in the cart of a user. i would like to show Cart (1) like this on the site. tirpitz 0 Quote Link to comment Share on other sites More sharing options...
jeremyhaber Posted March 6, 2011 Share Posted March 6, 2011 That's easily doable! Place this into the template file where you want the number to show: {php} $cartCount = count($_SESSION["cart"]["products"])+count($_SESSION["cart"]["domains"]); if ($cartCount) echo "(".$cartCount.")"; {/php} 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.