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
// Before implementing this, you'll need to contact Shopify support and ask them to turn off Google's ReCaptcha | |
// for your Shopify store's contact forms. Otherwise, it will redirect to the captcha's verification page. | |
// Retrieves input data from a form and returns it as a JSON object: | |
function formToJSON(elements) { | |
return [].reduce.call(elements, function (data, element) { | |
data[element.name] = element.value; | |
return data; | |
}, {}); | |
} |
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
// Before implementing this, you'll need to contact Shopify support and ask them to turn off Google's ReCaptcha | |
// for your Shopify store's contact forms. Otherwise, it will redirect to the captcha's verification page. | |
// I'd recommend replacing it with a custom solution like this: https://captcha.cremadesignstudio.com/ | |
// Retrieves input data from a form and returns it as a JSON object: | |
function formToJSON(elements) { | |
return [].reduce.call(elements, function (data, element) { | |
data[element.name] = element.value; | |
return data; | |
}, {}); |
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<html lang="{{ locale }}" dir="{{ direction }}" class="{{ checkout_html_classes }}"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, height=device-height, minimum-scale=1.0, user-scalable=0"> | |
<title>{{ shop.name }} - {{ page_title }}</title> | |
{{ content_for_header }} |
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
console.clear() | |
var product_rows = document.querySelectorAll('.sidebar .product-table .product') | |
var products_main = [] | |
var products_accs = [] | |
var product_main_strings = ["Regex Title"] | |
var product_accs_strings = ["Regex Title2", "Regex Title3"] | |
var matchProducts = function(i) { if ( this.product.name.match(i) ) this.array.push(this.product) } |
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 grid_item_width %} | |
{% assign grid_item_width = 'medium-up--one-third small--one-half' %} | |
{% endunless %} | |
{% unless current_collection == blank %} | |
{% assign current_collection = collection %} | |
{% endunless %} | |
{% assign on_sale = false %} | |
{% assign sale_text = 'products.product.sale' | t %} |
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
Shopify objects that contain attributes that can be dynamically put on the page. For example, the product object contains an attribute called title that can be used to output the title of a product. | |
The handle is used to access the attributes of a Liquid object. By default, it is the object’s title in lowercase with any spaces and special characters replaced by hyphens (-). Every object in Liquid (product, collection, blog, menu) has a handle. | |
Collections & Products | |
Collection ► | |
all_types ► | |
Returns a list of all the product types for a collection | |
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
<style> | |
.btn-video { | |
font-family: 'Montserrat', sans-serif; | |
@include button-size(20px, 60px, 16px, 14px, 16px); | |
@include button-variant(#FFF, rgba(0,0,0,0.5), #FFF); | |
&:visited, &:hover, &:active { | |
@include button-variant(#FFF, rgba(0,0,0,0.7), #FFF); | |
-webkit-box-shadow: 0px 1px 7px -2px rgba(0,0,0,0.75); | |
-moz-box-shadow: 0px 1px 7px -2px rgba(0,0,0,0.75); |
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
{% form 'contact' %} | |
{% if form.posted_successfully? %} | |
<p class="accent-text">Thanks! We will notify you when this product becomes available!</p> | |
{% else %} | |
<p>Click <a id="notify-me" href="#">here</a> to be notified by email when {{ product.title }} becomes available.</p> | |
{% endif %} | |
{% if form.errors %} | |
<div class="error feedback accent-text"> | |
<p>Please provide a valid email address.</p> | |
</div> |
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
window.HYPERVISUAL_CALLBACKS = { | |
afterProductEmbed: function() { | |
$(this).find('.hypervisual__embed_product-price, .hypervisual__embed_product-compare-at-price').addClass('money'); | |
if(typeof DoublyGlobalCurrency !== 'undefined') { DoublyGlobalCurrency.convertAll($("[name=doubly-currencies]").val()); } | |
} | |
} |
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
var Shopify = Shopify || {}; | |
// --------------------------------------------------------------------------- | |
// Money format handler | |
// --------------------------------------------------------------------------- | |
Shopify.money_format = "${{amount}}"; | |
Shopify.formatMoney = function(cents, format) { | |
if (typeof cents == 'string') { cents = cents.replace('.',''); } | |
var value = ''; | |
var placeholderRegex = /\{\{\s*(\w+)\s*\}\}/; | |
var formatString = (format || this.money_format); |
NewerOlder