A Pen by Captain Anonymous on CodePen.
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
# -- Collection many to many Pages -- | |
# templates/collection.liquid | |
<div data-relatable="collection.pages" data-relatable-id="{{collection.id}}"> | |
{% raw %} | |
{{#pages}} | |
<a href="/pages/{{handle}}">{{title}}</a> | |
{{/pages}} | |
{% endraw %} | |
</div> |
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
{% comment %} templates/page.liquid {% endcomment %} | |
<div data-relatable="page.collections" data-relatable-id="{{page.id}}"> | |
{% raw %} | |
{{#collections}} | |
<a href="/collections/{{handle}}">{{title}}</a> | |
{{/collections}} | |
{% endraw %} | |
</div> |
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
module.exports = function(grunt) { | |
// The order of JS files that get loaded | |
var build_files = ['scripts/app/app.js', | |
'scripts/lib/*.js', | |
'scripts/models/*.js', | |
'scripts/plugins/*.js', | |
'scripts/controllers/*.js' | |
]; | |
// Project configuration. |
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
<script> | |
Shopify.currentProduct = {{ product | json }}; | |
if (Shopify.currentProduct) { | |
console.log(Shopify.currentProduct.variants); | |
} | |
</script> |
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
<html> | |
<head> | |
{{ content_for_header }} | |
{% include 'head' %} | |
</head> | |
<body> | |
{% include 'header' %} | |
<main id="main"> | |
{{ content_for_layout }} | |
</main> |
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
{% layout none %} | |
{% paginate search.results by 50 %} | |
{ | |
"results": {{ search.results | json }} | |
} | |
{% endpaginate %} |
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
$.getJSON('/search?q=shirt&view=json', function(response) { | |
console.log(response) | |
}); |
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
{% layout none %} | |
{ | |
"first_name": "{{customer.first_name}}", | |
"last_name": "{{customer.last_name}}", | |
"email": "{{customer.email}}", | |
"id": {{customer.id}}, | |
"name": "{{customer.name}}", | |
"orders_count": {{customer.orders_count}} | |
} |
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
var Customr = { | |
baseUrl: "https://customr.heliumdev.com", | |
{% if customer %} | |
shopifyCustomer: { | |
id: {{ customer.id }}, | |
token: {{ customer.metafields.customr_auth.token | json }} | |
}, | |
{% endif %} | |
ready: function() { | |
// Fires when all the proper data has been loaded in |
OlderNewer