Skip to content

Instantly share code, notes, and snippets.

View kellyvaughn's full-sized avatar
👀
lookin at ur code

Kelly Vaughn kellyvaughn

👀
lookin at ur code
View GitHub Profile
@carolineschnapp
carolineschnapp / multiple images for a variant.md
Created March 31, 2016 01:23
"Grouped variant images". Solution good for all themes, no change to markup required.

What to do

  1. Use the alt text to associate the additional images - besides the variant image - to the option value. Example: say you have 3 images that show the Blue variants, then a) associate the first image as variant image to all Blue variants, and b) set the alt text of the 2 additional images to 'Blue'.
  2. Copy+paste the code found in the product.liquid snippet below at the bottom of your product.liquid template.

How that works, essentially

Only the images associated to the currently selected variant are shown. Other images are hidden.

What to expect, the specifics

@rickydazla
rickydazla / shopify_view-all.js
Created December 21, 2011 19:45
Shopify View All (wtf? seriously!)
/*------------------------View all button script----------------------------------------------*/
var _PageUrls = [];
var _Index = 0;
function loadUrlInAjax(url,requestType,dataType,functionToBeExecutedBefore,functionToBeExecutedAfter){
$.ajax({
type: requestType,
url: url,
beforeSend: function(){
//functionToBeExecutedBefore();
},
@davecap
davecap / collections.liquid.html
Last active March 19, 2024 13:08
"Infinite" scrolling in Shopify collections
{% paginate collection.products by 20 %}
<!-- the top of your collections.liquid -->
<!-- START PRODUCTS -->
{% for product in collection.products %}
<!-- START PRODUCT {{ forloop.index | plus:paginate.current_offset }} -->
<div class="product" id="product-{{ forloop.index | plus:paginate.current_offset }}">
{% include 'product' with product %}
</div>
<!-- END PRODUCT {{ forloop.index | plus:paginate.current_offset }} -->