Required parameter missing or invalid: items

Solved
littletingles
Excursionist
40 2 2

Hi, I've started getting this error "Required parameter missing or invalid: items" when adding to cart

My theme is debut, my site is littletingles.com 

My product-template.liquid code is :

<div class="product-template__container page-width"
  id="ProductSection-{{ section.id }}"
  data-section-id="{{ section.id }}"
  data-section-type="product"
  data-enable-history-state="true"
  data-ajax-enabled="{{ settings.enable_ajax }}"
>
  {% comment %}
    Get first variant, or deep linked one
  {% endcomment %}
  {% if product.variants.size > 1 %}
  {% assign current_variant = product.selected %}
{% else %}
  {% assign current_variant = product.first_available_variant %}
{% endif %}
  {%- assign product_image_zoom_size = '1024x1024' -%}
  {%- assign product_image_scale = '2' -%}
  {%- assign enable_zoom = section.settings.enable_zoom -%}
  {%- assign compare_at_price = current_variant.compare_at_price -%}
  {%- assign price = current_variant.price -%}

  {% 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 %}

  <div class="grid product-single{% if section.settings.enable_payment_button %} product-single--{{ section.settings.image_size }}-image{% endif %}">
    <div class="grid__item product-single__photos {{ product_image_width }}{% if section.settings.image_size == 'full' %} product-single__photos--full{% endif %}">
      {% assign featured_image = product.images.first | default: product.featured_image %}
      {% for image in product.images %}
        {% capture img_id %}FeaturedImage-{{ section.id }}-{{ image.id }}{% endcapture %}
        {% capture img_class %}product-featured-img{% endcapture %}
        {% capture zoom_img_id %}FeaturedImageZoom-{{ section.id }}-{{ image.id }}{% endcapture %}
        {% capture img_wrapper_id %}{{ zoom_img_id }}-wrapper{% endcapture %}
        {%- assign img_url = image | img_url: '1x1' | replace: '_1x1.', '_{width}x.' -%}

        {% include 'image-style', image: image, height: height, wrapper_id: img_wrapper_id, img_id: img_id %}

        <div id="{{ img_wrapper_id }}" class="product-single__photo-wrapper js">
          <div
          id="{{ zoom_img_id }}"
          style="padding-top:{{ 1 | divided_by: image.aspect_ratio | times: 100}}%;"
          class="product-single__photo{% if enable_zoom %} js-zoom-enabled{% endif %}{% if product.images.size > 1 %} product-single__photo--has-thumbnails{% endif %}{% unless featured_image == image %} hide{% endunless %}"
          data-image-id="{{ image.id }}"
          {% if enable_zoom %} data-zoom="{{ image | img_url: product_image_zoom_size, scale: product_image_scale }}"{% endif %}>
            <img id="{{ img_id }}"
                 class="feature-row__image {{ img_class }} lazyload{% unless featured_image == image %} lazypreload{% endunless %}"
                 src="{{ image | img_url: '300x300' }}"
                 data-src="{{ img_url }}"
                 data-widths="[180, 360, 540, 720, 900, 1080, 1296, 1512, 1728, 2048]"
                 data-aspectratio="{{ image.aspect_ratio }}"
                 data-sizes="auto"
                 tabindex="-1"
                 alt="{{ image.alt | escape }}">
          </div>
        </div>
      {% endfor %}

      <noscript>
        {% capture product_image_size %}{{ height }}x{% endcapture %}
        <img src="{{ featured_image | img_url: product_image_size, scale: product_image_scale }}" alt="{{ featured_image.alt }}" id="FeaturedImage-{{ section.id }}" class="product-featured-img" style="max-width: {{ height }}px;">
      </noscript>

      {% if product.images.size > 1 %}
        {% if product.images.size > 3 %}
          {%- assign enable_thumbnail_slides = true -%}
        {% endif %}

        <div class="thumbnails-wrapper{% if enable_thumbnail_slides == true %} thumbnails-slider--active{% endif %}">
          {% if enable_thumbnail_slides == true %}
            <button type="button" class="btn btn--link medium-up--hide thumbnails-slider__btn thumbnails-slider__prev thumbnails-slider__prev--{{ section.id }}">
              {% include 'icon-chevron-left' %}
              <span class="icon__fallback-text">{{ 'sections.slideshow.previous_slide' | t }}</span>
            </button>
          {% endif %}
          <ul class="grid grid--uniform product-single__thumbnails product-single__thumbnails-{{ section.id }}">
            {% for image in product.images %}
              <li class="grid__item {{ product_thumbnail_width }} product-single__thumbnails-item js">
                <a href="{{ image.src | img_url: product_image_zoom_size, scale: product_image_scale }}"
                   class="text-link product-single__thumbnail product-single__thumbnail--{{ section.id }}"
                   data-thumbnail-id="{{ image.id }}"
                   {% if enable_zoom %}data-zoom="{{ image.src | img_url: product_image_zoom_size, scale: product_image_scale }}"{% endif %}>
                     <img class="product-single__thumbnail-image" src="{{ image.src | img_url: '110x110', scale: 2 }}" alt="{{ 'sections.featured_product.gallery_thumbnail_alt' | t: imageAlt: image.alt | escape }}">
                </a>
              </li>
            {% endfor %}
          </ul>
          {% if enable_thumbnail_slides == true %}
            <button type="button" class="btn btn--link medium-up--hide thumbnails-slider__btn thumbnails-slider__next thumbnails-slider__next--{{ section.id }}">
              {% include 'icon-chevron-right' %}
              <span class="icon__fallback-text">{{ 'sections.slideshow.next_slide' | t }}</span>
            </button>
          {% endif %}
        </div>
      {% endif %}
    </div>

    <div class="grid__item {{ product_description_width }}">
      <div class="product-single__meta">

        <h1 class="product-single__title">{{ product.title }}</h1>

          <div class="product__price">
            {% include 'product-price', variant: current_variant, show_vendor: section.settings.show_vendor %}
          </div>

          {%- if shop.taxes_included or shop.shipping_policy.body != blank -%}
            <div class="product__policies rte">
              {%- if shop.taxes_included -%}
                {{ 'products.product.include_taxes' | t }}
              {%- endif -%}
              {%- if shop.shipping_policy.body != blank -%}
                {{ 'products.product.shipping_policy_html' | t: link: shop.shipping_policy.url }}
              {%- endif -%}
            </div>
          {%- endif -%}

          {% capture "form_classes" -%}
            product-form product-form-{{ section.id }}{% unless section.settings.show_variant_labels %} product-form--hide-variant-labels{% endunless %}{% if section.settings.enable_payment_button and product.has_only_default_variant%} product-form--payment-button-no-variants{% endif %}
          {%- endcapture %}

          {% form 'product', product, class:form_classes, novalidate: 'novalidate', data-product-form: '' %}
            {% unless product.has_only_default_variant %}
              <div class="product-form__controls-group">
                {% for option in product.options_with_values %}
                  <div class="selector-wrapper js product-form__item">
                    <label {% if option.name == 'default' %}class="label--hidden" {% endif %}for="SingleOptionSelector-{{ forloop.index0 }}">
                      {{ option.name }}
                    </label>
                    <select class="single-option-selector single-option-selector-{{ section.id }} product-form__input" id="SingleOptionSelector-{{ forloop.index0 }}" data-index="option{{ forloop.index }}">
                      {% for value in option.values %}
                        <option value="{{ value | escape }}"{% if option.selected_value == value %} selected="selected"{% endif %}>{{ value }}</option>
                      {% endfor %}
                    </select>
                  </div>
                {% endfor %}
              </div>
            {% endunless %}

            <select name="id" id="ProductSelect-{{ section.id }}" class="product-form__variants no-js">
              {% for variant in product.variants %}
                {% if variant.available %}
                  <option {% if variant == product.selected_or_first_available_variant %} selected="selected" {% endif %} {% assign featured_image = product.images.first | default: product.featured_image %}
                  </option>
                {% else %}
                  <option disabled="disabled">{{ variant.title }} - {{ 'products.product.sold_out' | t }}</option>
                {% endif %}
              {% endfor %}
            </select>

            {% if section.settings.show_quantity_selector %}
              <div class="product-form__controls-group">
                <div class="product-form__item">
                  <label for="Quantity-{{ section.id }}">{{ 'products.product.quantity' | t }}</label>
                  <select name="quantity" id="quantity">
         {% for i in (1..20) %}
                  <option value="{{ i }}">{{ i }}</option>
          {% endfor %}         
