Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Custom Shopping Cart


Recommended Posts

hi guys


i really need some help ASAP with this.


Standard shopping cart info box being displayed in the top right corner of my site and i want that instead of showing a new line with


ProductA x1 £34.43

ProductB x1 £xx.xx


etc etc i want it to just display one line that basically says: You have 2 items in your cart.

Instead of listing them, just tell me the amount instead.


Any help please would be MUCH appreciated as im in a rush to get this working thanks.

you can see the shopping cart here http://knickerbokerglory.co.uk

Link to comment
Share on other sites

thx, but not really what i was after.


in my shopping_cart.php file in /boxes at the end i have the following code:


if ($cart->count_contents() > 0) {

$info_box_contents[] = array('text' => tep_draw_separator());

$info_box_contents[] = array('align' => 'right');

$info_box_contents[] = array('text' => $currencies->format($cart->show_total()));


i believe what i need is something to replace the text in bold which at the moment displays the total amount displayed in the currency im using (£).

What i need is some code to replace that, and show number of items instead of total price.



Link to comment
Share on other sites

right in front of my eyes the whole time,,,thanks to one of my mates for makin it clear (what a dumbass i couldnt see it)


$info_box_contents[] = array('text' => $cart->count_contents()); <-- is what i needed

Link to comment
Share on other sites

so glad you worked it out

and I am even happier that you posted how you worked it out! Now if I ever need to, I can use your simple fix (that I would never have come up with on my own)! Thankyou.


Link to comment
Share on other sites


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

  • Create New...