Hey there,
Just having this error on a snip section of my collection page:
Liquid syntax error (sections/collection-template.liquid line 2): Expected end_of_string but found id in “{{product.compare_at_price and product.compare_at_price != product.price }}”
Code:
{% for product in collection.products %}
{% assign sale = product.compare_at_price and product.compare_at_price != product.price %}
{% assign sold_out = product.available %}
- {% if product.compare_at_price and product.compare_at_price != product.price %}
SALE
{% else if product.available == false %}
sold out
{%endif%}
{{ product.title }}
##### {{ product.price | money }}
{% unless product.available %}
**sold out**{% endunless %}
{% else %}
no matches
{% endfor %}
I’m trying assign this variable as a conditional statement. Am I missing something? Thanks!