Liquid Templating for Affiliate Page

Chris ChangChris Chang
1 min read
 {% for tag in product.tags %}
  {% if tag contains 'affiliate' %}
    {% assign isAffiliateProduct = true %}
    {% assign affiliateLink = tag | split: '_' | last %}
  {% endif %}
 {% endfor %}

{% unless isAffiliateProduct %}
//Code Base
{% endunless %}
0
Subscribe to my newsletter

Read articles from Chris Chang directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Chris Chang
Chris Chang

I am a developer from NY / NJ