Skip to content

Instantly share code, notes, and snippets.

View charlesemarsh's full-sized avatar

Charles Marsh charlesemarsh

  • Shopify Expert
  • Cambridge, UK
View GitHub Profile
@charlesemarsh
charlesemarsh / en-collectplus.json
Created April 25, 2018 10:20
CollectPlus locale file
{
"general": {
"meta": {
"tags": "Tagged \"{{ tags }}\"",
"page": "Page {{ page }}"
},
"404": {
"title": "Page Not Found",
"subtext": "The page you requested does not exist anymore. Sorry about that.",
"visit_homepage": "Visit our homepage"
@charlesemarsh
charlesemarsh / collectplus-header-snippet.liquid
Created April 25, 2018 10:05
CollectPlus Header Include Snippet
{% include 'collectplus-header-snippet' %}
{% if template == 'cart' and cart.total_weight < 10000 %}
<script type="text/javascript">
var CollectPlusData = {
shopify_domain: '{{ shop.permanent_domain }}',
settings: '{{ shop.metafields.collectplus.settings }}'
};
var CollectPlusSettings = JSON.parse(CollectPlusData['settings'])
</script>
{% capture settings_data %}{{ shop.metafields.collectplus.settings }}{% endcapture %}
$light-border-color: #DDDDDD;
$text-color: #000000;
$primary-color: #000000;
$button-text-color: #FFFFFF;
$content-background-color: #FFFFFF;
$tab-background-color: #FFFFFF;
$button-radius: 3px;
$question_mark_bg_colour: #000000;
$question_mark_text_colour: #FFFFFF;
$postcode-input-bg-colour: #F1F1F1;
{% for attribute in order.attributes %}
{% if attribute.last contains 'CollectPlus' %}
{% assign collect_plus = true %}
{% endif %}
{% if attribute.first contains 'collectplus_site_name' %}
{% assign collectplus_site_name = attribute.last %}
{% endif %}
{% if attribute.first contains 'collectplus_address' %}
{% assign collectplus_address = attribute.last %}
{% endif %}
{% for attribute in order.attributes %} {% if attribute.last contains 'Collect+' %}{% assign collect_plus = true %}{% endif %}{% endfor %}{% if collect_plus %}Collect+ are delivering to your store{% else %}A shipment from order {{ name }} is on the way{% endif %}