@classmethod<EOL><INDENT>def pre_filter(self, queryset, user):<DEDENT>
in_user_carts = Q(<EOL>enabling_category__product__productitem__cart__user=user<EOL>)<EOL>released = commerce.Cart.STATUS_RELEASED<EOL>in_released_carts = Q(<EOL>enabling_category__product__productitem__cart__status=released<EOL>)<EOL>queryset = queryset.filter(in_user_carts)<EOL>queryset = queryset.exclude(in_released_carts)<EOL>return queryset<EOL>
Returns all of the items from queryset where the user has a
        product from a category invoking that item's condition in one of their
        carts.