Skip to content

Instantly share code, notes, and snippets.

@sadiesaurus
sadiesaurus / page.list-collections.liquid
Last active November 17, 2021 22:42 — forked from carolineschnapp/page.list-collections.liquid
To add at the bottom of page.list-collections.liquid. In the New Standard theme, use the content of page.full-width.liquid and copy the code at the bottom of that content. This won't work in the Lookbook, Brooklyn, Simple and Kickstand themes.
{% comment %}
Collections are listed here.
{% endcomment %}
{% capture uses_minimal_framework %}{% include 'product-loop' %}{% endcapture %}
{% if uses_minimal_framework contains 'Liquid error' %}
{% assign uses_minimal_framework = false %}
{% assign grid_item_width = 'large--one-quarter large-up--one-quarter medium--one-third medium-up--one-third small--one-half large--col-3 medium--col-4 small--col-6' %}
{% else %}
@sadiesaurus
sadiesaurus / related-products.liquid
Created August 2, 2017 00:27
related products for Jumpstart with lazyload
@sadiesaurus
sadiesaurus / related-products.liquid
Last active August 2, 2017 17:27
related products with lazyload for Boundless
@sadiesaurus
sadiesaurus / product-template.liquid
Created July 13, 2017 20:42
Product template for showing featured image before a variant is selected in sectioned Brooklyn
<!-- /templates/product.liquid -->
<div itemscope itemtype="http://schema.org/Product" id="ProductSection" data-section-id="{{ section.id }}" data-section-type="product-template" data-image-zoom-type="{{ section.settings.zoom_enable }}" data-enable-history-state="true">
<div itemscope itemtype="http://schema.org/Product">
<meta itemprop="url" content="{{ shop.url }}{{ product.url }}">
<meta itemprop="image" content="{{ product.featured_image.src | img_url: 'grande' }}">
{% if product.variants.size > 1 %}
{% assign current_variant = product.selected %}
{% else %}
@sadiesaurus
sadiesaurus / product.template.liquid
Last active February 19, 2021 17:47
product-template.liquid for sectioned Brooklyn with variant drop-down menus
<!-- /templates/product.liquid -->
<div itemscope itemtype="http://schema.org/Product" id="ProductSection" data-section-id="{{ section.id }}" data-section-type="product-template" data-image-zoom-type="{{ section.settings.zoom_enable }}" data-enable-history-state="true">
<div itemscope itemtype="http://schema.org/Product">
<meta itemprop="url" content="{{ shop.url }}{{ product.url }}">
<meta itemprop="image" content="{{ product.featured_image.src | img_url: 'grande' }}">
{% assign current_variant = product.selected %}
<div class="grid product-single">
@sadiesaurus
sadiesaurus / search-autocomplete.liquid
Created June 21, 2017 17:09
search-autocomplete.liquid snippet
{% comment %} Width of results box {% endcomment %}
{% assign results_box_width = '242px' %}
{% comment %} Background color of results box {% endcomment %}
{% assign results_box_background_color = '#ffffff' %}
{% comment %} Border color of results box {% endcomment %}
{% assign results_box_border_color = '#d4d4d4' %}
<!-- Some styles to get you started. -->
<style>
.search-results {
@sadiesaurus
sadiesaurus / shipping-calculator
Created June 14, 2017 21:27
sectioned themes shipping calculator snippet
{% unless settings.shipping_calculator == 'Disabled' %}
<div id="shipping-calculator">
<h3>{{ settings.shipping_calculator_heading | default: 'Get shipping estimates' }}</h3>
<div>
<p class="field">
<label for="address_country">Country</label>
<select id="address_country" name="address[country]" data-default="{% if shop.customer_accounts_enabled and customer %}{{ customer.default_address.country }}{% elsif settings.shipping_calculator_default_country != '' %}{{ settings.shipping_calculator_default_country }}{% endif %}">{{ country_option_tags }}</select>
</p>
<p class="field" id="address_province_container" style="display:none;">
<label for="address_province" id="address_province_label">Province</label>
@sadiesaurus
sadiesaurus / related-products.liquid
Created May 9, 2017 12:43
related-products.liquid for sectioned themes
@sadiesaurus
sadiesaurus / related-products.liquid
Last active October 26, 2017 20:27
related-products.liquid for sectioned Venture
@sadiesaurus
sadiesaurus / related-products.liquid
Created May 9, 2017 12:39
related-products.liquid for Debut