This file contains hidden or 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
//Collection page | |
// Start of filter | |
var grid_view_items = $('.grid--view-items'); | |
var grid_product = $(grid_view_items).find('.grid__item'); | |
var $filterCheckboxes = $('input[type="radio"].collection-filter'); | |
$filterCheckboxes.on('change', function() { | |
var selectedFilters = {}; |
This file contains hidden or 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
//Product grid | |
<div id="product-colors-{{product.id}}" class="product-colors"> | |
{% capture variant_data %} | |
{% for variant in product.variants %} | |
{{ variant.option1 | escape | handleize | remove: "-amp"}}|{{variant.id}} | |
{% if forloop.last == false %}::{% endif%} | |
{% endfor %} | |
{% endcapture %} |
This file contains hidden or 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
<script> | |
(function($){ | |
$(document).ready(function(){ | |
var apiUrl = "https://yourshop.myshopify.com/api/graphql"; | |
var token = "tokenhere"; | |
customProductSearch( | |
apiUrl, | |
token, |
This file contains hidden or 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 gulp = require('gulp'); | |
var sass = require('gulp-sass'); | |
var replace = require('gulp-replace'); | |
var autoprefixer = require('gulp-autoprefixer'); | |
var rename = require('gulp-rename'); | |
var imagemin = require('gulp-imagemin'); | |
function minifiedImages(){ | |
return gulp.src('./images/*') |
This file contains hidden or 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
{%- assign collection = collections[section.settings.collection] -%} | |
<div class="wrapper collection-slider collection-slider-{{ section.id }}" data-section-id="{{ section.id }}"> | |
{% if section.settings.primary_header != blank or section.settings.secondary_header %} | |
<h2><span class="font-300">{{section.settings.primary_header}}</span> {{section.settings.secondary_header}}</h2> | |
{% endif %} | |
<div class="grid-uniform collection-slider-container"> | |
{% for product in collection.products %} |
This file contains hidden or 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
function insertAfter(el, referenceNode) { | |
referenceNode.parentNode.insertBefore(el, referenceNode.nextSibling); | |
} | |
// example | |
var newEl = document.createElement('div'); | |
newEl.innerHTML = '<p>Hello World!</p>'; | |
var ref = document.querySelector('div.before'); |
This file contains hidden or 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
https://w3bits.com/flexbox-masonry/ | |
https://w3bits.com/labs/flexbox-masonry/ |
This file contains hidden or 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
//header.php | |
(function($){ | |
$(document).ready(function(){ | |
var cart_count = $('.cart-customlocation').text(); | |
var cart_element = `<span>${cart_count}</span>`; | |
var cart_menu = $("#menu-user-menu").children('li:first-child').find('a'); | |
$(cart_menu).find('span').remove(); | |
$(cart_menu).append(cart_element); | |
}); | |
})(jQuery); |
This file contains hidden or 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 seen = {}; | |
$('a').each(function() { | |
var txt = $(this).text(); | |
if (seen[txt]) | |
$(this).remove(); | |
else | |
seen[txt] = true; | |
}); |
This file contains hidden or 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
<?php | |
/** | |
* Add the custom field on checkout page | |
*/ | |
add_action( 'woocommerce_after_checkout_billing_form', 'display_extra_fields_after_billing_address' , 10, 1 ); | |
function display_extra_fields_after_billing_address () { | |
_e( "Delivery Date: ", "add_extra_fields"); | |
?> |
NewerOlder