Skip to content

Instantly share code, notes, and snippets.

View rickydazla's full-sized avatar

Rick Davies rickydazla

View GitHub Profile
@dmolsen
dmolsen / Facebook + Twitter Fan Count
Created September 27, 2010 15:47
Pulls the Facebook fan count and Twitter follower count for the specified accounts.
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
var f_page = "wvumountaineers"; // the page name for your fan page, e.g. the 'wvumountaineers' part of http://facebook.com/wvumountaineers
var t_page = "westvirginiau"; // the account name for your main twitter account
function add_commas(number) {
if (number.length > 3) {
var mod = number.length % 3;
@carolineschnapp
carolineschnapp / settings.html
Last active January 19, 2023 13:01
Additional settings for multiple currencies support
<fieldset>
<legend>Money options</legend>
<table>
<tr>
<td><label for="show_multiple_currencies">Show currency selector?</label></td>
<td><input type="checkbox" id="show_multiple_currencies" name="show_multiple_currencies" checked="checked" /></td>
</tr>
<tr>
<td colspan="2"><small>Although you will be able to display prices on your store front in different currencies, Shopify will still process orders in your shop's currency.</small></td>
</tr>
@carolineschnapp
carolineschnapp / currencies.liquid
Last active November 14, 2024 07:14
currencies.liquid
{% if settings.show_multiple_currencies %}
{{ "//cdn.shopify.com/s/javascripts/currencies.js" | script_tag }}
{{ "jquery.currencies.min.js" | asset_url | script_tag }}
<script>
Currency.format = '{{ settings.currency_format | default: 'money_with_currency_format' }}';
var shopCurrency = '{{ shop.currency }}';
@carolineschnapp
carolineschnapp / gist:773649
Last active August 21, 2019 13:17
currency-picker.liquid
<label class="currency-picker__wrapper">
<span class="currency-picker__label">Pick a currency</span>
<select class="currency-picker" name="currencies" style="display: inline; width: auto; vertical-align: inherit;">
{% assign codes = 'USD,EUR,GBP,CAD,ARS,AUD,BBD,BDT,BSD,BHD,BRL,BOB,BND,BGN,ILS,MMK,KYD,CLP,CNY,COP,CRC,HRK,CZK,DKK,DOP,XCD,EGP,XPF,FJD,GHS,GTQ,GYD,GEL,HKD,HUF,ISK,INR,IDR,NIS,JMD,JPY,JOD,KZT,KES,KWD,LVL,LTL,MXN,MYR,MUR,MDL,MAD,MNT,MZN,ANG,NZD,NGN,NOK,OMR,PKR,PYG,PEN,PHP,PLN,QAR,RON,RUB,SAR,RSD,SCR,SGD,SYP,ZAR,KRW,LKR,SEK,CHF,TWD,THB,TZS,TTD,TRY,UAH,AED,UYU,VEB,VND,ZMK' | split: ',' %}
{% assign supported_codes = settings.supported_currencies | split: ' ' %}
<option value="{{ shop.currency }}" selected="selected">{{ shop.currency }}</option>
{% for code in supported_codes %}
{% if code != shop.currency and codes contains code %}
<option value="{{ code }}">{{ code }}</option>
{% endif %}
@johnantoni
johnantoni / setAllToMaxHeight
Created April 13, 2011 13:01
setAllToMaxHeight (jquery)
$.fn.setAllToMaxHeight = function(){
return this.height( Math.max.apply(this, $.map( this , function(e){ return $(e).height() }) ) );
}
// usage: $(‘div.unevenheights’).setAllToMaxHeight()
// http://www.broken-links.com/2009/01/20/very-quick-equal-height-columns-in-jquery/
@carolineschnapp
carolineschnapp / related-products.liquid
Last active December 22, 2022 21:29
Related Products — to add to product.liquid
@carolineschnapp
carolineschnapp / gist:1003334
Created June 1, 2011 21:10
Related Products using metafields - to add to product.liquid
<!-- Solution brought to you by Caroline Schnapp -->
<!-- See this: http://wiki.shopify.com/Related_Products -->
{% assign image_size = 'compact' %}
{% assign heading = 'Other fine products' %}
{% if product.metafields.recommendations.productHandles %}
<h3>{{ heading }}</h3>
<ul class="related-products"></ul>
@resistorsoftware
resistorsoftware / theme.meta-titler.liquid
Created June 24, 2011 02:16
A Liquid Snippet for the Meta-Titler Shopify App
{% capture title %}<title>{{ shop.name }} &#124; {{ page_title }}</title>{% endcapture %}
{% if template == 'product' %}
{% assign mf = product.metafields.meta_data %}
{% unless mf == empty %}
{% for mf in product.metafields.meta_data' %}
{% capture key %}{{ mf | first }}{% endcapture %}
{% if key == 'title' %}
{% capture title %}<title>{{mf | last}}</title>{% endcapture %}
<meta name="title" content="{{mf | last}}" />
{% endif %}
@resistorsoftware
resistorsoftware / product.liquid
Last active January 10, 2023 02:31
You Might Like This! Shopify Related Products App
<!--
* a simple HTML DOM element for rendering related products.
* Style with CSS to make the <ul> look like whatever you want.
* place this snippet in your product.liquid where you would like the related products to appear
-->
<div id="related-products-container">
<h1>YOU MIGHT LIKE THIS!</h1>
<div id="related">
<ul class="related">
@jdennes
jdennes / LICENSE
Last active March 7, 2024 04:40
Subscribing to a Campaign Monitor list using AJAX
The MIT License (MIT)
Copyright (c) James Dennes
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: