Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

How to display number of ?


Recommended Posts

What is the PHP code to show the number of items you currently have in the cart. I don't want to use the styled inside the shopping cart infobox. I'm looking for just a plain old text number that shows up with nothing else. If the cart is empty then it should show 0.


Any help would be greatly appreciated !

Link to comment
Share on other sites

search for contribution as I have seen one.

Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!

8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.

Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.

Any issues with oscommerce, I am here to help you.

Link to comment
Share on other sites

Try this


Click Me


I want to thank everyone for their replies. Especially the link above. I was able to use it to figure out the correct syntax to use. See below...



echo $cart->count_contents();



This message board is always a HUGE help for me when developing websites. Thanks again everyone !

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...