This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- /snippets/admin-edit-link.liquid --> | |
{% capture CFH %}{{ content_for_header }}{% endcapture %}{{ CFH }} | |
{% if CFH contains 'admin_bar_iframe' %} | |
{% assign admin = true %} | |
{% endif %} | |
{% if admin %} | |
<script> | |
(function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
A Quick test to display some custom fields on Product pages for items from the "Bowls" collection | |
https://docs.shopify.com/support/your-store/products/how-do-I-collect-additional-information-on-the-product-page-Like-for-a-monogram-engraving-or-customization | |
--> | |
{% if collection.handle == 'bowls' %} | |
<div class="property-wrapper"> | |
<p>Size</p> | |
<input class="radio" type="radio" id="1" name="properties[Second Property]" value="First Option"> <label for="first-option">1</label> | |
<input class="radio" type="radio" id="2" name="properties[Second Property]" value="Second Option"> <label for="second-option">2</label> | |
<input class="radio" type="radio" id="3" name="properties[Second Property]" value="Third Option"> <label for="third-option">3</label> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% assign sizes = '_pico.,_icon.,_thumb.,_small.,_compact.,_medium.,_large.,_grande.,_1024x1024.,_2048x2048.,_master' | split: ',' %} | |
{% assign image_src = null %} | |
{% assign image_alt = null %} | |
{% if article.excerpt contains "<img" %} | |
{% assign image_src = article.excerpt | split: 'src="' %} | |
{% assign image_src = image_src[1] | split: '"' | first | replace: '//cdn', 'http://cdn' | replace: 'http:http://', 'http://' | remove: 'https:' %} | |
{% for s in sizes %} | |
{% assign image_src = image_src | replace: s, '_1024x1024.' %} | |
{% endfor %} |