<div id="sizeColorDiv_{$itr}" style="display: inline">
    <select class="select2 wdt300 productchange colorsize" 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 id='tobedel'>
        <input type="hidden" name="current_itr" id="current_itr" value="{$itr}"/>
    </div>
</div>
{literal}
<script>
    var SCrowitr = $('#current_itr').val();
    $('#tobedel').remove();
    $('#product' + SCrowitr).select2();
</script>
{/literal}