<div id="product">
{% form 'product', product, id: "form_buy", name: "form_buy" %}
<div class="form-group" {% if product.variants.size == 1 and product.variants.first.title contains 'Default' %}style="display:none"{% endif %}>
<select name="id" id="productSelect" class="form-control">
{% for variant in product.variants %}
{% if variant.available %}
<option {% if variant == product.selected_or_first_available_variant %} selected="selected" {% endif %} data-sku="{{ variant.sku }}" value="{{ variant.id }}">{{ variant.title }} - {{ variant.price | money_with_currency }}</option>
{% else %}
<option disabled="disabled">
{{ variant.title }} - {{ 'products.product.sold_out' | t }}
</option>
{% endif %}
{% endfor %}
</select>
{% if section.settings.show_variant_swatches != 'false' %}
{% if product.available and product.variants.size > 1 %}
{% for option in product.options %}
{% include 'swatch' with option %}
{% endfor %}
{% endif %}
{% else %}
<style type="text/css">
.selector-wrapper {
display: block;
}
#productSelect {
display: block;
}
</style>
{% endif %}
</div>
<div class="form-group">
{% if section.settings.show_buy_now %}
{{ form | payment_button }}
{% endif %}
</div>
{% endform %}
<!-- end-button -->
</div>
Hello again this code works fine but when I use this code my addtocart button does not response. Anyone can help me ?
User | Count |
---|---|
450 | |
187 | |
139 | |
61 | |
44 |