Skip to content

Instantly share code, notes, and snippets.

View Tetsuro's full-sized avatar

tetchi Tetsuro

View GitHub Profile
{% layout settings.customer_layout %}
<h2>Account Details and Order History</h2>
<div class="clearfix">
<div class="account-user left">
</div>
<div class="account-table right">
</div>
</div>
<a href="http://www.twitter.com/meundies">
<span class="visually-hidden">MeUndies Twitter</span>
</a>
module.exports = function(grunt) {
grunt.registerTask('speak', function (){
console.log("I'm speaking");
});
};
_site/
.sass-cache/
node_modules/
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
@Tetsuro
Tetsuro / gist:5437588
Created April 22, 2013 19:02
Mods Bookmarklet
javascript:(function(){hours=prompt("please enter the number of hours", 1); shop_url= $("#" + $.find('label').filter(function(element, index, array){return $("#" + element.id).siblings()[0] && $("#" + element.id).siblings()[0].value && $("#" + element.id).siblings()[0].value.indexOf("myshopify.com") != -1})[0].id).siblings()[0].value; ticket_id = $('#wrapper')[0].className.split("/")[2]; url = "https://shopify-mods.myshopify.com/cart/295536989:" + hours + "?note=" + shop_url + "," + ticket_id; prompt("Copy to clipboard: Ctrl+C, Enter",url);}());
@Tetsuro
Tetsuro / gist:5356571
Created April 10, 2013 17:16
markup for style test page in Shopify
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
<blockquote>
<p>Blockquote</p>
</blockquote>
<p><strong>Bold text</strong></p>
@Tetsuro
Tetsuro / gist:5125632
Created March 9, 2013 20:36
outputting shop's product types in a <select>
<div>
<strong>SEARCH BY TYPE: </strong>
<select id="product_type">
<option></option>
{% for product_type in shop.types %}
<option>{{ product_type }}</option>
{% endfor %}
</select>
</div>
@Tetsuro
Tetsuro / product-type-search
Last active December 14, 2015 17:59
Script for Limiting Storefront Search to Certain Product Types
@Tetsuro
Tetsuro / gist:5015903
Created February 22, 2013 19:23
Related products by Type
<div id="coll-product-list">
{% capture current_handle %}{{ product.handle }}{% endcapture %}
{% capture current_type %}{{ product.type }}{% endcapture %}
{% assign how_many_we_got = 0 %}
{% paginate collections.all-products.products by 100 %}
{% for product in collections.all-products.products %}
{% unless product.handle == current_handle %}
{% if product.type == current_type and how_many_we_got < 4 %}
{% assign how_many_we_got = how_many_we_got | plus: 1 %}
@Tetsuro
Tetsuro / gist:4972164
Created February 17, 2013 16:42
Radio Buttons for Single Option Products
<div class="variant-radios">
{% for variant in product.variants %}
<input type="radio" name="id" value="{{ variant.id }}" data-price="{{ variant.price }}" id="{{ variant.id }}"/>
<label for="{{ variant.id }}">{{ variant.title }}</label>
{% endfor %}
</div>
<script>
jQuery(".variant-radios input").click(function(){
var price= jQuery(this).attr('data-price');
console.log(price);