</select>
                </div>
              </div>
            {% endif %}

            <div class="product-form__error-message-wrapper product-form__error-message-wrapper--hidden{% if section.settings.enable_payment_button %} product-form__error-message-wrapper--has-payment-button{% endif %}" data-error-message-wrapper role="alert">
              <span class="visually-hidden">{{ 'general.accessibility.error' | t }} </span>
              {% include 'icon-error' %}
              <span class="product-form__error-message" data-error-message>{{ 'products.product.quantity_minimum_message' | t }}</span>
            </div>

            <div class="product-form__controls-group product-form__controls-group--submit">
              <div class="product-form__item product-form__item--submit
                    {%- if section.settings.enable_payment_button %} product-form__item--payment-button {%- endif -%}
                    {%- if product.has_only_default_variant %} product-form__item--no-variants {%- endif -%}"
              >
                <button type="submit" name="add"
                  {% unless current_variant.available %} aria-disabled="true"{% endunless %}
                  aria-label="{% unless current_variant.available %}{{ 'products.product.sold_out' | t }}{% else %}{{ 'products.product.add_to_cart' | t }}{% endunless %}"
                  class="btn product-form__cart-submit{% if section.settings.enable_payment_button %} btn--secondary-accent{% endif %}"
                  data-add-to-cart>
                  <span data-add-to-cart-text>
                    {% unless current_variant.available %}
                      {{ 'products.product.sold_out' | t }}
                    {% else %}
                      {{ 'products.product.add_to_cart' | t }}
                    {% endunless %}
                  </span>
                  <span class="hide" data-loader>
                    {% include 'icon-spinner' %}
                  </span>
                </button>
                {% if section.settings.enable_payment_button %}
                  {{ form | payment_button }}
                {% endif %}
                <div class="ultimate-badges"></div>
              </div>
            </div>
        
          {% endform %}
        </div>

        {%- comment -%}
          Live region for announcing updated price and availability to screen readers
        {%- endcomment -%}
        <p class="visually-hidden" data-product-status
          aria-live="polite"
          role="status"
        ></p>

        {%- comment -%}
          Live region for announcing that the product form has been submitted and the
          product is in the process being added to the cart
        {%- endcomment -%}
        <p class="visually-hidden" data-loader-status
          aria-live="assertive"
          role="alert"
          aria-hidden="true"
        >{{ 'products.product.loader_label' | t }}</p>

        <div class="product-single__description rte">
          {{ product.description }}
        </div>

        {% if section.settings.show_share_buttons %}
          {% include 'social-sharing', share_title: product.title, share_permalink: product.url, share_image: product %}
        {% endif %}
    </div>
  </div>
</div>

{% unless product == empty %}
  <script type="application/json" id="ProductJson-{{ section.id }}">
    {{ product | json }}
  </script>
{% endunless %}



{% schema %}
{
  "name": {
    "da": "Produktsider",
    "de": "Produktseiten",
    "en": "Product pages",
    "es": "PƔginas de productos",
    "fi": "Tuotesivut",
    "fr": "Pages de produits",
    "hi": "ą¤‰ą¤¤ą„ą¤Ŗą¤¾ą¤¦ ą¤Ŗą„‡ą¤œ",
    "it": "Pagine di prodotto",
    "ja": "å•†å“ćƒšćƒ¼ć‚ø",
    "ko": "ģ œķ’ˆ ķŽ˜ģ“ģ§€",
    "ms": "Halaman produk",
    "nb": "Produktsider",
    "nl": "Productpagina's",
    "pt-BR": "PƔginas de produtos",
    "pt-PT": "PƔginas de produtos",
    "sv": "Produktsidor",
    "th": "หน้าสณนค้า",
    "zh-CN": "äŗ§å“é”µé¢",
    "zh-TW": "ē”¢å“é é¢"
  },
  "settings": [
    {
      "type": "select",
      "id": "image_size",
      "label": {
        "da": "Billedets stĆørrelse",
        "de": "Foto-Größe",
        "en": "Image size",
        "es": "TamaƱo de la imagen",
        "fi": "Kuvan koko",
        "fr": "Taille des images",
        "hi": "ą¤‡ą¤®ą„‡ą¤œ का आकार",
        "it": "Dimensione immagine",
        "ja": "ē”»åƒć‚µć‚¤ć‚ŗ",
        "ko": "ģ“ėÆøģ§€ 크기",
        "ms": "Saiz imej",
        "nb": "BildestĆørrelse",
        "nl": "Afbeeldingsformaat",
        "pt-BR": "Tamanho da imagem",
        "pt-PT": "Tamanho da imagem",
        "sv": "Bildstorlek",
        "th": "ąø‚ąø™ąø²ąø”ąø£ąø¹ąø›ąø ąø²ąøž",
        "zh-CN": "图片尺寸",
        "zh-TW": "åœ–ē‰‡å°ŗåÆø"
      },
      "options": [
        {
          "value": "small",
          "label": {
            "da": "Lille",
            "de": "Klein",
            "en": "Small",
            "es": "PequeƱa",
            "fi": "Pieni",
            "fr": "Petite",
            "hi": "ą¤›ą„‹ą¤Ÿą¤¾",
            "it": "Piccolo",
            "ja": "小",
            "ko": "스몰",
            "ms": "Kecil",
            "nb": "Liten",
            "nl": "Klein",
            "pt-BR": "Pequeno",
            "pt-PT": "Pequeno",
            "sv": "Liten",
            "th": "เค็ก",
            "zh-CN": "小",
            "zh-TW": "小型"
          }
        },
        {
          "value": "medium",
          "label": {
            "da": "Medium",
            "de": "Mittel",
            "en": "Medium",
            "es": "Mediana",
            "fi": "Keskisuuri",
            "fr": "Moyenne",
            "hi": "ą¤®ą¤§ą„ą¤Æą¤®",
            "it": "Medio",
            "ja": "äø­",
            "ko": "볓통",
            "ms": "Sederhana",
            "nb": "Middels",
            "nl": "Gemiddeld",
            "pt-BR": "MƩdio",
            "pt-PT": "MƩdio",
            "sv": "Medium",
            "th": "ปานกคาง",
            "zh-CN": "äø­ē­‰",
            "zh-TW": "äø­ē­‰"
          }
        },
        {
          "value": "large",
          "label": {
            "da": "Stor",
            "de": "Groß",
            "en": "Large",
            "es": "Grande",
            "fi": "Suuri",
            "fr": "Grande",
            "hi": "बऔ़ा",
            "it": "Grande",
            "ja": "大",
            "ko": "ė¼ģ§€",
            "ms": "Besar",
            "nb": "Stor",
            "nl": "Groot",
            "pt-BR": "Grande",
            "pt-PT": "Grande",
            "sv": "Stor",
            "th": "ą¹ƒąø«ąøą¹ˆ",
            "zh-CN": "大",
            "zh-TW": "大型"
          }
        },
        {
          "value": "full",
          "label": {
            "da": "Fuld bredde",
            "de": "Volle Breite",
            "en": "Full-width",
            "es": "Ancho completo",
            "fi": "TƤysi leveys",
            "fr": "Pleine largeur",
            "hi": "ą¤Ŗą„‚ą¤°ą„ą¤£ ą¤šą„Œą¤”ą¤¼ą¤¾ą¤ˆ",
            "it": "Intera larghezza",
            "ja": "å…Øå¹…",
            "ko": "전첓 ķ­",
            "ms": "Lebar penuh",
            "nb": "Full bredde",
            "nl": "Volledige breedte",
            "pt-BR": "Largura completa",
            "pt-PT": "Largura completa",
            "sv": "Full bredd",
            "th": "เต็ดควาดกว้าง",
            "zh-CN": "全宽",
            "zh-TW": "å®Œę•“åÆ¬åŗ¦"
          }
        }
      ],
      "default": "medium"
    },
    {
      "type": "checkbox",
      "id": "show_quantity_selector",
      "label": {
        "da": "Vis antalsvƦlger",
        "de": "QuantitƤts-Auswahl anzeigen",
        "en": "Show quantity selector",
        "es": "Mostrar selector de cantidad",
        "fi": "NƤytƤ mƤƤrƤn valitsin",
        "fr": "Afficher le sƩlecteur de quantitƩ",
        "hi": "ą¤®ą¤¾ą¤¤ą„ą¤°ą¤¾ ą¤šą¤Æą¤Øą¤•ą¤°ą„ą¤¤ą¤¾ ą¤¦ą¤æą¤–ą¤¾ą¤ą¤‚",
        "it": "Mostra selettore quantitĆ ",
        "ja": "ę•°é‡ć‚»ćƒ¬ć‚Æć‚æćƒ¼ć‚’č”Øē¤ŗć™ć‚‹",
        "ko": "ģˆ˜ėŸ‰ ģ„ ķƒźø° ķ‘œģ‹œ",
        "ms": "Tunjukkan pemilih kuantiti",
        "nb": "Vis mengdevelger",
        "nl": "Hoeveelheidskiezer weergeven",
        "pt-BR": "Exibir seletor de quantidade",
        "pt-PT": "Mostrar um seletor de quantidade",
        "sv": "Visa kvantitetsvƤljare",
        "th": "ą¹ąøŖąø”ąø‡ąø•ąø±ąø§ą¹€ąø„ąø·ąø­ąøąøˆąø³ąø™ąø§ąø™",
        "zh-CN": "ę˜¾ē¤ŗę•°é‡é€‰ę‹©å™Ø",
        "zh-TW": "é”Æē¤ŗę•øé‡éøę“‡å™Ø"
      },
      "default": false
    },
    {
      "type": "checkbox",
      "id": "show_variant_labels",
      "label": {
        "da": "Vis variantlabels",
        "de": "Varianten-Etiketten anzeigen",
        "en": "Show variant labels",
        "es": "Mostrar etiquetas de variantes",
        "fi": "NƤytƤ vaihtoehtoiset tarrat",
        "fr": "Afficher le nom des variantes",
        "hi": "ą¤µą„‡ą¤°ą¤æą¤ą¤‚ą¤Ÿ ą¤²ą„‡ą¤¬ą¤² ą¤¦ą¤æą¤–ą¤¾ą¤ą¤‚",
        "it": "Mostra etichette varianti",
        "ja": "ćƒćƒŖć‚Øćƒ¼ć‚·ćƒ§ćƒ³ć®ćƒ©ćƒ™ćƒ«ć‚’č”Øē¤ŗć™ć‚‹",
        "ko": "ģ“ķ˜• ģƒķ’ˆ ė ˆģ“ėø” ķ‘œģ‹œ",
        "ms": "Tunjukkan label varian",
        "nb": "Vis variantetiketter",
        "nl": "Variantlabels weergeven",
        "pt-BR": "Exibir etiquetas de variantes",
        "pt-PT": "Mostrar etiquetas de variantes",
        "sv": "Visa variantetiketter",
        "th": "ą¹ąøŖąø”ąø‡ąø›ą¹‰ąø²ąø¢ąøąø³ąøąø±ąøšąø•ąø±ąø§ą¹€ąø„ąø·ąø­ąøąøŖąø“ąø™ąø„ą¹‰ąø²",
        "zh-CN": "ę˜¾ē¤ŗå¤šå±žę€§ę ‡ē­¾",
        "zh-TW": "é”Æē¤ŗå­é”žéøé …ęØ™ē±¤"
      },
      "default": true
    },
    {
      "type": "checkbox",
      "id": "show_vendor",
      "label": {
        "da": "Vis leverandĆør",
        "de": "Lieferanten anzeigen",
        "en": "Show vendor",
        "es": "Mostrar proveedor",
        "fi": "NƤytƤ myyjƤ",
        "fr": "Afficher les vendeurs",
        "hi": "ą¤µą¤æą¤•ą„ą¤°ą„‡ą¤¤ą¤¾ ą¤¦ą¤æą¤–ą¤¾ą¤ą¤‚",
        "it": "Mostra fornitore",
        "ja": "č²©å£²å…ƒć‚’č”Øē¤ŗć™ć‚‹",
        "ko": "공급업첓 ķ‘œģ‹œ",
        "ms": "Tunjukkan vendor",
        "nb": "Vis leverandĆør",
        "nl": "Leverancier weergeven",
        "pt-BR": "Exibir fornecedor",
        "pt-PT": "Mostrar fornecedor",
        "sv": "Visa sƤljare",
        "th": "ą¹ąøŖąø”ąø‡ąøœąø¹ą¹‰ąø‚ąø²ąø¢",
        "zh-CN": "ę˜¾ē¤ŗåŽ‚å•†",
        "zh-TW": "锯示廠商"
      },
      "default": false
    },
    {
      "type": "checkbox",
      "id": "enable_zoom",
      "label": {
        "da": "AktivƩr billedzoom",
        "de": "Foto-Zoom zulassen",
        "en": "Enable image zoom",
        "es": "Habilitar zoom de imagen",
        "fi": "Ota kuvan zoomaus kƤyttƶƶn",
        "fr": "Activer le zoom d'image",
        "hi": "ą¤‡ą¤®ą„‡ą¤œ ą¤œą¤¼ą„‚ą¤® ą¤øą¤•ą„ą¤·ą¤® ą¤•ą¤°ą„‡ą¤‚",
        "it": "Abilita lo zoom dell'immagine",
        "ja": "ē”»åƒć‚ŗćƒ¼ćƒ ć‚’ęœ‰åŠ¹ć«ć™ć‚‹",
        "ko": "ģ“ėÆøģ§€ ķ™•ėŒ€ ģ‚¬ģš©",
        "ms": "Dayakan zum imej",
        "nb": "Aktiver bildezoom",
        "nl": "Inzoomen op afbeelding inschakelen",
        "pt-BR": "Habilitar o zoom da imagem",
        "pt-PT": "Ativar o zoom da imagem",
        "sv": "Aktivera bildzoom",
        "th": "ą¹€ąø›ąø“ąø”ą¹ƒąøŠą¹‰ąøąø²ąø£ąø‹ąø¹ąø”ąø ąø²ąøž",
        "zh-CN": "启用图片缩放",
        "zh-TW": "å•Ÿē”Øåœ–ē‰‡ēø®ę”¾"
      },
      "default": true
    },
    {
      "type": "checkbox",
      "id": "enable_payment_button",
      "label": {
        "da": "Vis dynamisk betalingsknap",
        "de": "Dynamischen Checkout Button anzeigen",
        "en": "Show dynamic checkout button",
        "es": "Mostrar botón de pago dinÔmico",
        "fi": "NƤytƤ dynaaminen kassapainike",
        "fr": "Afficher le bouton de passage Ć  la caisse dynamique",
        "hi": "ą¤”ą¤¾ą¤Æą¤Øą„‡ą¤®ą¤æą¤• ą¤šą„‡ą¤•ą¤†ą¤‰ą¤Ÿ बटन ą¤¦ą¤æą¤–ą¤¾ą¤ą¤‚",
        "it": "Mostra pulsante di check-out dinamico",
        "ja": "ćƒ€ć‚¤ćƒŠćƒŸćƒƒć‚Æćƒć‚§ćƒƒć‚Æć‚¢ć‚¦ćƒˆćƒœć‚æćƒ³ć‚’č”Øē¤ŗć™ć‚‹",
        "ko": "ė™ģ  결제 ė²„ķŠ¼ ķ‘œģ‹œ",
        "ms": "Tunjukkan butang daftar keluar dinamik",
        "nb": "Vis dynamisk knapp for Ƅ gƄ til kassen",
        "nl": "Dynamische checkout knop weergeven",
        "pt-BR": "Exibir botão dinâmico de finalização da compra",
        "pt-PT": "Mostrar o botão dinâmico de finalização da compra",
        "sv": "Visa dynamiska utcheckningsknappar",
        "th": "ą¹ąøŖąø”ąø‡ąø›ąøøą¹ˆąø”ąøŠąø³ąø£ąø°ą¹€ąø‡ąø“ąø™ą¹ąøšąøšą¹„ąø”ąø™ąø²ąø”ąø“ąø",
        "zh-CN": "ę˜¾ē¤ŗåŠØę€ē»“č“¦ęŒ‰é’®",
        "zh-TW": "é”Æē¤ŗå‹•ę…‹ēµåø³ęŒ‰éˆ•"
      },
      "info": {
        "da": "Den enkelte kunde vil se sin foretrukne betalingsmetode blandt dem, der er tilgƦngelige i din butik, f.eks. PayPal eller Apple Pay. [FƄ mere at vide](https://help.shopify.com/manual/using-themes/change-the-layout/dynamic-checkout)",
        "de": "Jeder Kunde sieht seine bevorzugte Zahlungsmethode aus den in Ihrem Shop verfügbaren Zahlungsmethoden wie PayPal oder Apple Pay. [Mehr Infos](https://help.shopify.com/manual/using-themes/change-the-layout/dynamic-checkout)",
        "en": "Each customer will see their preferred payment method from those available on your store, such as PayPal or Apple Pay. [Learn more](https://help.shopify.com/manual/using-themes/change-the-layout/dynamic-checkout)",
        "es": "Cada cliente verÔ su forma de pago preferida entre las disponibles en tu tienda, como PayPal o Apple Pay. [MÔs información](https://help.shopify.com/manual/using-themes/change-the-layout/dynamic-checkout)",
        "fi": "Kukin asiakas nƤkee ensisijaisen valintansa kauppasi tarjoamista maksutavoista, esim. PayPal tai Apple Pay. [LisƤtietoja](https://help.shopify.com/manual/using-themes/change-the-layout/dynamic-checkout)",
        "fr": "Chaque client verra son moyen de paiement prƩfƩrƩ parmi ceux qui sont proposƩs sur votre boutique, tels que PayPal ou Apple Pay. [En savoir plus](https://help.shopify.com/manual/using-themes/change-the-layout/dynamic-checkout)",
        "hi": "ą¤Ŗą„ą¤°ą¤¤ą„ą¤Æą„‡ą¤• ą¤—ą„ą¤°ą¤¾ą¤¹ą¤• ą¤†ą¤Ŗą¤•ą„‡ ą¤øą„ą¤Ÿą„‹ą¤° पर ą¤‰ą¤Ŗą¤²ą¤¬ą„ą¤§ ą¤…ą¤Ŗą¤Øą„€ ą¤Ŗą¤øą¤‚ą¤¦ą„€ą¤¦ą¤¾ ą¤­ą„ą¤—ą¤¤ą¤¾ą¤Ø ą¤•ą„€ विधि ą¤¦ą„‡ą¤–ą„‡ą¤‚ą¤—ą„‡ ą¤œą„ˆą¤øą„‡ PayPal या Apple Pay. [अधिक ą¤œą¤¾ą¤Øą„‡ą¤‚](https://help.shopify.com/manual/using-themes/change-the-layout/dynamic-checkout)",
        "it": "Ogni cliente vedrĆ  il suo metodo di pagamento preferito tra quelli disponibili nel tuo negozio, come PayPal o Apple Pay. [Maggiori informazioni](https://help.shopify.com/manual/using-themes/change-the-layout/dynamic-checkout)",
        "ja": "PayPal悄Apple PayćŖć©ć€ć‚¹ćƒˆć‚¢ć§åˆ©ē”ØåÆčƒ½ćŖåøŒęœ›ć®ę±ŗęøˆę–¹ę³•ćŒćŠå®¢ę§˜ć«č”Øē¤ŗć•ć‚Œć¾ć™ć€‚[ć‚‚ć£ćØč©³ć—ć](https://help.shopify.com/manual/using-themes/change-the-layout/dynamic-checkout)",
        "ko": "각 ź³ ź°ģ€ PayPal ė˜ėŠ” Apple Pay와 ź°™ģ“ ģŠ¤ķ† ģ–“ģ—ģ„œ ģ‚¬ģš© ź°€ėŠ„ķ•œ ģ§€ė¶ˆ ė°©ė²•ģ„ ķ™•ģøķ•  수 ģžˆģŠµė‹ˆė‹¤. [ģžģ„øķžˆ ģ•Œģ•„ė³“źø°](https://help.shopify.com/manual/using-themes/change-the-layout/dynamic-checkout)",
        "ms": "Setiap pelanggan akan melihat kaedah pembayaran keutamaan mereka dari yang tersedia di kedai anda, seperti PayPal atau Apple Pay. [Ketahui lebih lanjut](https://help.shopify.com/manual/using-themes/change-the-layout/dynamic-checkout)",
        "nb": "Hver enkelt kunde vil se sin foretrukne betalingsmƄte blant de som er tilgjengelig i butikken din, som PayPal eller Apple Pay. [Finn ut mer](https://help.shopify.com/manual/using-themes/change-the-layout/dynamic-checkout)",
        "nl": "Elke klant ziet zijn of haar beschikbare voorkeursmethode om af te rekenen, zoals PayPal of Apple Pay. [Meer informatie](https://help.shopify.com/manual/using-themes/change-the-layout/dynamic-checkout)",
        "pt-BR": "Cada cliente verĆ” sua forma de pagamento preferida dentre as disponĆ­veis na loja, como PayPal ou Apple Pay. [Saiba mais](https://help.shopify.com/manual/using-themes/change-the-layout/dynamic-checkout)",
        "pt-PT": "Cada cliente irƔ ver o seu mƩtodo de pagamento preferido entre os disponƭveis na loja, como o PayPal ou Apple Pay. [Saiba mais](https://help.shopify.com/manual/using-themes/change-the-layout/dynamic-checkout)",
        "sv": "Varje kund kommer att se den fƶredragna betalningsmetoden frƄn de som finns tillgƤngliga i din butik, till exempel PayPal eller Apple Pay. [LƤs mer](https://help.shopify.com/manual/using-themes/change-the-layout/dynamic-checkout)",
        "th": "ąø„ąø¹ąøąø„ą¹‰ąø²ą¹ąø•ą¹ˆąø„ąø°ąø£ąø²ąø¢ąøˆąø°ą¹€ąø«ą¹‡ąø™ąø§ąø“ąø˜ąøµąøąø²ąø£ąøŠąø³ąø£ąø°ą¹€ąø‡ąø“ąø™ąø—ąøµą¹ˆąø•ą¹‰ąø­ąø‡ąøąø²ąø£ąøˆąø²ąøąø§ąø“ąø˜ąøµąø—ąøµą¹ˆą¹ƒąøŠą¹‰ą¹„ąø”ą¹‰ą¹ƒąø™ąø£ą¹‰ąø²ąø™ąø„ą¹‰ąø²ąø‚ąø­ąø‡ąø„ąøøąø“ ą¹€ąøŠą¹ˆąø™ PayPal หรือ Apple Pay [ąø”ąø¹ąø‚ą¹‰ąø­ąø”ąø¹ąø„ą¹€ąøžąø“ą¹ˆąø”ą¹€ąø•ąø“ąø”](https://help.shopify.com/manual/using-themes/change-the-layout/dynamic-checkout)",
        "zh-CN": "ęÆä½å®¢ęˆ·éƒ½åÆåœØę‚Øå•†åŗ—ęä¾›ēš„ä»˜ę¬¾ę–¹å¼äø­ēœ‹åˆ°ä»–ä»¬ēš„é¦–é€‰ä»˜ę¬¾ę–¹å¼ļ¼Œä¾‹å¦‚ PayPal ꈖ Apple Pay怂[了解详细俔息](https://help.shopify.com/manual/using-themes/change-the-layout/dynamic-checkout)",
        "zh-TW": "ęÆä½é”§å®¢éƒ½åÆä»„åœØę‚Øå•†åŗ—å…§é–‹ę”¾ä½æē”Øēš„ä»˜ę¬¾ę–¹å¼äø­ēœ‹č¦‹ä»–å€‘åå„½ä½æē”Øēš„ę–¹å¼ļ¼Œå¦‚ PayPal态Apple Pay 等。[ę·±å…„ēž­č§£ē›øé—œč³‡čØŠ](https://help.shopify.com/manual/using-themes/change-the-layout/dynamic-checkout)"
      },
      "default": true
    },
    {
      "type": "checkbox",
      "id": "show_share_buttons",
      "label": {
        "da": "Vis knapper til deling pƄ sociale medier",
        "de": "Buttons für Social Media anzeigen",
        "en": "Show social sharing buttons",
        "es": "Mostrar botones para compartir en redes sociales",
        "fi": "NƤytƤ sosiaalisen median jakamispainikkeet",
        "fr": "Affichez les boutons de partage sur les mƩdias sociaux",
        "hi": "ą¤øą„‹ą¤¶ą¤² ą¤¶ą„‡ą¤Æą¤°ą¤æą¤‚ą¤— बटन ą¤¦ą¤æą¤–ą¤¾ą¤ą¤‚",
        "it": "Mostra i pulsanti per la condivisione sui social",
        "ja": "ć‚½ćƒ¼ć‚·ćƒ£ćƒ«å…±ęœ‰ćƒœć‚æćƒ³ć‚’č”Øē¤ŗć™ć‚‹",
        "ko": "ģ†Œģ…œ 공유 ė²„ķŠ¼ ķ‘œģ‹œ",
        "ms": "Tunjukkan butang perkongsian sosial",
        "nb": "Vis knapper for deling pƄ sosiale medier",
        "nl": "Knoppen voor sociaal delen weergeven",
        "pt-BR": "Exibir botƵes de compartilhamento em redes sociais",
        "pt-PT": "Mostrar botƵes de partilha nas redes sociais",
        "sv": "Visa knappar fƶr delning i sociala medier",
        "th": "ą¹ąøŖąø”ąø‡ąø›ąøøą¹ˆąø”ąøŖąø³ąø«ąø£ąø±ąøšą¹ąøŠąø£ą¹Œąø„ąø‡ą¹‚ąø‹ą¹€ąøŠąøµąø¢ąø„",
        "zh-CN": "ę˜¾ē¤ŗē¤¾äŗ¤åˆ†äŗ«ęŒ‰é’®",
        "zh-TW": "é”Æē¤ŗē¤¾ē¾¤åˆ†äŗ«ęŒ‰éˆ•"
      },
      "default": true
    }
  ]
}
{% endschema %}
<script>
var productOptions = [];
  {% for option in product.options %}
  var optionObj = {};
  optionObj[ {{ forloop.index0 }} ] = "{{ product.options[forloop.index0] }}";
  productOptions.push(optionObj);
  {% endfor %}
