Liquid syntax error: Error in tag 'section' - Valid syntax: section '[type]'

tandjscents
Tourist
7 0 3

Hi everyone,

 

Don't know if you can help. I am trying to create a collection where only my subscribed members can view. I don't want to download an app as they are paid. I have found this code:

 

{% if customer.tags contains ‘vip’ %}
{% section ‘collection’ %}
{% else %}
{{ pages.no-access.content }}
{% endif %}

 

but I keep getting this error when saving:

 

Liquid syntax error: Error in tag 'section' - Valid syntax: section '[type]'

 

Any ideas on how to fix this, I'm not a coder, so please be gentle on me :D

 

Josh

0 Likes
tandjscents
Tourist
7 0 3

Ignore the above, I have figured this out now. However, my tagged customers still cant view the page. Any ideas?

0 Likes
tandjscents
Tourist
7 0 3

All solved.

 

had to change the commas.

 

 

dmwwebartisan
Shopify Partner
4534 1019 1317

Hey there,

 

Do you have collection.liquid in your sections folder ?

 

If not exists then please create new one OR check what section liquid file you would like to display with and name correct there.

 

Thanks!

If helpful then please Like and Accept Solution.
Email: dmw.webartisan@gmail.com | Instagram: @dmw.webartisan
Advanced Shopify Page Builder to customize your pages - check here PageFly App
0 Likes
juliewitmermaps
Excursionist
30 0 3

Hi,

I'm trying to set up this exact same code. How did you solve it? Where are the commas that you changed?

0 Likes
L9OBL
New Member
1 0 0

It wasnt commas, he's talking about the apostrophe's used in the code, you can see theyre kind of stylized, just replace them with regular apostrophes on the first and second line.

0 Likes
gnlweirdness
New Member
3 0 1

so I am using this same code, it was working fine. i.e. showing the no access page to those without tags, only showing product for those with tags. 

But now for some reason it is showing both the no access page and the product to anyone with the collection page link.

ANY ideas?

0 Likes