Skip to content

Instantly share code, notes, and snippets.

@paulmason
paulmason / en.default.json
Created October 12, 2015 20:49
Shipping Calculator Translations
{
"cart": {
"shipping_calculator": {
"title":"Shipping Calculator",
"country":"Country",
"province":"Province",
"zip":"Zip/Postal Code",
"select":"Please Select",
"calculate":"Calculate Shipping",
"calculating":"Calculating...",
@paulmason
paulmason / snippet-shipping-rates-calculator.liquid
Created October 9, 2015 17:56
Blockshop theme - undefined province in shipping calc fix
{% comment %} October 9th 2015 - Contains fix for undefined province {% endcomment %}
{% if settings.cart-shipping-calculator-show %}
<img class="loading-spinner" style="margin: 30px;" width="24" height="24" src="{{ 'AjaxLoader.gif' | asset_url }}"/>
<div id="shipping-calculator" class="shipping-calculator">
<h3>{{ 'cart.shipping_calculator.title' | t }}</h3>
<div>
<p class="country-select-container">
<label for="address_country">{{ 'cart.shipping_calculator.country' | t }}</label>
<select id="address_country" name="address[country]" data-default="{% if shop.customer_accounts_enabled and customer %}{{ customer.default_address.country }}{% elsif settings.shipping_calculator_default_country != '' %}{{ settings.shipping_calculator_default_country }}{% endif %}">{{ country_option_tags }}</select>
@paulmason
paulmason / shop.js
Last active January 10, 2016 13:59
Instagram Feed
// Copy the instagramFeed function between the two commented lines
// ...
// mobileMenu(); COPY BELOW THIS LINE
instagramFeed = function() {
var client_id, feed_url, getImages, items_to_load, username;
client_id = 'xxxxxxxxxxxxxxxxxxxxx'; // <-- REPLACE THE X's WITH YOUR CLIENT ID
username = $('.instagram-widget').attr('data-username');
if (username.length < 1) {
return;
@paulmason
paulmason / plugins.js
Last active August 29, 2015 14:07
Blockshop Theme - 2.0, 2.0.1 Product page bug fix
/*!
*
* foundation.js
*/
var libFuncName=null;if("undefined"==typeof jQuery&&"undefined"==typeof Zepto&&"function"==typeof $)libFuncName=$;else if("function"==typeof jQuery)libFuncName=jQuery;else{if("function"!=typeof Zepto)throw new TypeError;libFuncName=Zepto}!function(a,b){"use strict";Array.prototype.filter||(Array.prototype.filter=function(a){if(null==this)throw new TypeError;var b=Object(this),c=b.length>>>0;if("function"==typeof a){for(var d=[],e=arguments[1],f=0;c>f;f++)if(f in b){var g=b[f];a&&a.call(e,g,f,b)&&d.push(g)}return d}}),Function.prototype.bind||(Function.prototype.bind=function(a){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var b=Array.prototype.slice.call(arguments,1),c=this,d=function(){},e=function(){return c.apply(this instanceof d&&a?this:a,b.concat(Array.prototype.slice.call(arguments)))};return d.prototype=this.prototype,e.prototype=new d,e}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){i
@paulmason
paulmason / style.css.liquid
Created July 29, 2014 20:10
Swatches - Blockshop Theme
/*
Swatches Styles
*/
{% assign width = '50px' %}
{% assign height = '35px' %}
.swatch {
margin:1em 0;
}
/* Label */