Last active
October 11, 2017 14:45
-
-
Save boldsupport/2b3b3b0d3e1ba83f47b98f099c5508e1 to your computer and use it in GitHub Desktop.
Loyalty Points liquid file linked from: https://support.boldcommerce.com/hc/en-us/articles/209762003-Loyalty-Points-Install-Instructions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if shop.metafields.bold_loyalties.active == 1 and shop.metafields.bold_loyalties.callout_type == 'full_width'%} | |
<div class="bold-loyalties-callout"> | |
{% if customer %} | |
{% else %} | |
{{ shop.metafields.bold_loyalties.callout_loggedout_text }} | |
{% endif %} | |
<a class="bold-loyalties-close" href="#"> Close</a> | |
</div> | |
{% endif %} | |
{% if shop.metafields.bold_loyalties.active == 1 and shop.metafields.bold_loyalties.callout_type == 'tab'%} | |
<div class="bold-loyalties-callout-tab"> | |
{% if customer %} | |
<a href="/account">{{ shop.metafields.bold_loyalties.name }}</a> | |
{% else %} | |
{% if shop.metafields.bold_loyalties.details_url %} | |
<a href="{{shop.metafields.bold_loyalties.details_url}}">{{shop.metafields.bold_loyalties.name}}</a> | |
{% else %} | |
{{ shop.metafields.bold_loyalties.name | customer_register_link }} | |
{% endif %} | |
{% endif %} | |
</div> | |
{% endif %} | |
{% if shop.metafields.bold_loyalties.active == 1 %} | |
<style> | |
@import url('//shappify-cdn.com/loyalties/{{shop.domain}}-callout.css'); | |
</style> | |
<script> | |
var BoldApps = BoldApps || {}; | |
BoldApps.Loyalties = BoldApps.Loyalties || {}; | |
BoldApps.Loyalties.CalloutSettings = { | |
fade_out_after: '{{ shop.metafields.bold_loyalties.callout_fade_out_after }}' | |
}; | |
{% if customer %} | |
BoldApps.Loyalties.customer = { | |
email:'{{ customer.email}}', | |
id:{{ customer.id}}, | |
uuid: '{{ customer.metafields.bold_loyalties.uuid }}' | |
}; | |
BoldApps.Loyalties.customer.metafields = {{ customer.metafields.bold_loyalties | json }} | |
{% endif %} | |
BoldApps.Loyalties.shop = { | |
domain:'{{shop.domain}}', | |
permanent_domain: '{{shop.permanent_domain}}', | |
url:'{{shop.url}}', | |
metafields: {{ shop.metafields.bold_loyalties | json }} | |
}; | |
</script> | |
<script src="//loy.boldapps.net/front_end/callout_js"></script> | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment