Skip to content

Instantly share code, notes, and snippets.

Body {
counter-reset: amount;
}
#itemA-3:checked ~
#itemE-5:not:checked {
counter-increment: amount;
}
.price {
{% comment %}
Source: https://gist.github.com/carolineschnapp/9122054
If you are not on a collection page, do define which collection to use in the order form.
Use the following assign statement, replace 'your-collection-handle-here' with your collection handle.
{% assign collection = collections.your-collection-handle-here %}
Use the assign statement outside of this comment block at the top of your template.
{% endcomment %}
{% paginate collection.products by 100 %}
<img src="{{ product.featured_image.src }}" alt="{{ product.featured_image.alt }}">
<img src=”{{ slide_img | asset_url }}” alt=”{{ settings[slide_heading] }}”>
<button type=”button”>
<span class=”icon icon--cart” aria-hidden=”true”></span>
<span class=”fallback-text”>cart</span>
</button>
<style>
.fallback-text {
position: absolute !important;
overflow: hidden;
clip: rect(0 0 0 0);
{% form ‘new_comment’, article %}
{{ form.errors | default_errors }}
<label for=”CommentAuthor” class=”hidden-label”>Name</label>
<input {% if form.errors contains 'author' %}class=”error”{% endif %} type=”text” name=”comment[author]” placeholder=”Name” id=”CommentAuthor” value=”{{ form.author }}”>
<label for=”CommentEmail” class=”hidden-label”>Email</label>
<input {% if form.errors contains 'email' %}class=”error”{% endif %} type=”email” name=”comment[email]” placeholder=”email” id=”CommentEmail” value=”{{ form.email }}” autocorrect=”off” autocapitalize=”off”>
{% endform %}
<table class=”responsive-table”>
<thead>
<th>Product</th>
<th>Price</th>
<th>Quantity</th>
<th>Total</th>
</thead>
</tbody>
{% for item in cart.items %}
<tr class=”responsive-table__row”>
<li>
<span id=”productPrice”>
<span aria-hidden=”true”>199<sup>99</sup></span>
<span class=”visually-hidden”>$199.99</span>
</span>
</li>
<style>
.visually-hidden {
position: absolute !important;
{% if product.compare_at_price > product.price %>
<span class=”visually-hidden”>Regular Price</span>
<span id=”ComparePrice”> $100</span>
<span class=”visually-hidden”>Sale price</span>
{% endif %}
<span id=”ProductPrice” itemprop=”price”>$50</span>
<style>
.visually-hidden {
<script src="http://sdks.shopifycdn.com/buy-button/v0.0.2/buybutton.min.js"></script>