0
votes

Right Now this filter works:

{{ line_item.price | times: 2 | money }}

I want to able to filter by a variable, something like:

{{ line_item.price | times: {{ line_item.quantity }} | money }}

Is there any way to do this?

Thanks

1
Have you tried taking off the {{ }} on the line_item.quantity? If I recall it is a number so it should work. Try this {{ line_item.price | times: line_item.quantity | money }}Jurgen Feuchter
@JurgenFeuchter actually yes, this did the trick, thanks for the tip. If you want you can answer the question so I can choose this as the correct answer.edu222

1 Answers

1
votes

Have you tried taking off the {{ }} on the line_item.quantity? If I recall it is a number so it should work.

Try this:

{{ line_item.price | times: line_item.quantity | money }}