Skip to content

Instantly share code, notes, and snippets.

View levinmejia's full-sized avatar

Levin Mejia levinmejia

View GitHub Profile
<head>
<script src="https://cdn.shopify.com/s/assets/external/app.js"></script>
<script type="text/javascript">
ShopifyApp.init({
apiKey: 'YOUR_APP_API_KEY',
<head>
<script src="https://cdn.shopify.com/s/assets/external/app.js"></script>
...
</head>
{% comment %}
Source: https://gist.github.com/carolineschnapp/9122054
If you are not on a collection page, do define which collection to use in the order form.
Use the following assign statement, replace 'your-collection-handle-here' with your collection handle.
{% assign collection = collections.your-collection-handle-here %}
Use the assign statement outside of this comment block at the top of your template.
{% endcomment %}
{% paginate collection.products by 100 %}
Input:
{% assign instructions = product.metafields.instructions %}
{% assign key = 'Dry' %}
<p>Drying instructions: {{ instructions.Dry }}.</p>
Output:
Input:
{% assign instructions = product.metafields.instructions %}
{% assign key = 'Wash' %}
<p>Washing instructions: {{ instructions.Wash }}.</p>
Output:
<header class="section-header text-center">
<h1>{{ 'cart.general.title' | t }}</h1>
</header>
<style>
body.template-cart h1 {
font-family: 'Helvetica Neue', Helvetica, sans-serif;
font-weight: 600;
font-size: 40px;
text-align: left;
{
"name": "Social media",
"settings": [
{
"type": "header",
"content": "Accounts"
},
{
"type": "text",
"id": "social_facebook_link",
<!-- /snippets/product-card.liquid -->
{% comment %}
The product card snippet is passed a liquid object, used in this file
as "product". The object is either "product" or "item", the latter if
it is from search results.
{% endcomment %}
<a href="{{ product.url | within: collection }}" class="product-card">
<div class="product-card__image-wrapper">