FROM CACHE - en_header

How to see how many collections are in a cart?

7 0 0

I would like to disable my checkout button if there is products from more than 1 collection in the cart.

this is a pseudo code of what I am looking for, but i couldn't find out you specifically count the number of collections in a cart. I am not very proficient with liquid, and despite using I could not figure it out

I want to: 

- create variable for Set of the collections

- iterate through the items in the cart

-add the collection of the item to the Set

-If there is >1 collection in the set, disable the button

Replies 0 (0)