Im building a ticketing system with expresso store and I'm having issues duplicating the product modifier. My custom modifier is a text input field that adds a name to each ticket. Any Ideas on what would be the best way to go about this?
here is my product template:
{embed="store_example/_header"}
<script type="text/javascript">
function repeat(obj) {
var CurrentLi = $(obj).parent("li").append();
CurrentLi.clone().insertAfter(CurrentLi);
}
</script>
{exp:store:product_form }
<div class="ticket-wrap">
{exp:channel:entries channel="tickets" }
{exp:store:product entry_id="{entry_id}" disable_form="yes"}
<p>Ticket Price: {price}</p>
<div class="ticket">
{modifiers}
<ul>
<li><label>{modifier_name} {count} </label><input type="text" name="items[{count}][{modifier_input_name}]" /> <a class="add" href="#" onclick="repeat(this)">+</a></li>
<li><input type="hidden" name="items[{count}][entry_id]" value="{entry_id}" /></li>
</ul>
{/modifiers}
</div><!-- /ticket -->
{/exp:store:product}
{/exp:channel:entries}
</div> <!-- /ticket-wrap -->
<input type="submit" name="submit" value="Add to Cart" />
{/exp:store:product_form}
{embed="store_example/_cart"}
{embed="store_example/_footer"}