-
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
Description
Trying to include multiple products in a template with variants in groups of radio buttons. The problem is that MultiAdd utilizes the name attribute of the input, making each name unique. Code snippet follows. I need to either:
- Find a way to have MultiAdd work with matching/grouped name attributes
- Find another way to group radio inputs while having name attributes with unique names
{% set itemsIndex = 0 %}
{% for product in entry.productType %}
{% for variant in product.variants %}
{% set itemsIndex = itemsIndex + 1 %}
<input type="hidden" name="items[{{ itemsIndex }}][purchasableId]" value="{{ variant.id }}">
<label class="radioLabel"><input type="radio" name="items[{{ itemsIndex }}][qty]" value="1"> {{ variant.title }}</label>
{% endfor %}
{% endfor %}