Skip to content

Instantly share code, notes, and snippets.

View levinmejia's full-sized avatar

Levin Mejia levinmejia

View GitHub Profile
{{ 'logo.png' | asset_url }}
{{ product.vendor | url_for_vendor }}
{{ "Shop winter boots" | link_to_tag: 'Boots' }}
//cdn.shopify.com/s/files/1/0087/0462/t/394/assets/logo.png?34423
/collections/vendors?q=Burton
<a title="Show products matching tag Boots" href="/collections/frontpage/boots">Shop winter boots</a>
// Liquid
<h1>{{ product.title }}</h1>
<p>{{ product.description }}</p>
// HTML returned
<h1>Snowboard Product Title</h1>
<p>The snowboard product description.</p>
<p>Type: {{ product.type | link_to_type }}</p>
{% if product.tags.size > 0 %}
<div class="product-single__tags">
<p>Tags:
{% for tag in product.tags %}
{% assign tag_coll = '/collections/all/' | append: tag %}
{{ tag | capitalize | link_to: tag_coll }}{% unless forloop.last %},{% endunless %}
{% endfor %}
</p>
</div>
{% endif %}
<div class="product-form__item product-form__item--lip">
<label for="Engraving">Engraving</label>
<input type="text" id="engraving" name="properties[Engraving]">
</div>
{% 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 %}
<div class="qty">
<a class="minus_btn" ></a>
<input type="text" id="quantity" name="quantity" class="txtbox" value="1" min="1">
<a class="plus_btn" ></a>
</div>
<div class="units_in_case_packs">
<p> Quantity (units in case pack increments)</p></div>
<div class="quantity_dropdown"><!--style class for the dropdown>-->
<label for="qty"></label>
<select id="quantity" name="quantity">
{% for i in (1..12) %} <!-- i is the interval value that we are going to multiplying. -->
<option value="{{ i | times:6}}">{{ i | times:6 }}</option> <!-- we use a multiple that corresponds to your case pack in this case we have packs of 6 but you can use any multiple.-->
{% endfor %}
</select></div>
<input type="submit" name="add" class="btn_c" id="addToCart" value="{{ 'products.product.add_to_cart' | t }}">
{% if customer.tags contains 'Wholesale' and cart.total_price < 20000 %}
<p> Your wholesale total must be $200 or more.</p>
{% else %}
<input type="submit" name="update" class="btn--secondary update-cart" value="{{ 'cart.general.update' | t }}">
<input type="submit" name="checkout" class="btn checkout" value="{{ 'cart.general.checkout' | t }}">
{% endif %}