We want to go from this:
... to that:
<!-- Step 1: Add your filters --> | |
<!-- The collection filter is entirely optional --> | |
<!-- You can have as many as 3 of the product tags filters --> | |
<ul class="clearfix"> | |
<li class="clearfix filter"> | |
<p>Shop by category</p> | |
<select class="coll-picker"> | |
<option value="all">All</option> | |
{% for c in collections %} |
<script> | |
// (c) Copyright 2016 Caroline Schnapp. All Rights Reserved. Contact: mllegeorgesand@gmail.com | |
// See https://docs.shopify.com/themes/customization/navigation/link-product-options-in-menus | |
var Shopify = Shopify || {}; | |
Shopify.optionsMap = {}; | |
Shopify.updateOptionsInSelector = function(selectorIndex) { | |
<div id="google_translate_element"></div> | |
<script> | |
function googleTranslateElementInit() { | |
new google.translate.TranslateElement({ | |
pageLanguage: 'en' | |
}, 'google_translate_element'); | |
} | |
</script> | |
<script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> |
{% if settings.show_multiple_currencies %} | |
{{ "//cdn.shopify.com/s/javascripts/currencies.js" | script_tag }} | |
{{ "jquery.currencies.min.js" | asset_url | script_tag }} | |
<script> | |
Currency.format = '{{ settings.currency_format | default: 'money_with_currency_format' }}'; | |
var shopCurrency = '{{ shop.currency }}'; |
{% 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 %} |
<!-- Solution brought to you by Caroline Schnapp --> | |
<!-- See this: http://wiki.shopify.com/Related_Products --> | |
{% assign image_size = 'compact' %} | |
{% assign heading = 'Other fine products' %} | |
{% if product.tags.size > 0 %} | |
<h3>{{ heading }}</h3> | |
<ul class="related-products"></ul> |
<style> | |
#collections-listing ul { | |
list-style-type: none; | |
list-style-position: outside; | |
overflow: hidden; | |
} | |
#collections-listing ul li { | |
float: left; |
/* Sample JavaScript file added with ScriptTag resource. | |
This sample file is meant to teach best practices. | |
Your app will load jQuery if it's not defined. | |
Your app will load jQuery if jQuery is defined but is too old, e.g. < 1.7. | |
Your app does not change the definition of $ or jQuery outside the app. | |
Example: if a Shopify theme uses jQuery 1.4.2, both of these statements run in the console will still return '1.4.2' | |
once the app is installed, even if the app uses jQuery 1.9.1: | |
jQuery.fn.jquery => "1.4.2" | |
$.fn.jquery -> "1.4.2" | |
*/ |
<!-- Solution brought to you by Caroline Schnapp --> | |
<!-- See this: http://wiki.shopify.com/Related_Products --> | |
{% assign image_size = 'compact' %} | |
{% assign heading = 'Other fine products' %} | |
{% if product.metafields.recommendations.productHandles %} | |
<h3>{{ heading }}</h3> | |
<ul class="related-products"></ul> |