Skip to content

Instantly share code, notes, and snippets.

@minionmade
minionmade / Create Stacks & Bundles on Shopify using Collection
Last active June 1, 2021 18:25
Now you can create bundles and product stacks on Shopify using a single collection page to showcase multiple products, allowing multiple products to be added to the cart all at once! Example: https://getapi.com/collections/hustle-hard-stack#
<form action="/cart/add" method="post" enctype="multipart/form-data" id="AddToCartForm">
{% if collection.products_count > 0 %}
{% for product in collection.products %}
{% if product.available %}
<div class="row">
<div class="col-xs-12 col-sm-4">
<img src="{{ product.image | default: product.featured_image | img_url: 'large' }}" alt="{{ variant.title | escape }}" />
</div>
<div class="col-xs-12 col-sm-8" style="padding: 15% 40px 0">
<div class="col-xs-12 col-sm-12">
@minionmade
minionmade / Show Variant Images Based on ALT Tags for Products in Shopify
Last active June 26, 2017 19:44
Show Variant Images Based on ALT Tags for Products in Shopify
<div class="col-xs-12 col-sm-6 product-img-box {% if settings.product_image_border%} grid-item-border {% endif %}">
{% if product.images.size == 0 %}
<div class="product-photo-container" style="padding: 30px">
<img src="{{ '' | product_img_url: 'grande' }}" alt="">
</div>
{% else %}
<div class="product-photo-container" style="padding: 30px">
{% assign featured_image = product.selected_or_first_available_variant.featured_image | default: product.featured_image %}
<a href="{{ featured_image | img_url: 'original' }}" >
<img id="product-featured-image" src="{{ featured_image | img_url: 'grande' }}" alt="{{ featured_image.alt | escape }}" data-zoom-image="{{ featured_image.src | img_url: 'original' }}"/>
@minionmade
minionmade / Feature Multiple Collections & Products on Shopify Using Link List
Last active May 26, 2022 18:32
Feature Multiple Collections & Products on Shopify Using Link List