{% extends "_layouts/elementindex" %} {% set title = "Product Variants"|t('commerce') %} {% set docTitle = title~' - '~'Commerce' %} {% set elementType = 'craft\\commerce\\elements\\Variant' %} {% set selectedTab = 'products' %} {% set selectedSubnavItem = "products" %} {% set bodyClass = (bodyClass is defined ? bodyClass~' ' : '') ~ "commerceproducts commerceproductsindex" %} {% js %} if (typeof Craft.Commerce === 'undefined') { Craft.Commerce = {}; } Craft.Commerce.editableProductTypes = [ {% for productType in craft.commerce.productTypes.editableProductTypes %} {id: {{ productType.id }}, name: "{{ productType.name|t('commerce')|e('js') }}", handle: "{{ productType.handle|e('js') }}"}{% if not loop.last %},{% endif %} {% endfor %} ]; {% if productTypeHandle is defined %} window.defaultProductTypeHandle = '{{ productTypeHandle }}'; {% endif %} {% endjs %}