
<div id="productIdDiv_{$itr}" style="display: inline">
    <input type="hidden" name="proIsOptic_{$itr}" id="proIsOptic_{$itr}" value=""/>
    <select class="select2 wdt300 productchange" data-itr="{$itr}" name="product{$itr}" id="product{$itr}">
        {if $catData->isOptic == 2}
        <option value="-1">اختر مقاس/لون</option>
        {else}
        <option value="-1">اختر منتج</option>
        {/if}

        {foreach $products as $data}
        <option value="{$data->productId}" data-optic="{$data->isOptic}">{$data->productName}</option>
        {/foreach}
    </select>
</div>
{literal}
<script>
    var rowitr = $('#hidden_itr').val();
    $('#product' + rowitr).select2();
</script>
{/literal}