</script>


{% comment %}
Place this in your product.liquid template, at the bottom.
{% endcomment %}
{% if product.variants.size > 1 %}
<script>
  var variantImages = {},
    thumbnails,
    variant,
    variantImage,
    optionValue,
    productOptions = [];
    {% for variant in product.variants %}
       variant = {{ variant | json }};
       if ( typeof variant.featured_image !== 'undefined' && variant.featured_image !== null ) {
         variantImage =  variant.featured_image.src.split('?')[0].replace(/http(s)?:/,'');
         variantImages[variantImage] = variantImages[variantImage] || {};
         {% for option in product.options %}
         
           {% assign option_value = variant.options[forloop.index0] %}
           {% assign option_key = 'option-' | append: forloop.index0 %}
         	
           if (typeof variantImages[variantImage][{{ option_key | json }}] === 'undefined') {
             variantImages[variantImage][{{ option_key | json }}] = {{ option_value | json }};
           }
           else {
             var oldValue = variantImages[variantImage][{{ option_key | json }}];
             if ( oldValue !== null && oldValue !== {{ option_value | json }} )  {
               variantImages[variantImage][{{ option_key | json }}] = null;
             }
           }
         {% endfor %}
       }
       productOptions.push(variant);
    {% endfor %}
</script> 
{% endif %}

