getting/displaying the count of unique items in cart?

GeoffreyGeoffrey Member
in Help edited April 2013
Hi guys. I know that it's pretty easy to retrieve the number of products in a customer's cart by referencing "product_count" in the fc_json object. But I've noticed that "product_count" displays the combined quantity count of all unique products in the cart, like so:

Product 1 - quantity: 5
Product 2 - quantity: 1
Product 3 - quantity: 7
"product_count" = 13

I have a use case where I would want instead to retrieve and display the current number of unique products in a customer's cart, like so:

Product 1 - quantity: 5
Product 2 - quantity: 1
Product 3 - quantity: 7
products in cart = 3

What would be the easiest way of going about this? Any help would be greatly appreciated. Thanks!

Comments
Sign In or Register to comment.