HOW TO: show number of products in cart
Buy Gary A Beer?
Buying me a "beer" helps me to keep my contributions updated and keep this blog alive - and you get a link from my homepage to your site. Cheers!
Shwoing the number of products in osCommerce cart is very simple;
This will show the total number of items in a persons cart.
You can go further with this and say something like;
But this will not be grammatically correct if only 1 item is in the cart, In this case we say;
Now the code will determine whether to say "item" or "items" depending upon the number of items in the cart.
ENJOY!



When I attempt to create an acount I get the following error:
1054 – Unknown column 's.public_flag' in 'where clause'
select count(*) as total from orders o, orders_status s where o.customers_id = '866' and o.orders_status = s.orders_status_id and s.language_id = '1' and s.public_flag = '1'
[TEP STOP]
Any thoughts?
Comment by Rick — June 29, 2008 @ 7:05 am
Rick – http://svn.oscommerce.com/jira/browse/OSC-495
Comment by Gary — June 29, 2008 @ 8:12 am
Great easy tip!
Comment by Keith — April 1, 2009 @ 6:25 pm