Skip to content

Instantly share code, notes, and snippets.

@bogdan
Created April 23, 2015 15:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bogdan/02e0c98f0302354df15e to your computer and use it in GitHub Desktop.
Save bogdan/02e0c98f0302354df15e to your computer and use it in GitHub Desktop.
{% assign status = false %}
{% for code in friend_origin.coupon_codes %}
{% assign code_first_part = code | slice: 0, 4 %}
{% if code_first_part == "7XUB" %}
{% assign status = true %}
{% endif %}
{% endfor %}
{% if advocate_info.referrals_count <= 10 %}
{% if is_new_customer %}
{% if status == true or friend_origin.subtotal >= 10 %}
true
{% else %}
Coupon code not used and subtotal is less than 10
{% endif %}
{% else %}
Not new customer
{% endif %}
{% else %}
More than 10 referrals
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment