Skip to content

Instantly share code, notes, and snippets.

@kartick14
Created April 23, 2018 12:43
Show Gist options
  • Save kartick14/669417533b3e4c8e34a1b74ad8d3fe0e to your computer and use it in GitHub Desktop.
Save kartick14/669417533b3e4c8e34a1b74ad8d3fe0e to your computer and use it in GitHub Desktop.
Product details for wholesaler with each variant added to cart
<div class="page-width" data-section-id="{{ section.id }}" data-section-type="cart-template">
{% if cart.item_count > 0 %}
<div class="section-header text-center">
<h1>{{ 'cart.general.title' | t }}</h1>
</div>
<form action="/cart" method="post" novalidate class="cart">
{% if customer.tags contains 'wholesaler' %}
{% for custag in customer.tags %}
{% if custag contains 'sale_' %}
{% assign split_tag = custag | split: '_' | last %}
{% assign disc_tag = custag %}
{% break %}
{% endif %}
{% endfor %}
<input autocomplete="off" type="hidden" name="discount" class="discount_code" value="{{disc_tag}}" />
{% endif %}
<table>
<thead class="cart__row cart__header">
<th colspan="2">{{ 'cart.label.product' | t }}</th>
<th>{{ 'cart.label.price' | t }}</th>
<th class="text-center">{{ 'cart.label.quantity' | t }}</th>
<th class="text-right">{{ 'cart.label.total' | t }}</th>
</thead>
<tbody>
{% for item in cart.items %}
<tr class="cart__row border-bottom line{{ forloop.index }} cart-flex{% if forloop.first %} border-top{% endif %}">
<td class="cart__image-wrapper cart-flex-item">
<a href="{{ item.url | within: collections.all }}">
<img class="cart__image" src="{{ item | img_url: '95x95', scale: 2 }}" alt="{{ item.title | escape }}">
</a>
</td>
<td class="cart__meta small--text-left cart-flex-item">
<div class="list-view-item__title">
<a href="{{ item.url }}">
{{ item.product.title }}
{% if item.quantity > 1 %}
<span class="medium-up--hide"><span class="visually-hidden">{{ 'cart.label.quantity' | t }}</span>(x{{ item.quantity }})</span>
{% endif %}
</a>
</div>
{% unless item.variant.title contains 'Default' %}
<div class="cart__meta-text">
{% for option in item.product.options %}
{{ option }}: {{ item.variant.options[forloop.index0] }}<br/>
{% endfor %}
</div>
{% endunless %}
{% comment %}
Optional, loop through custom product line items if available
Line item properties come in as having two parts. The first part will be passed with the default form,
but p.last is the actual custom property and may be blank. If it is, don't show it.
For more info on line item properties, visit:
- http://docs.shopify.com/support/your-store/products/how-do-I-collect-additional-information-on-the-product-page-Like-for-a-monogram-engraving-or-customization
{% endcomment %}
{%- assign property_size = item.properties | size -%}
{% if property_size > 0 %}
<div class="cart__meta-text">
{% for p in item.properties %}
{% unless p.last == blank %}
{{ p.first }}:
{% comment %}
Check if there was an uploaded file associated
{% endcomment %}
{% if p.last contains '/uploads/' %}
<a href="{{ p.last }}">{{ p.last | split: '/' | last }}</a>
{% else %}
{{ p.last }}
{% endif %}
{% endunless %}
{% endfor %}
</div>
{% endif %}
<p class="small--hide">
<a href="/cart/change?line={{ forloop.index }}&amp;quantity=0" class="btn btn--small btn--secondary cart__remove">{{ 'cart.general.remove' | t }}</a>
</p>
</td>
<td class="cart__price-wrapper cart-flex-item">
{% if customer.tags contains 'wholesaler' %}
{% assign first_stp = item.price | times: split_tag | divided_by: 100.0 %}
{% assign final_stp = item.price | minus: first_stp | money %}
<span class="price_discount"><s>{{item.price | money }}</s></span><br>{{final_stp }}
{% else %}
{{ item.price | money }}
{% endif %}
{% for discount in item.discounts %}
<div class="cart-item__discount medium-up--hide">{{ discount.title }}</div>
{% endfor %}
<div class="cart__edit medium-up--hide">
<button type="button" class="btn btn--secondary btn--small js-edit-toggle cart__edit--active" data-target="line{{ forloop.index }}">
<span class="cart__edit-text--edit">{{ 'cart.general.edit' | t }}</span>
<span class="cart__edit-text--cancel">{{ 'cart.general.cancel' | t }}</span>
</button>
</div>
</td>
<td class="cart__update-wrapper cart-flex-item text-right">
<a href="/cart/change?line={{ forloop.index }}&amp;quantity=0" class="btn btn--small btn--secondary cart__remove medium-up--hide">{{ 'cart.general.remove' | t }}</a>
<div class="cart__qty">
<label for="updates_{{ item.key }}" class="cart__qty-label">{{ 'cart.label.quantity' | t }}</label>
<input class="cart__qty-input" type="number" name="updates[]" id="updates_{{ item.key }}" value="{{ item.quantity }}" min="0" pattern="[0-9]*">
</div>
<input type="submit" name="update" class="btn btn--small cart__update medium-up--hide" value="{{ 'cart.general.update' | t }}">
</td>
<td class="text-right small--hide">
{% if customer.tags contains 'wholesaler' %}
{% assign first_stp = item.line_price | times: split_tag | divided_by: 100.0 %}
{% assign final_stp = item.line_price | minus: first_stp | money %}
<span class="price_discount"><s>{{item.line_price | money }}</s></span><br>{{final_stp }}
{% else %}
{% if item.original_line_price != item.line_price %}
<div class="cart-item__original-price"><s>{{ item.original_line_price | money }}</s></div>
{% endif %}
<div>
{{ item.line_price | money }}
</div>
{% for discount in item.discounts %}
<div class="cart-item__discount">{{ discount.title }}</div>
{% endfor %}
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
<footer class="cart__footer">
<div class="grid">
{% if section.settings.cart_notes_enable %}
<div class="grid__item medium-up--one-half cart-note">
<label for="CartSpecialInstructions" class="cart-note__label small--text-center">{{ 'cart.general.note' | t }}</label>
<textarea name="note" id="CartSpecialInstructions" class="cart-note__input">{{ cart.note }}</textarea>
</div>
{% endif %}
<div class="grid__item text-right small--text-center{% if section.settings.cart_notes_enable %} medium-up--one-half{% endif %}">
<div>
<span class="cart__subtotal-title">{{ 'cart.general.subtotal' | t }}</span>
{% if customer.tags contains 'wholesaler' %}
{% assign first_stp = cart.total_price | times: split_tag | divided_by: 100.0 %}
{% assign final_stp = cart.total_price | minus: first_stp | money %}
<span class="cart__subtotal"><s>{{cart.total_price | money }}</s></span><br>{{final_stp }}
{% else %}
<span class="cart__subtotal">{{ cart.total_price | money }}</span>
{% endif %}
</div>
{% if cart.total_discounts > 0 %}
<div class="cart__savings">
{{ 'cart.general.savings' | t }}
<span class="cart__savings-amount">{{ cart.total_discounts | money }}</span>
</div>
{% endif %}
<div class="cart__shipping">{{ 'cart.general.shipping_at_checkout' | t }}</div>
<a href="collections/all" class="btn btn--secondary cart__update cart__continue--large small--hide" >{{ 'cart.general.continue_shopping' | t }}</a>
<input type="submit" name="update" class="btn btn--secondary cart__update cart__update--large small--hide" value="{{ 'cart.general.update' | t }}">
<input type="submit" name="checkout" class="btn btn--small-wide" value="{{ 'cart.general.checkout' | t }}">
{% if additional_checkout_buttons %}
<div class="additional-checkout-buttons">{{ content_for_additional_checkout_buttons }}</div>
{% endif %}
</div>
</div>
</footer>
</form>
{% else %}
<div class="empty-page-content text-center">
<h1>{{ 'cart.general.title' | t }}</h1>
<p class="cart--empty-message">{{ 'cart.general.empty' | t }}</p>
<div class="cookie-message">
<p>{{ 'cart.general.cookies_required' | t }}</p>
</div>
<a href="/" class="btn btn--has-icon-after cart__continue-btn">{{ 'general.404.link' | t }}{% include 'icon-arrow-right' %}</a>
</div>
{% endif %}
</div>
{% schema %}
{
"name": "Cart page",
"settings": [
{
"type": "checkbox",
"id": "cart_notes_enable",
"label": "Enable cart notes",
"default": false
}
]
}
{% endschema %}
<div class="product-template__container page-width" itemscope itemtype="http://schema.org/Product" id="ProductSection-{{ section.id }}" data-section-id="{{ section.id }}" data-section-type="product" data-enable-history-state="true">
<meta itemprop="name" content="{{ product.title }}">
<meta itemprop="url" content="{{ shop.url }}{{ product.url }}">
<meta itemprop="image" content="{{ product.featured_image.src | img_url: '800x' }}">
{% comment %}
Get first variant, or deep linked one
{% endcomment %}
{%- assign current_variant = product.selected_or_first_available_variant -%}
{%- assign product_image_zoom_size = '1024x1024' -%}
{%- assign product_image_scale = '2' -%}
{%- assign enable_zoom = section.settings.enable_zoom -%}
{% case section.settings.image_size %}
{% when 'small' %}
{%- assign product_image_width = 'medium-up--one-third' -%}
{%- assign product_description_width = 'medium-up--two-thirds' -%}
{%- assign product_thumbnail_width = 'medium-up--one-third' -%}
{%- assign height = 345 -%}
{% when 'medium' %}
{%- assign product_image_width = 'medium-up--one-half' -%}
{%- assign product_description_width = 'medium-up--one-half' -%}
{%- assign product_thumbnail_width = 'medium-up--one-quarter' -%}
{%- assign height = 530 -%}
{% when 'large' %}
{%- assign product_image_width = 'medium-up--two-thirds' -%}
{%- assign product_description_width = 'medium-up--one-third' -%}
{%- assign product_thumbnail_width = 'medium-up--one-fifth' -%}
{%- assign height = 720 -%}
{% when 'full' %}
{%- assign product_image_width = '' -%}
{%- assign product_description_width = '' -%}
{%- assign product_thumbnail_width = 'medium-up--one-eighth' -%}
{%- assign height = 1090 -%}
{%- assign enable_zoom = false -%}
{% endcase %}
{% assign colors = product.variants | map:'option1' | uniq %}
<div class="grid product-single">
<div class="grid__item medium-up--one-whole">
<div class="product-single__meta">
<h1 itemprop="name" class="product-single__title">{{ product.title }}</h1>
<ul id="legenda">
<li class="rosso">Item not available</li>
<li class="giallo">Limited availability</li>
<li class="verde">Available item</li>
</ul>
{% if section.settings.show_vendor %}
<p itemprop="brand" class="product-single__vendor">{{ product.vendor }}</p>
{% endif %}
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<meta itemprop="priceCurrency" content="{{ shop.currency }}">
<link itemprop="availability" href="http://schema.org/{% if product.available %}InStock{% else %}OutOfStock{% endif %}">
<p class="product-single__price product-single__price-{{ section.id }}{% unless current_variant.available %} product-price--sold-out{% endunless %}" style="display:none;">
{% if current_variant.compare_at_price > current_variant.price %}
<span class="visually-hidden">{{ 'products.product.regular_price' | t }}</span>
<s id="ComparePrice-{{ section.id }}">{{ current_variant.compare_at_price | money }}</s>
<span class="product-price__price product-price__price-{{ section.id }} product-price__sale product-price__sale--single">
<span id="ProductPrice-{{ section.id }}"
itemprop="price" content="{{ current_variant.price | divided_by: 100.00 }}">
{{ current_variant.price | money }}
</span>
<span class="product-price__sale-label product-price__sale-label-{{ section.id }}">{{ 'products.product.on_sale' | t }}</span>
</span>
{% else %}
<span class="visually-hidden">{{ 'products.product.regular_price' | t }}</span>
<s id="ComparePrice-{{ section.id }}" class="hide">{{ current_variant.compare_at_price | money }}</s>
<span class="product-price__price product-price__price-{{ section.id }}">
<span id="ProductPrice-{{ section.id }}"
itemprop="price" content="{{ current_variant.price | divided_by: 100.00 }}">
{{ current_variant.price | money }}
</span>
<span class="product-price__sale-label product-price__sale-label-{{ section.id }} hide">{{ 'products.product.on_sale' | t }}</span>
</span>
{% endif %}
</p>
<form id="formcart" action="/cart/add" method="post" enctype="multipart/form-data" class="product-form product-form-{{ section.id }}{% unless section.settings.show_variant_labels %} product-form--hide-variant-labels{% endunless %}" data-section="{{ section.id }}">
{% for color in colors %}
<div class="{{color | handleize}} prod_row">
<div class="left">
<span class="thumb">
{% for variant in product.variants %}
{% if color == variant.option1 %}
<img src="{{ variant.image.src | img_url: '120x' }}" alt="" />
{% break %}
{% endif %}
{% endfor %}
</span>
</div>
<div class="middle">
<p class="title">{{ product.title }}</p>
<p class="color">Color: {{color}}</p>
</div>
<div class="right">
<table class="tab_insert">
<tbody>
<tr>
<td class="titolo">Sizes</td>
{% for variant in product.variants %}
{% if color == variant.option1 %}
{% capture thecycle %}{% cycle 'odd', 'even' %}{% endcapture %}
{% assign temp = " option1_" | append: variant.option1 | handleize %}
{% if forloop.first %}
{% assign unique_option1 = temp %}
<td {% if thecycle == 'odd' %}class="alternate"{% endif %}>{{variant.option2}}</td>
{% elsif unique_option1 contains temp %}
<td {% if thecycle == 'odd' %}class="alternate"{% endif %}>{{variant.option2}}</td>
{% else %}
{% assign unique_option1 = unique_option1 | append: temp %}
<td {% if thecycle == 'odd' %}class="alternate"{% endif %}>{{variant.option2}}</td>
{% endif %}
{% endif %}
{% endfor %}
</tr>
<tr>
<td class="titolo">Price</td>
{% for variant in product.variants %}
{% if color == variant.option1 %}
{% capture thecycle1 %}{% cycle 'odd1', 'even1' %}{% endcapture %}
{% assign temp = " option1_" | append: variant.option1 | handleize %}
{% for custag in customer.tags %}
{% if custag contains 'sale_' %}
{% assign split_tag = custag | split: '_' | last %}
{% break %}
{% endif %}
{% endfor %}
{% assign first_stp = variant.price | times: split_tag | divided_by: 100.0 %}
{% assign final_stp = variant.price | minus: first_stp | money %}
{% if forloop.first %}
{% assign unique_option1 = temp %}
<td {% if thecycle1 == 'odd1' %}class="alternate"{% endif %}><span class="price_discount"><s>{{variant.price | money }}</s></span><br>{{final_stp }}</td>
{% elsif unique_option1 contains temp %}
<td {% if thecycle1 == 'odd1' %}class="alternate"{% endif %}><span class="price_discount"><s>{{variant.price | money }}</s></span><br>{{final_stp }}</td>
{% else %}
{% assign unique_option1 = unique_option1 | append: temp %}
<td {% if thecycle1 == 'odd1' %}class="alternate"{% endif %}><span class="price_discount"><s>{{variant.price | money }}</s></span><br>{{final_stp }}</td>
{% endif %}
{% endif %}
{% endfor %}
</tr>
<tr>
<td class="titolo">Availability</td>
{% for variant in product.variants %}
{% if color == variant.option1 %}
{% capture thecycle2 %}{% cycle 'odd2', 'even2' %}{% endcapture %}
{% assign curvarstock = variant.inventory_quantity %}
{% assign temp = " option1_" | append: variant.option1 | handleize %}
{% if forloop.first %}
{% assign unique_option1 = temp %}
<td {% if thecycle2 == 'odd2' %}class="alternate"{% endif %}>
{% if variant.inventory_management == 'shopify' and curvarstock > 10 %}
<a rel="tipsy" original-title="Available item"><img src="https://b2b.leone1947.com/Media/images/pallino_verde.png" title="Available item" /></a>
{% elsif variant.inventory_management == 'shopify' and curvarstock > 0 and curvarstock < 10%}
<a rel="tipsy" original-title="Limited availability (Only {{curvarstock}} pieces)"><img src="https://b2b.leone1947.com/Media/images/pallino_giallo.png" title="Limited availability (Only {{curvarstock}} pieces)" /></a>
{% else %}
<a rel="tipsy" original-title="Item not available"><img src="https://b2b.leone1947.com/Media/images/pallino_rosso.png" title="Item not available" /></a>
{% endif %}
</td>
{% elsif unique_option1 contains temp %}
<td {% if thecycle2 == 'odd2' %}class="alternate"{% endif %}>
{% if variant.inventory_management == null %}
<a rel="tipsy" original-title="Available item"><img src="https://b2b.leone1947.com/Media/images/pallino_verde.png" title="Available item" /></a>
{% elsif variant.inventory_management == 'shopify' and curvarstock > 0 %}
<a rel="tipsy" original-title="Limited availability (Only {{curvarstock}} pieces)"><img src="https://b2b.leone1947.com/Media/images/pallino_giallo.png" title="Limited availability (Only {{curvarstock}} pieces)" /></a>
{% else %}
<a rel="tipsy" original-title="Item not available"><img src="https://b2b.leone1947.com/Media/images/pallino_rosso.png" title="Item not available" /></a>
{% endif %}
</td>
{% else %}
{% assign unique_option1 = unique_option1 | append: temp %}
<td {% if thecycle2 == 'odd2' %}class="alternate"{% endif %}>
{% if variant.inventory_management == null %}
<a rel="tipsy" original-title="Available item"><img src="https://b2b.leone1947.com/Media/images/pallino_verde.png" title="Available item" /></a>
{% elsif variant.inventory_management == 'shopify' and curvarstock > 0 %}
<a rel="tipsy" original-title="Limited availability (Only {{curvarstock}} pieces)"><img src="https://b2b.leone1947.com/Media/images/pallino_giallo.png" title="Limited availability (Only {{curvarstock}} pieces)" /></a>
{% else %}
<a rel="tipsy" original-title="Item not available"><img src="https://b2b.leone1947.com/Media/images/pallino_rosso.png" title="Item not available" /></a>
{% endif %}
</td>
{% endif %}
{% endif %}
{% endfor %}
</tr>
<tr>
<td class="titolo">Quantity</td>
{% for variant in product.variants %}
{% if color == variant.option1 %}
{% capture thecycle3 %}{% cycle 'odd3', 'even3' %}{% endcapture %}
{% assign curvarstock = variant.inventory_quantity %}
{% assign temp = " option1_" | append: variant.option1 | handleize %}
{% if forloop.first %}
{% assign unique_option1 = temp %}
<td class="varient_sec {% if thecycle3 == 'odd3' %}alternate{% endif %}">
<div class="form">
<input type="hidden" class="varient_id" name="id[]" value="{{variant.id}}" />
<input type="hidden" class="varient_inventory" name="inventory" value="{{curvarstock}}" />
<input type="number" class="Quantity quantita numeric" id="qty_{{variant.id}}" name="quantity" value="" min="0" pattern="[0-9]*" {% if variant.inventory_quantity <= 0%} disabled {%endif%} >
</div>
</td>
{% elsif unique_option1 contains temp %}
<td class="varient_sec {% if thecycle3 == 'odd3' %}alternate{% endif %}">
<div class="form">
<input type="hidden" class="varient_id" name="id[]" value="{{variant.id}}" />
<input type="hidden" class="varient_inventory" name="inventory" value="{{curvarstock}}" />
<input type="number" class="Quantity quantita numeric" id="qty_{{variant.id}}" name="quantity" value="" min="0" pattern="[0-9]*" {% if variant.inventory_quantity <= 0%} disabled {%endif%} >
</div>
</td>
{% else %}
{% assign unique_option1 = unique_option1 | append: temp %}
<td class="varient_sec {% if thecycle3 == 'odd3' %}alternate{% endif %}">
<div class="form">
<input type="hidden" class="varient_id" name="id[]" value="{{variant.id}}" />
<input type="hidden" class="varient_inventory" name="inventory" value="{{curvarstock}}" />
<input type="number" class="Quantity quantita numeric" id="qty_{{variant.id}}" name="quantity" value="" min="0" pattern="[0-9]*" {% if variant.inventory_quantity <= 0%} disabled {%endif%} >
</div>
</td>
{% endif %}
{% endif %}
{% endfor %}
</tr>
</tbody>
</table>
</div>
</div>
{% endfor %}
<div class="product-form__item product-form__item--submit">
{%comment%}
<button type="submit" onclick="addAllItems()" name="add" id="AddToCart-{{ section.id }}" {% unless current_variant.available %}disabled="disabled"{% endunless %} class="btn product-form__cart-submit{% if product.options.size == 1 and product.variants[0].title == 'Default Title' %} product-form__cart-submit--small{% endif %}">
<span id="AddToCartText-{{ section.id }}">
{% unless current_variant.available %}
{{ 'products.product.sold_out' | t }}
{% else %}
{{ 'products.product.add_to_cart' | t }}
{% endunless %}
</span>
</button>
{%endcomment%}
<button class="custom_btn custom_add_to_cart btn" data-loading-text="<i class='fa fa-circle-o-notch fa-spin'></i>">Add to cart</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
{% if collection %}
<div class="text-center return-link-wrapper">
<a href="{{ collection.url }}" class="btn btn--secondary btn--has-icon-before return-link">
{% include 'icon-arrow-left' %}
{{ 'products.product.back_to_collection' | t: title: collection.title }}
</a>
</div>
{% endif %}
{% unless product == empty %}
<script type="application/json" id="ProductJson-{{ section.id }}">
{{ product | json }}
</script>
{% endunless %}
{% for color in colors %}
<script>
jQuery(document).ready(function(){
jQuery('.varient_sec.{{color | handleize}}').wrapAll('<div class="wrap_{{color | handleize}}"></div>');
});
</script>
{% endfor %}
<script>
/*function addAllItems(array){
Shopify.queue = [];
var quantity = $('#Quantity').val() ;
var newArray = array.split(',');
for (var i = 0; i < newArray.length; i++) {
product = newArray[i]
Shopify.queue.push({
variantId: product,
});
}
Shopify.moveAlong = function() {
// If we still have requests in the queue, let's process the next one.
if (Shopify.queue.length) {
var request = Shopify.queue.shift();
console.log(request);
var data = 'id='+ request.variantId + '&quantity=1';
$.ajax({
type: 'POST',
url: '/cart/add.js',
dataType: 'json',
data: data,
success: function(res){
Shopify.moveAlong();
quantity += 1;
},
error: function(){
// if it's not last one Move Along else update the cart number with the current quantity
if (Shopify.queue.length){
Shopify.moveAlong()
}
// else {
// $('#cart-number').replaceWith("<a href="/cart" id="cart-number">View cart (" + quantity + ")</a>")
// }
}
});
}
// If the queue is empty, we add 1 to cart
else {
quantity += 1;
addToCartOk(quantity);
}
};
Shopify.moveAlong();
};*/
jQuery('.custom_btn').click(function(e){
e.preventDefault();
jQuery(this).html(jQuery(this).data('loading-text'));
Shopify.queue = [];
var total = jQuery('.varient_sec').length;
jQuery('.varient_sec').each(function(index){
var varient_id = jQuery(this).find('.varient_id').val();
var varient_qty = jQuery(this).find('.Quantity').val();
if(varient_qty > 0){
console.log(varient_id+'-------'+varient_qty);
Shopify.queue.push({
variantId: varient_id,
quantity: varient_qty
});
}
/*if (index === total - 1) {
window.location.href = '/cart';
}*/
});
Shopify.moveAlong = function() {
// If we still have requests in the queue, let's process the next one.
if (Shopify.queue.length) {
var request = Shopify.queue.shift();
var data = 'id='+ request.variantId + '&quantity='+ request.quantity;
$.ajax({
type: 'POST',
url: '/cart/add.js',
dataType: 'json',
data: data,
success: function(res){
Shopify.moveAlong();
quantity += 1;
},
error: function(){
// if it's not last one Move Along else update the cart number with the current quantity
if (Shopify.queue.length){
Shopify.moveAlong()
} else {
console.log('ok');
}
}
});
}
// If the queue is empty, we add 1 to cart
else {
quantity += 1;
addToCartOk(quantity);
}
};
Shopify.moveAlong();
setTimeout(function() {
jQuery(this).html('Add to cart');
window.location.href = "/cart";
}, 5000);
});
</script>
{% schema %}
{
"name": "Product pages",
"settings": [
{
"type": "select",
"id": "image_size",
"label": "Image size",
"options": [
{
"value": "small",
"label": "Small"
},
{
"value": "medium",
"label": "Medium"
},
{
"value": "large",
"label": "Large"
},
{
"value": "full",
"label": "Full-width"
}
],
"default": "medium"
},
{
"type": "checkbox",
"id": "show_quantity_selector",
"label": "Show quantity selector",
"default": false
},
{
"type": "checkbox",
"id": "show_variant_labels",
"label": "Show variant labels",
"default": true
},
{
"type": "checkbox",
"id": "show_vendor",
"label": "Show vendor",
"default": false
},
{
"type": "checkbox",
"id": "enable_zoom",
"label": "Enable image zoom",
"default": true
},
{
"type": "checkbox",
"id": "show_share_buttons",
"label": "Show social sharing buttons",
"default": true
}
]
}
{% endschema %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment