Skip to content

Instantly share code, notes, and snippets.

View whistlerbrad's full-sized avatar

Brad whistlerbrad

View GitHub Profile
@whistlerbrad
whistlerbrad / product-pre-order.liqud
Created June 9, 2017 20:27
Customized product.liquid to use for Pre-Order products
<div class="product-section" id="ProductSection-{{ section.id }}" data-section-id="{{ section.id }}" data-section-type="product" data-image-zoom-enable="{{ section.settings.zoom_enable }}">
<div itemscope itemtype="http://schema.org/Product" class="product-page">
<div class="wrapper">
<meta itemprop="url" content="{{ shop.url }}{{ product.url }}">
<meta itemprop="image" content="{{ product.featured_image.src | img_url: 'grande' }}">
{% if section.settings.product_breadcrumbs %}
{% include 'breadcrumb' %}
@whistlerbrad
whistlerbrad / shop.js.liquid
Last active June 12, 2017 19:28
shop.js.liquid changes for Mobile Scroll
pipeline.fullHeight = function(){
if ((/Android|iPhone|iPad|iPod|BlackBerry/i).test(navigator.userAgent || navigator.vendor || window.opera)) {
return;
}
else {
var windowHeight = $(window).height();
var navHeight = ($('.header__wrapper').height());
var heroHeight = windowHeight - navHeight;
$('.index-sections > .shopify-section:first-child > .use_screen_full').height(heroHeight);
$('.index-sections > .shopify-section:first-child > .use_screen_full.homepage-slideshow .slideshow__slide').height(heroHeight);
@whistlerbrad
whistlerbrad / Equal Height
Created June 20, 2017 21:00
Equal Height
$('.tab-content').css('min-height', function() {
var blockHeights = $('.tab-content').map(function() {
return $(this).height();
}).get();
var tallest = Math.max.apply(null, blockHeights);
return (tallest + 30);
});
@whistlerbrad
whistlerbrad / social-meta-tags.liquid
Last active June 24, 2017 06:03
For Pipeline homepage social image override
<!-- /snippets/social-meta-tags.liquid -->
{% comment %}
Add Facebook and Pinterest Open Graph meta tags to product pages
for friendly Facebook sharing and Pinterest pinning.
More info Open Graph meta tags
- https://developers.facebook.com/docs/opengraph/using-objects/
- https://developers.pinterest.com/rich_pins/
Use the Facebook Open Graph Debugger for validation (and cache clearing)
[
{
"name": "theme_info",
"theme_name": "Pipeline",
"theme_author": "Corknine",
"theme_version": "2.3.1",
"theme_documentation_url": "http://corknine.com/pipeline-docs/",
"theme_support_email": "themes@corknine.com"
},
{
<!-- /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 / footer.liquid
Created July 25, 2017 22:30
Moved social icons above credit
<table width="100%">
<tbody>
<tr>
<td><img src="//cdn.shopify.com/s/files/1/0653/6977/products/atoll_large.jpg?v=1465499502" alt="" /></td>
<td><img src="//cdn.shopify.com/s/files/1/0653/6977/products/midnight_large.jpg?v=1465499502" alt="" /></td>
</tr>
<tr>
<td><!-- LikeBtn.com BEGIN --> <span class="likebtn-wrapper" data-theme="disk" data-identifier="item_1" data-dislike_enabled="false"></span><script>// <![CDATA[
(function(d,e,s){if(d.getElementById("likebtn_wjs"))return;a=d.createElement(e);m=d.getElementsByTagName(e)[0];a.async=1;a.id="likebtn_wjs";a.src=s;m.parentNode.insertBefore(a, m)})(document,"script","//w.likebtn.com/js/w/widget.js");
// ]]></script><!-- LikeBtn.com END --></td>
@whistlerbrad
whistlerbrad / cart.liquid
Created August 14, 2017 16:53
Cart for v2.1
<!-- /templates/cart.liquid -->
{% comment %}
This is your /cart template. If you are using the Ajaxify Cart plugin,
your form (with action="/cart") layout will be used in the drawer/modal.
For info on test orders:
- General http://docs.shopify.com/manual/your-store/orders/test-orders
- Shopify Payments - http://docs.shopify.com/manual/more/shopify-payments/testing-shopify-payments
@whistlerbrad
whistlerbrad / ajax-cart-template.liquid
Created August 14, 2017 16:55
Ajax cart for Pipeline 2.1
<!-- /snippets/ajax-cart-template.liquid -->
{% comment %}
This snippet provides the default handlebars.js templates for
the ajaxify cart plugin. Use the raw liquid tags to keep the
handlebar.js template tags as available hooks.
{% endcomment %}
<script id="CartTemplate" type="text/template">
{% raw %}