Skip to content

Instantly share code, notes, and snippets.

View fditrapani's full-sized avatar
🇮🇹

Filippo Di Trapani fditrapani

🇮🇹
View GitHub Profile
<div class="child1_link_img_con {{link.title}}_con">
{% for child1_link in linklists[child1].links %}
<div class="child1_link_img {{link.title}}{{child1_link.object.id}}_img">
<img id="{{child1_link.object.id}}_img" src="{{child1_link.object.featured_image | product_img_url: 'compact'}}" />
</div>
function show_thumb(imgId) {
$(".child1_link_img").hide();
$("."+imgId).show();
}
function hide_thumb() {
$(".child1_link_img").hide();
}
{% if product.description contains 'Ingredients_tab:'%}
{% assign ingredients_split = product.description | split: 'Ingredients_tab:' %}
{% assign faqs_split = product.description | split: 'Faqs_tab:' %}
{% assign description = ingredients_split[0] %}
{% assign ingredients_holding = ingredients_split[1] %}
{% assign ingredients = ingredients_holding | split: 'Faqs_tab:'%}
{% assign faqs = faqs_split[1] %}
{% assign description_size = description | size %}
{% assign minCartAmount = settings.minCartAmount %}
{% assign shippingPrice = minCartAmount | minus: cart.total_price %}
{%if shippingPrice > 0 %}
<h3 class='free-shipping'>Add {{shippingPrice | money }} to your order to get free shipping!</h3>
{%endif%}
{% for option in product.options %}
{% if option == 'Color' %}
{% assign index = forloop.index0 %}
{% assign colorlist = '' %}
{% assign color = '' %}
{% for variant in product.variants %}
{% capture color %}
{{ variant.options[index] }}
{% endcapture %}
{% capture downloads %}
{% for line in line_items %}
{% if line.sku contains "AUD" %}1{% endif %}
{% if line.sku contains "EBK" %}1{% endif %}
{% if line.sku contains "MP3" %}1{% endif %}
{% if line.sku contains "VID" %}1{% endif %}
{% endfor %}
{% endcapture %}
{% if downloads.size > 0 %}
{% if customer.id == xxx %}
<a href="/admin/products/{{ product.id }}">Edit</a>
{% endif %}
GET https://sauce-demo.myshopify.com/admin/shop.json
POST https://sauce-demo.myshopify.com/admin/shop.json
{% include ‘sauce’ %}