Skip to content

Instantly share code, notes, and snippets.

Avatar

John Carbone carbone

View GitHub Profile
@carbone
carbone / locations.liquid
Last active Mar 15, 2019
Use in combination with Mr. Arigato https://apps.shopify.com/mr-arigato-task-automator to show stock by location in a Shopify theme. See also: https://apps.bonify.io/mr-arigato-task-automator-for-shopify "Set Variant Inventory Level Metafield by Location ID (SKU required)"
View locations.liquid
{% assign loc = shop.metafields.custom_fields["locations"] | split: "|" %}
{% if loc != blank %}
<h3>Available at the following locations</h3>
<table>
{% for info in loc %}
{% assign table_item = info | split: '='%}
{% assign location_id = table_item[0] %}
{% assign location_name = table_item[1] %}
<td colspan="2"><strong>{{ location_name }}</strong></td>
{% for variant in product.variants %}
@carbone
carbone / gist:5f6cd3ab0403b82e8d11
Created Jul 25, 2014
Roles Example for QUI Module (referenced in documentation)
View gist:5f6cd3ab0403b82e8d11
Tzo5OiJRdWlSZXBvcnQiOjE1OntzOjI6ImlkIjtzOjE6IjMiO3M6NToicXVlcnkiO086ODoic3RkQ2xhc3MiOjExOntzOjg6ImRhdGFiYXNlIjtzOjc6ImRlZmF1bHQiO3M6MTI6InNlbGVjdF90YWJsZSI7czo1OiJ1c2VycyI7czoxMToiZXhwcmVzc2lvbnMiO2E6MTp7aToxO2E6Mzp7czo1OiJhbGlhcyI7czo1OiJyb2xlcyI7czo1OiJ2YWx1ZSI7czoyMzoiR1JPVVBfQ09OQ0FUKHJvbGUubmFtZSkiO3M6MTc6ImRlbGV0ZV9leHByZXNzaW9uIjtzOjY6IkRlbGV0ZSI7fX1zOjEwOiJjb25kaXRpb25zIjthOjA6e31zOjU6ImpvaW5zIjthOjI6e2k6MTthOjY6e3M6OToiam9pbl9uYW1lIjtzOjk6IkxlZnQgSm9pbiI7czo5OiJqb2luX3R5cGUiO3M6NDoibGVmdCI7czo1OiJ0YWJsZSI7czoxMToidXNlcnNfcm9sZXMiO3M6ODoibGVmdF9jb2wiO3M6OToidXNlcnMudWlkIjtzOjk6InJpZ2h0X2NvbCI7czoxNToidXNlcnNfcm9sZXMudWlkIjtzOjExOiJkZWxldGVfam9pbiI7czo2OiJEZWxldGUiO31pOjI7YTo2OntzOjk6ImpvaW5fbmFtZSI7czoxMDoiSW5uZXIgSm9pbiI7czo5OiJqb2luX3R5cGUiO3M6NToiaW5uZXIiO3M6NToidGFibGUiO3M6NDoicm9sZSI7czo4OiJsZWZ0X2NvbCI7czo4OiJyb2xlLnJpZCI7czo5OiJyaWdodF9jb2wiO3M6MTU6InVzZXJzX3JvbGVzLnJpZCI7czoxMToiZGVsZXRlX2pvaW4iO3M6NjoiRGVsZXRlIjt9fXM6NzoiZ3JvdXBieSI7czo5OiJ1c2Vycy51aWQiO3M6NToicmFuZ2UiO086ODoic3RkQ2xhc3MiOjI6
@carbone
carbone / gist:aae6f468623e0c7735fd
Last active Aug 29, 2015
Installing jekyll on OSX Mavericks with Xcode 5.1
View gist:aae6f468623e0c7735fd
###### When trying to install Jekyll with Xcode 5.1 I was getting the following error. ######
Foo:~ john$ gem install jekyll
Password:
Building native extensions. This could take a while...
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
creating Makefile