Skip to content

Instantly share code, notes, and snippets.

@svaustin66
Created December 6, 2021 00:13
Show Gist options
  • Save svaustin66/60e2e73118b1bb3578ec39091e1f18cd to your computer and use it in GitHub Desktop.
Save svaustin66/60e2e73118b1bb3578ec39091e1f18cd to your computer and use it in GitHub Desktop.
Liquid code for the subscription template to check customer has correct tag
{% if customer.tags contains 'Active Subscriber' %}
<main id="template-{{ template | replace: '.', '-' | handle }}" class="shopify-section article-page" data-check-for-order="true">
{% section 'article__banner' %}
<section class="section__wrapper
section
">
<div class="container">
{% section 'article__sidebar' %}
{% section 'article__main' %}
</div>
</section>
</main>
{% else %}
<main id="template-{{ template | replace: '.', '-' | handle }}" class="shopify-section default-page">
<section class="section__wrapper
section
is-width-standard
">
<div class="container page__container has-padding-top">
{% render 'heading',
title: "Access not authorized",
heading_tag: 'h1',
context: 'page',
text_alignment: 'center'
%}
</div>
<div class="page__content content container">
{% render 'page-multi-column', content: pages.subscription-required.content %}
</div>
</section>
</main>
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment