I hereby claim:
- I am jtgrenz on github.
- I am jtgrenz (https://keybase.io/jtgrenz) on keybase.
- I have a public key ASDWiFcn-IjHYsvYDlQIeadq-C-D3ZOPym2rRN3AdzUYywo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Works with CSS color keywords or images. If you have a non-css color / pattern, you need to upload the image with a handelized name. If the color is "aqua blue" then the file needs to be uplaoded as "aqua-blue.png". You can use jpg if you prefer by changing the file_extension and you can change from color to colour or farbe, etc by changing the option_name
-JG
{% assign option_name = "Color" | downcase %}
{% assign file_extension = "png" %}
{% assign product_options = product.options | downcase %}
<div class="swatch-container" style="padding: 5px 0;">
I tweaked the above code and now it works with image swatches too. If you have a non-css color / pattern, you need to upload the image with a handelized name. If the color is "aqua blue" then the file needs to be uplaoded as "aqua-blue.png". You can use jpg if you prefer by changing the file_extension and you can change from color to colour or farbe, etc by changing the option_name
-JG
{% assign option_name = "Color" | downcase %}
{% assign file_extension = "png" %}
{% assign product_options = product.options | downcase %}
<div class="swatch-container" style="padding: 5px 0;">
If you have tried installing the Zendesk Web Widget into your Shopify theme but it does not show up or gives an error, this might be the fix for you
This fix should work for the following Shopify themes installed prior to September 2015 :
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
{% if template contains 'product' %} | |
{% assign chart = product.type | handleize | append: "-size-chart" %} | |
{% unless pages[chart].empty? or pages[chart].content == blank %} | |
{% assign size_options = 'size,taille' | split: ',' %} | |
{% assign size_chart_text_link = 'Size chart' %} | |
{% assign has_size = false %} | |
{% assign size_index = 0 %} | |
{% for option in product.options %} | |
{% assign downcased_option = option | downcase %} | |
{% if has_size == false and size_options contains downcased_option %} |
{% if template contains 'product' %} | |
{% assign chart = product.vendor | handleize | append: "-size-chart" %} | |
{% unless pages[chart].empty? or pages[chart].content == blank %} | |
{% assign size_options = 'size,taille' | split: ',' %} | |
{% assign size_chart_text_link = 'Size chart' %} | |
{% assign has_size = false %} | |
{% assign size_index = 0 %} | |
{% for option in product.options %} | |
{% assign downcased_option = option | downcase %} | |
{% if has_size == false and size_options contains downcased_option %} |