Please help 

Accepted Solution (1)

Accepted Solutions
littletingles
Excursionist
40 2 2

This is an accepted solution.

Figured it out myself. If anyone ever has this problem. I had to add:

value="{{ variant.id }}">	
                    {{ variant.title }}

too line 162 so that the code would look like this:

 <option {% if variant == product.selected_or_first_available_variant %} selected="selected" {% endif %} {% assign featured_image = product.images.first | default: product.featured_image %} value="{{ variant.id }}">	
                    {{ variant.title }}
                  </option>

So glad I didn't pay someone just to find out that I need to add such a simple line of code to make it work. 

View solution in original post

Replies 8 (8)
littletingles
Excursionist
40 2 2

This is an accepted solution.

Figured it out myself. If anyone ever has this problem. I had to add:

value="{{ variant.id }}">	
                    {{ variant.title }}

too line 162 so that the code would look like this:

 <option {% if variant == product.selected_or_first_available_variant %} selected="selected" {% endif %} {% assign featured_image = product.images.first | default: product.featured_image %} value="{{ variant.id }}">	
                    {{ variant.title }}
                  </option>

So glad I didn't pay someone just to find out that I need to add such a simple line of code to make it work. 

kristinakayyy
New Member
1 0 1

hi im having the same issue with my website and have the debut them too, im not the best with themes any chance you could do a step by step

