{% capture form_id %}AddToCartForm-{{ section_id }}{% endcapture %}
{% form 'product', product, id: form_id, class: 'product-single__form' %}
  {% unless product.has_only_default_variant %}
    {%- for option in product.options_with_values -%}

      {%- if settings.product_color_swatches -%}
        {%- assign is_color = false -%}
        {%- assign color_option_index = 0 -%}
        {%- assign swatch_trigger = 'products.general.color_swatch_trigger' | t | downcase-%}
        {%- assign color_option_index = forloop.index0 -%}
        {%- assign downcased_option = option.name | downcase -%}
        {%- if downcased_option contains swatch_trigger -%}
          {%- assign is_color = true -%}
        {%- elsif swatch_trigger == 'color' and downcased_option contains 'colour' -%}
          {%- assign is_color = true -%}
        {%- endif -%}
      {%- endif -%}

      {% if settings.variant_type == 'button' %}
        {% render 'variant-button',
          section_id: section_id,
          option: option,
          forloop: forloop,
          is_color: is_color,
          color_option_index: color_option_index
        %}
      {% else %}
        {% render 'variant-dropdown',
          section_id: section_id,
          option: option,
          forloop: forloop
        %}
      {% endif %}
    {%- endfor -%}
  {% endunless %}

  <select name="id" id="ProductSelect-{{ section_id }}" class="product-single__variants no-js">
    {% for variant in product.variants %}
      {% if variant.available %}
        <option {% if variant == product.selected_or_first_available_variant %}
          selected="selected" {% endif %}
          value="{{ variant.id }}">
          {{ variant.title }} - {{ variant.price | money_with_currency }}
        </option>
      {% else %}
        <option disabled="disabled">
          {{ variant.title }} - {{ &#039;products.product.sold_out&#039; | t }}
        </option>
      {% endif %}
    {% endfor %}
  </select>

  {% if settings.quantity_enable %}
    <div class="product__quantity product__quantity--{{ settings.variant_type }}">
      <label for="Quantity-{{ section_id }}">{{ &#039;products.product.quantity&#039; | t }}</label>
      {% render &#039;quantity-input&#039;, id: section_id, qty: 1, min: 1 %}
    </div>
  {% endif %}

  {%- assign inventory_visible = false -%}
  {%- if settings.inventory_enable and current_variant.inventory_management == &#039;shopify&#039; -%}
    {%- if current_variant.inventory_quantity <= settings.inventory_threshold and current_variant.inventory_quantity >= 0 -%}
      {%- assign inventory_visible = true -%}
    {%- endif -%}
  {%- endif -%}
  {%- if current_variant.inventory_quantity == 0 or current_variant.inventory_policy == &#039;continue&#039; -%}
    {%- assign inventory_visible = false -%}
  {%- endif -%}

  {%- if settings.inventory_enable -%}
    <div
      id="ProductInventory-{{ section_id }}"
      class="product__inventory {% unless inventory_visible %}hide{% endunless %}"
      >
      {% if current_variant.available %}
        {{ &#039;products.product.stock_label&#039; | t: count: current_variant.inventory_quantity }}
      {% endif %}
    </div>
  {%- endif -%}

  {%- if settings.inventory_transfers_enable -%}
    <div
      id="ProductIncomingInventory-{{ section_id }}"
      class="product__inventory{% if inventory_visible %} hide{% endif %}">
      {%- if current_variant.incoming and inventory_visible == false -%}
        {%- if current_variant.next_incoming_date -%}
          {% assign date = current_variant.next_incoming_date | date: format: &#039;date&#039; %}
          {%- if current_variant.available -%}
            {{ &#039;products.product.will_not_ship_until&#039; | t: date: date }}
          {%- else -%}
            {{ &#039;products.product.will_be_in_stock_after&#039; | t: date: date }}
          {%- endif -%}
        {%- else -%}
          {{ &#039;products.product.waiting_for_stock&#039; | t }}
        {%- endif -%}
      {%- endif -%}
    </div>
  {%- endif -%}

  {%- assign enable_dynamic_buttons = false -%}
  {% if settings.enable_payment_button and template != &#039;product.preorder&#039; %}
    {%- assign enable_dynamic_buttons = true -%}
  {% endif %}

  {% if enable_dynamic_buttons %}
    <div class="payment-buttons">
  {% endif %}

    {%- assign default_text = &#039;products.product.add_to_cart&#039; | t -%}
    {%- assign button_text = &#039;products.product.add_to_cart&#039; | t -%}
    {%- if current_variant.available -%}
      {%- if template == &#039;product.preorder&#039; -%}
        {%- assign default_text = &#039;products.product.add_to_cart&#039; | t -%}
        {%- assign button_text = &#039;products.product.preorder&#039; | t -%}
      {%- endif -%}
    {%- else -%}
      {%- assign button_text = &#039;products.product.sold_out&#039; | t -%}
    {%- endif -%}

    <button>
      {% if product.empty? %}type="button"{% else %}type="submit"{% endif %}
      name="add"
      id="AddToCart-{{ section_id }}"
      class="btn btn--full add-to-cart {% if enable_dynamic_buttons %} btn--secondary{% endif %}"
      {% unless current_variant.available %} disabled="disabled"{% endunless %}>
      <span id="AddToCartText-{{ section_id }}"  data-default-text="{{ default_text }}" >
        {{ button_text }} {{ current_variant.price | money }}
      </span>
    </button>

    {% if enable_dynamic_buttons %}
      {{ form | payment_button }}
    {% endif %}

  {% if enable_dynamic_buttons %}
    </div>
  {% endif %}

  <textarea id="VariantsJson-{{ section_id }}" class="hide" aria-hidden="true">
    {{ product.variants | json }}
  </textarea>
  {% if product.options.size > 1 %}
    <textarea id="CurrentVariantJson-{{ section_id }}" class="hide" aria-hidden="true">
      {{ current_variant | json }}
    </textarea>
  {% endif %}
<!--  Spice Product Addons Snippet Starts -->

<div id="spiceaddonsappid">{% assign product_collections = product.collections | map: "id" %}{% if product_collections %}<input type="hidden" id="sgcollections" value="{{ product_collections | join: &#039;,&#039; }}"/>{% endif %}</div>

<!--   Spice Product Addons Snippet ends  -->
{% endform %}

Add a code snippet to your website: www.paste.org