Skip to content

Instantly share code, notes, and snippets.

View andrewwise's full-sized avatar

Andrew Wise andrewwise

View GitHub Profile
@ADTC
ADTC / reorder-button.html
Last active September 29, 2023 15:04 — forked from magician11/reorder-button.html
How to create a reorder button in Shopify's Liquid
{% for order in customer.orders %}
...
{% liquid
assign reorder_url = ''
for line_item in order.line_items
assign reorder_url = reorder_url | append: line_item.variant_id | append: ':' | append: line_item.quantity | append: ','
endfor
-%}
@narze
narze / gh-add-repos-to-team.sh
Created July 22, 2022 08:33
Add repos to team with gh
#!/bin/bash
PERMISSION="push" # Can be one of: pull, push, admin, maintain, triage
ORG="orgname"
TEAM_SLUG="your-team-slug"
# Get names with `gh repo list orgname`
REPOS=(
"orgname/reponame"
)
@atikju
atikju / Additional Scripts.liquid
Created April 24, 2021 10:20
Install Facebook Pixel on Shopify Manually
{% comment %}
Paste these codes in the additional scripts box. Settings > Checkout > Additional Scripts
{% endcomment %}
{% if first_time_accessed %}
{% assign ordered_products = '' %}
{% assign ordered_product_ids = '' %}
{% assign totalItems = line_items.size %}
{% for lineItem in line_items %}
@bakura10
bakura10 / microdata-schema.liquid
Last active July 21, 2025 07:34
This is the last microdata-schema for our Shopify themes
{%- comment -%}
This snippet structures the micro-data using JSON-LD specification. Please note that for Product especially,
the schema often changes. We try to output as much info as possible, but Google may add new requirements over time,
or change the format of some info
LAST UPDATE: May 10th 2023 (we added the "hasMerchantReturnPolicy" and "shippingDetails" to include the shipping and
return policy if they have been specified as store policies).
{%- endcomment -%}
{%- if request.page_type == 'product' -%}
@rokobuljan
rokobuljan / README.md
Created August 1, 2019 10:33
Automate Build Dist on Commit

Build-add

Build your /dist files on git commit!
How it works, if changes (diff) are detected in the staging area for a specific folder (i.e: /src), build-add.sh will trigger npm run build and add the new/modified build files to that commit on-the-fly.

Prerequisites:

npm i -D pre-commit

Configuration:

@jhjguxin
jhjguxin / creating-nested-resources-in-ruby-on-rails-3-and-updating-scaffolding-links-and-redirection.markdown
Created July 9, 2012 03:32
Creating nested resources in ruby on rails 3 and updating scaffolding links and redirection