Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Shopping cart Overview - How?


dvharrison

Recommended Posts

Posted

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

 

Posted

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!

Archived

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

×
×
  • Create New...