views:

19

answers:

2

hi,

I want to add a block with a shopping cart summary in my website.

T So I basically need to retrieve the shopping cart informations and display a brief summary of it. See picture: http://dl.dropbox.com/u/72686/cartSummary.png

How can I implement this ?

Of course, I still have a complete static page with the shopping cart items and full details. But I also want this small block with a small version of the shopping cart.

thanks

A: 

Ubercart has its own api for this kind of stuff, create a module with a block using hook_block, then use uc_cart_get_contents to get the cart's contents. This returns an array with all the information in your shopping cart, you can print it out with var_dump or var_export to see what you want from the array.

Rakward
A: 

There is a ugly, but a working solution (it can be easily customized with a simple CSS coding):

http://www.phpwebcommerce.com/

If you want, I can search for more fancier solutions?

Nikola
I forgot to mention (just added in the tags), I'm using Ubercart. So I need a solution for this Drupal module.
Patrick

related questions