Hi, I’m trying to create a nutrient value table that automatically calculates the nutrient reference values in %. When I add the code, it shows me the following liquid syntax error:
"Expected dotdot but found pipe in “{{ (product.metafields.custom.energie | divided_by: energie_ref | times: 100) | round: 2 }}”
Can anyone make sense of this? Thanks in advance for the help!!
Here’s a part of the full code I’m trying to add, just in case this might be useful for troubleshooting:
{% assign energie_ref = 2000 %}
{% if product.metafields.custom.energie %}
{% assign has_nutrition_info = true %}
Energie
{{ product.metafields.custom.energie }} kcal
{{ (product.metafields.custom.energie | divided_by: energie_ref | times: 100) | round: 2 }}%
{% endif %}