Ok, I'm getting pretty crazy here. I'm trying to remove a variant from the cart. Adding works fine, like this:
<input type="hidden" name="purchasableId" value="{{ variant.id }}" id="{{ variant.sku }}">
<input type="submit">
(variant is an item from product.variants)
However, when I want to remove an item, I do it like this:
<input type="hidden" name="lineItems[{{ variant.id }}][qty]" value="0">
<input type="submit">
But nothing gets removed. The weird thing is, when I query for lineItems, there's an item with the id "92". The id from the variant is 19874
. So that's the id I use in the hidden qty field. I have absolutely no idea where this 92
comes from. It is not the variant id. It's alo snot the product id. I don't know what it is. What am I doing wrong here?