Skip to content

Instantly share code, notes, and snippets.

View whistlerbrad's full-sized avatar

Brad whistlerbrad

View GitHub Profile
@whistlerbrad
whistlerbrad / snippets-product.liquid
Created March 12, 2018 04:46
Custom version to bring back Pipeline 2 product description drop-down options
<!-- /snippets/product.liquid -->
{% if product.template_suffix contains "charge-rabbit" %}
{% assign form_action = product.metafields.charge_rabbit.subscribe_path %}
{% assign form_method = 'get'%}
{% assign form_class = "charge-rabbit-product" %}
{% assign include_customer_id = true %}
{% assign membership_product = true %}
{% else %}
{% assign form_action = '/cart/add' %}
{% assign form_method = 'post'%}
@whistlerbrad
whistlerbrad / instagram-js
Created February 26, 2018 03:01
fix for IG token restrictions
theme.Instagram = (function() {
function Instagram(container) {
var $container = this.$container = $(container);
var id = $container.attr('data-section-id');
var instafeedEl = this.instagram = $('#Instafeed-' + id);
var instafeedId = this.instagram = 'Instafeed-' + id;
var apiSuccess = 0;
var imageLimit = instafeedEl.attr('data-count');
@whistlerbrad
whistlerbrad / footer.liquid
Created February 16, 2018 23:38
Original 3.1
@whistlerbrad
whistlerbrad / article.liquid
Created January 6, 2018 07:15
Custom page in blog sidebar - Top of sidebar above tags
<!-- /sections/article.liquid -->
{% assign number_of_comments = article.comments_count %}
{% comment %}
If a comment was just submitted and it has no blank fields, we have an extra comment to count.
{% endcomment %}
{% if comment and comment.created_at %}
{% assign number_of_comments = article.comments_count | plus: 1 %}
{% endif %}
@whistlerbrad
whistlerbrad / product-grid-item.liquid
Created November 8, 2017 04:13
Collection grid Buy Now button on hover instead of price
{%- assign product_img_url = product.featured_image.src | img_url: '700x' -%}
{%- if grid_width_large == 'large--one-whole' -%}
{%- assign product_img_url = product.featured_image.src | img_url: '1200x' -%}
{%- elsif grid_width_large == 'large--one-half' -%}
{%- assign product_img_url = product.featured_image.src | img_url: '900x' -%}
{%- endif -%}
{%- assign on_sale = false -%}
{%- if product.compare_at_price > product.price -%}
{%- assign on_sale = true -%}