Prestige theme, make variants a simple select

Prestige theme, make variants a simple select

mycreations
Visitor
2 0 1

I'm doing a custom product template, where I need to make the variant selector a simple <select> dropdown. It's easy to get it to show, but I'm unable to get the meta data to update when I change the value. 
The Dropdown that I have is:

 

 

      <div class="ProductForm__Option">
        <div class="Select Select--primary">
          {%- render 'icon' with 'select-arrow' -%}

          <select id="product-select-{{ product.id }}" name="id" title="Variant">
            {%- for variant in product.variants -%}
              <option {% if variant == selected_variant %}selected="selected"{% endif %} {% unless variant.available %}disabled="disabled"{% endunless %} value="{{ variant.id }}" data-sku="{{ variant.sku }}">{{ variant.title }} - {{ variant.price | money }}</option>
            {%- endfor -%}
          </select>
        </div>
      </div>
    {%- else -%}
      <input type="hidden" name="id" data-sku="{{ selected_variant.sku }}" value="{{ selected_variant.id }}">
    {%- endunless -%}

 

 

But when looking in theme.js, I can't really see how I should be able to hook up a select to the "_onVariantChanged". Is this completely unsupported in this theme? 

Reply 1 (1)
mycreations
Visitor
2 0 1

Prestige theme