Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <link itemprop="availability" href="http://schema.org/{% if product.available %}InStock{% else %}OutOfStock{% endif %}">
- {% capture "form_class" -%}
- addToCartForm{% if section.settings.enable_payment_button %} addToCartForm--payment-button{% endif %}
- {%- endcapture %}
- {%- capture "form_id" -%}addToCartForm-{{ section.id }}{%- endcapture -%}
- {% form 'product', product, class:form_class, id:form_id %}
- <select name="id" id="productSelect-{{ section.id }}" class="product-variants product-variants-{{ section.id }}">
- {% for variant in product.variants %}
- {% if variant.available %}
- <option {% if variant == product.selected_or_first_available_variant %} selected="selected" {% endif %} data-sku="{{ variant.sku }}" value="{{ variant.id }}">{{ variant.title }} - {{ variant.price | money_with_currency }}</option>
- {% else %}
- <option disabled="disabled">
- {{ variant.title }} - {{ 'products.product.sold_out' | t }}
- </option>
- {% endif %}
- {% endfor %}
- </select>
- {% if section.settings.product_quantity_enable %}
- <label for="quantity" class="quantity-selector quantity-selector-{{ section.id }}">{{ 'products.product.quantity' | t }}</label>
- <input type="number" id="quantity" name="quantity" value="1" min="1" class="quantity-selector">
- {% endif %}
- {% comment %} Adjusted by Salvatore D @ Shopify on August 31, 2018 - APPLIED FIX {% endcomment %}
- {% if section.settings.product_quantity_message %}
- <div id="variantQuantity-{{ section.id }}" class="variant-quantity {% if variant.inventory_management and variant.inventory_quantity > 0 %} is-visible{% endif %}">
- {% assign qty = variant.inventory_quantity %}
- <span id="variantQuantity-{{ section.id }}__message">{{ 'products.product.only_left' | t: count: qty }}</span>
- </div>
- {% endif %}
- {% if section.settings.product_incoming_message %}
- <div id="variantIncoming-{{ section.id }}" class="variant-sold-out variant-quantity {% if variant.inventory_management and variant.inventory_quantity <= 0 %} is-visible{% endif %}">
- {% if variant.inventory_management and variant.inventory_quantity <= 0 and current_variant.incoming %}
- {% include 'svg-definitions' with 'stock-icon' %}
- {% if variant.available %}
- {% assign date = variant.next_incoming_date | date: "day_month_year" %}
- <span id="variantIncoming-{{ section.id }}__message">{{ 'products.product.will_not_ship_until' | t: date: date }}</span>
- {% else %}
- {% assign date = variant.next_incoming_date | date: "month_day_year" %}
- <span id="variantIncoming-{{ section.id }}__message">{{ 'products.product.will_be_in_stock_after' | t: date: date }}</span>
- {% endif %}
- {% elsif variant.inventory_management and variant.inventory_quantity <= 0 and current_variant.incoming == false %}
- <span id="variantIncoming-{{ section.id }}__message">Lagerstatus: ikke pƄ lager</span>
- {% else %}
- <span id="variantIncoming-{{ section.id }}__message"></span>
- {% endif %}
- </div>
- {% endif %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement