Math Operators/Functions in Liquid

Knowledge Drop

Last Tested: Nov 29, 2017

Math filters in Liquid allow you to apply mathematical tasks in Looker.

Math filters can be linked and, as with any other filters, are applied in order of left to right. In the example below, minus is applied first, then times, and finally divided_by.
 

{{ product.compare_at_price | minus: product.price | times: 100.0 | divided_by: product.compare_at_price }}

Link to Shopify Doc

This content is subject to limited support.                

Version history
Last update:
‎04-05-2021 03:32 PM
Updated by: