What's your biggest current challenge? Have your say in Community Polls along the right column.

Re: Help with Error Message: Liquid syntax error

Solved

Help with Error Message: Liquid syntax error

freewheeling
Excursionist
18 1 1

Hello,

 

I am trying to figure out how to figure out this error message when trying to implement this fix.

 

Error Message: (see below)

Unable to update the file
  • Liquid syntax error (line 6): Unexpected character = in "recommendations.intent = 'related'"

 

 

Code from Step 5 for Adding Product Recommendations to Debut theme
https://help.shopify.com/en/manual/online-store/themes/themes-by-shopify/vintage-themes/customizing-...

 

 

Let me know if you have any questions?

 

Thanks a bunch!

Jennifer

Accepted Solution (1)

EBOOST
Shopify Partner
1253 324 373

This is an accepted solution.

Hi @freewheeling 

It should be code below: missing one "="

{% if recommendations.intent == 'related' %}

You can refer document for Operators in liquid  here https://shopify.github.io/liquid/basics/operators/

And you should be update

{% elsif recommendations.intent = 'complementary' %}

to code below as well

{% elsif recommendations.intent == 'complementary' %}

Hope can help

If you find my reply helpful, please hit Like and Mark as Solution

EBOOST

- Hope can help. If you find my reply helpful, please hit Like and Mark as Solution
- Need a Shopify developer? Contact email: eboost10@gmail.com
- Visit our site: https://www.eboosttech.net to view and download shopify themes and magento2 extensions free
- ❤❤DONATE ❤❤Coffee tips

View solution in original post

Replies 2 (2)

EBOOST
Shopify Partner
1253 324 373

This is an accepted solution.

Hi @freewheeling 

It should be code below: missing one "="

{% if recommendations.intent == 'related' %}

You can refer document for Operators in liquid  here https://shopify.github.io/liquid/basics/operators/

And you should be update

{% elsif recommendations.intent = 'complementary' %}

to code below as well

{% elsif recommendations.intent == 'complementary' %}

Hope can help

If you find my reply helpful, please hit Like and Mark as Solution

EBOOST

- Hope can help. If you find my reply helpful, please hit Like and Mark as Solution
- Need a Shopify developer? Contact email: eboost10@gmail.com
- Visit our site: https://www.eboosttech.net to view and download shopify themes and magento2 extensions free
- ❤❤DONATE ❤❤Coffee tips
freewheeling
Excursionist
18 1 1

Thank you so much! That removed the error message 🙂