View 0_reuse_code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
View currency-picker.liquid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<span id="currencies"> | |
<span data-currency="{{ settings.default_currency }}" class="left">{{ settings.default_currency }}</span> | |
<span data-currency="{{ settings.second_currency }}" class="right">{{ settings.second_currency }}</span> | |
</span> | |
<style> | |
#currencies { | |
display: -moz-inline-stack; | |
display: inline-block; | |
zoom: 1; |
View search-autocomplete.liquid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% comment %} Width of results box {% endcomment %} | |
{% assign results_box_width = '242px' %} | |
{% comment %} Background color of results box {% endcomment %} | |
{% assign results_box_background_color = '#ffffff' %} | |
{% comment %} Border color of results box {% endcomment %} | |
{% assign results_box_border_color = '#d4d4d4' %} | |
<!-- Some styles to get you started. --> | |
<style> | |
.search-results { |
View currencies.liquid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if settings.show_multiple_currencies %} | |
{{ "//cdn.shopify.com/s/javascripts/currencies.js" | script_tag }} | |
<script> | |
window.onload = function() { | |
Currency.format = '{{ settings.currency_format | default: 'money_with_currency_format' }}'; | |
var shopCurrency = '{{ shop.currency }}'; | |
/* Sometimes merchants change their shop currency, let's tell our JavaScript file */ | |
Currency.moneyFormats[shopCurrency].money_with_currency_format = {{ shop.money_with_currency_format | strip_html | json }}; |
View shipping-calculator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% unless settings.shipping_calculator == 'Disabled' %} | |
<div id="shipping-calculator"> | |
<h3>{{ settings.shipping_calculator_heading | default: 'Get shipping estimates' }}</h3> | |
<div> | |
<p class="field"> | |
<label for="address_country">Country</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> | |
</p> | |
<p class="field" id="address_province_container" style="display:none;"> | |
<label for="address_province" id="address_province_label">Province</label> |
OlderNewer