dvharrison Posted March 29, 2010 Posted March 29, 2010 Hi all I have scoured through the add-ons but cannot find what I'm looking for, so I hope there is a simple solution. Basically I would like to just display the total number of items and the total costs in the shopping cart box (eg 3 items = £35.00). Please could someone advise how this can be achieved. I have a basic (term used loosely) knowledge of PHP but can follow patterns and am a quick learner. Any help will be gratefully received. Thanks in advance. Debbie Harrison
burt Posted March 29, 2010 Posted March 29, 2010 Add On NOT needed!! $cart->count_contents() gives you the number of items in the cart. $cart->show_total() gives the total value of items in the cart. You can then use $currencies->format to format the total value. and a sprintf with a typical osCommerce language define to make the language work as you want them to. Or, search google and you will find a tutorial that goes through this in detail!
dvharrison Posted March 31, 2010 Author Posted March 31, 2010 Thanks burt I googled it in the end and found http://www.oscmax.com/forums/oscmax-projects-discussion/8391-hack-shopping-cart-header.html which works after a bit of styling. The oscommerce.info support pages didn't work but it was written in 2005!! Debbie Harrison
Recommended Posts
Archived
This topic is now archived and is closed to further replies.