Skip to content

Instantly share code, notes, and snippets.

@essmahr
essmahr / validate
Last active March 23, 2018 20:57
Diff-based, filetype-specific linting
#!/usr/bin/env bash
# Run filetype-specific linting on a given commit range.
# ------------------------------------------------------
#
# Usage:
#
# $ travis/validate HEAD~5
# $ travis/validate $TRAVIS_COMMIT_RAGE
<div class="buyx-msg"></div>
{% include 'buyx-cart' %}
Replace {{ item.title }}
with
{{ item.title
| remove: 'Default Title / ' | remove: ' - Default' | remove: ' / Default' | remove: 'Default' | remove: ' / Title' | remove: 'Title'
}}
For JavaScript cart popups:
title.replace(' - Default', '').replace(' / Default', '').replace('Default', '').replace(' / Title', '').replace('Title', '')
.buyx-msg {
color: #F45B4F;
font-weight: bold;
font-size: 18px;
width: 100%;
text-align: center;
margin-bottom: 10px;
}
/*
.buyx-msg a {
{% if item.variant.compare_at_price and item.variant.compare_at_price > item.price %}
<del>{{ item.variant.compare_at_price | money }}</del>
{% endif %}
{{ item.price | money }}
Quantity field:
After {{ item.variant.id }} and value="{{ item.quantity }}", add the following:
{% unless item.variant.inventory_management == blank or item.variant.inventory_policy == 'continue' %} max="{{ item.variant.inventory_quantity }}" {% endunless %}
At the end of cart.liquid, add
<script>
jQuery('[max]').change(function() {
<div class="collection-filters-container cf-select-wrapper"></div>
/* Your designer can adjust these to get all kind of looks:
one or separate lines, active links instead of checkboxes, colors etc. */
.collection-filters-container {
/*
*/
text-align: center;
margin: 10px 0px 10px 0px;
{% for tag in collection.all_tags %}
{% unless tag contains 'cf-' %}
<!-- initial for loop content goes here-->
{% endunless %}
{% endfor %}
{% include 'collection-filter-v2' %}