1

I am using the product_form tag to add multiple items to the cart at one time. I am passing a category per product to a custom_modifier_name but the value is not being carried over into the cart/checkout.

{exp:store:product disable_form="yes" entry_id="{embed:entry_id}" input:finish="Finish"}
{exp:channel:entries parse="inward" entry_id="{embed:entry_id}" dynamic="no"}
<div class="product-add-ons mix{categories} {category_url_title}{/categories}">
<h2>{title}</h2>
<h2>{price}</h2>
<input type="hidden" name="items[{entry_id}][entry_id]" value="{entry_id}" />
<input type="text" name="items[{entry_id}][item_qty]" id="textfield" /> Qty
{modifiers}
{if modifier_instructions}<p class="instr">{modifier_instructions}</p>{/if}
{if modifier_type == 'var' OR modifier_type == 'var_single_sku'}
<!-- select -->
<select id="{modifier_input_name}" name="items[{entry_id}][{modifier_input_name}]" style="visibility:hidden">
<option value=""></option>
<option value="{option_id}">
{option_name} {if price_mod_val} ({price_mod}) {/if}
</option>
{/modifier_options}
</select>
{if:else}
{modifier_options}
<input type="text" name="items[{entry_id}][{modifier_input_name}]" />
{/modifier_options}
{/if}
{/modifiers}
<input type="hidden" name="items[{entry_id}][finish]" value="{categories}{category_name}{/categories}" />
</div>
{/exp:channel:entries}
{/exp:store:product}

Everything else works great except for my custom modifier. I have tried using it in and outside of the {modifiers} tags with no luck either.

Any help would be greatly appreciated! Cheers!

Danielle

1

When you are using the product_form tag you need to move input:finish="Finish" to the {exp:store:product_form input:finish="Finish"} tag instead of on the {exp:store:product} tag

1
  • 1
    Bingo. And the reason for this is that the custom inputs are encrypted and stored in the hidden _params field you will notice is added to your HTML form. When you use disable_form on the inner product tag this hidden field doesn't get added, hence why Store ignores the input. – Adrian Macneil May 26 '13 at 11:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.