Cart ID?

Hi, I am trying to figure out how to access or create a unique cart ID for each cart created by a user. Is there already a cart ID available somewhere that I can use?



Thanks in advance.

[quote name=‘donnen’]Hi, I am trying to figure out how to access or create a unique cart ID for each cart created by a user. Is there already a cart ID available somewhere that I can use?



Thanks in advance.[/quote]



I don’t know what your trying to do but you can use the template debugger to get a list of variables used - Sno

Each cart does have a unique ID. If you create an addon that uses any hook with the $cart variable, you can get the ID. Each product in the cart has a unique ID as well.

Enable the smarty debugger and when you are in Cart page you will see

in {$CART} an array of groups-products.

Somewhere there is what you need!

Thanks for the replies guys. I am using the debugger. I must be missing something because I don’t see a cart ID. That is why I asked the question. :slight_smile:



I see the products, the user data and some other fields but not a unique ID. If there is a cart ID, what is the name of the field?