Calculation cart total

Bit of a different one, I need to filter the cart and calculate the figures with the filter on.
I have tried:

{{cart.data.where(`instock`, 1, '==').sum(`sell` * `qty`)}}

but this just gives me a 0
I am assuming that I have done something wrong here, can anyone please help ?

Worked it out :slight_smile:

{{cart.data.where(`instock`, 1, '==').sum('(sell*qty)')}}

When pasting code in your posts please follow this guide and format it properly:

ooop’s sorry, just altered it :slight_smile:

Actually you didn’t format it as explained in the article. You formatted your code as a quote …

ok I’ll have a read when I get 2 mins…you need beer :wink: