小编Vla*_*mir的帖子

Shopify - 将尺寸变体从选择下拉菜单更改为按钮

我想将我的变体显示从下拉(选择)改为使用按钮。我在网上的其他地方找不到任何最新的指南。我正在使用 Debut shopify 主题。

它目前看起来像这个下拉菜单,但我想将其更改为具有大小的按钮。即,您单击所需的尺寸按钮,然后单击其下方的标准“添加到购物车”按钮(该按钮已经就位,但目前用于下拉菜单)。

这是代码:

          {% 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 -%}
            {%- if current_variant.available == false %} product-form--variant-sold-out {%- 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" …
Run Code Online (Sandbox Code Playgroud)

liquid shopify shopify-template

3
推荐指数
1
解决办法
4060
查看次数

标签 统计

liquid ×1

shopify ×1

shopify-template ×1