sanketJ
Shopify Partner
18 0 1

how to add question in shopify community?

can you help me??

Peyamirfani
New Member
2 0 1

Hello All,

 

I am facing the exact problem, my theme is Dawn. 

I tried to locate the right place in coding to add mentioned solution but it does not work. 

Anybody had the same problem with Dawn theme and found a solution? 

Please share the solution with all of us. 

I searched throughout Shopify but could not find the any useful information for dawn theme. 

veryrobert
New Member
3 0 0

Just had the same issue kick in our site unexpectedly, looks like the issue was being cause by conflicting apps in the cart. Specifically the 'Volume Boost' App. 

 

We disabled this app and it seemed to have fixed the issue. 

Nansy
New Member
2 0 0

I have the same problem with dawn theme did you found the solution?

\

 

lilithandselene
Tourist
5 0 1

I'm just wondering if anyone found the fix for Dawn theme? I found this part of the code above, but it's all there.

 

He's current code for that section:

 

<noscript class="product-form__noscript-wrapper-{{ section.id }}">
<div class="product-form__input{% if product.has_only_default_variant %} hidden{% endif %}">
<label class="form__label" for="Variants-{{ section.id }}">{{ 'products.product.product_variants' | t }}</label>
<div class="select">
<select name="id" id="Variants-{{ section.id }}" class="select__select" form="{{ product_form_id }}">
{%- for variant in product.variants -%}
<option>
{% if variant == product.selected_or_first_available_variant %}selected="selected"{% endif %}
{% if variant.available == false %}disabled{% endif %}

value="{{ variant.id }}"

 

I've added, I've removed. Nothing seems to work. Let me know if anyone got a solution! Thanks in advance!

Nicole
Lilith and Selene
Rohonupe99
New Member
2 0 0

i'm using the debut theme and i'm having the same issue. I don't see a template.liquid file. in my theme code