 {if $po.variants}
                                {assign var="option" value=""}
                                {assign var="selected_variant" value=""}
                                {assign var="customOptionID" value=$po.customOptionID}  
                               {foreach from=$po.variants item="vr" name=vars}
                                    {assign var="option" value=$option|cat:"~*"|cat:$vr.customOptionVariantID|cat:"->"|cat:$vr.value}
                                    {if $vr.priceDiff > 0}
                                        {assign var="priceDiff" value=$vr.priceDiff|price:'':$productDefaultCurrency:$currentCurrencyID}
                                        {if $vr.priceDiffType == 'I'}
                                            {assign var="option" value=$option|cat:" ( + "|cat:$priceDiff|cat:" )"}
                                        {elseif $vr.priceDiffType == 'D'}
                                            {assign var="option" value=$option|cat:" ( - "|cat:$priceDiff|cat:" )"}
                                        {elseif $vr.priceDiffType == 'O'}
                                            {assign var="option" value=$option|cat:" ( "|cat:$priceDiff|cat:" )"}
                                        {/if}
                                    {/if}
								{if $setdefaultimages[$customOptionID].id > 0}	
									{assign var="selected_variant" value=$setdefaultimages[$customOptionID].id}
                                    {assign var="selected_variant_image" value=$setdefaultimages[$customOptionID].image}
                                {else}
									{if $vr.isDefault == 1}
										{assign var="selected_variant" value=$vr.customOptionVariantID}
										{assign var="selected_variant_image" value=$vr.variantThumbImage}
										{*<script>
											var selectedCustomOptions['{$po.customOptionName}'][] = {id:'{$vr.customOptionVariantID}',image:'{$vr.variantThumbImage}'};
										</script>*}
									{/if}
								{/if}
                                
                                        {if $vr.variantThumbImage!=''}
                                        <li class="trans5s float-left mx-1 mb-2" id="variant_thumb_image_li_{$vr.customOptionVariantID}">
                                        {*onclick="fn_set_options(this,'{$selectedProductID}', '{$po.customOptionID}','{$vr.customOptionVariantID}');"*}    
                                       <a class="d-inline-block {if $vr.customOptionVariantID == $selected_variant}active {/if} variants_{$po.customOptionID}" id="variant_thumb_image_{$vr.customOptionVariantID}"  href="javascript:void(0);"  
                                           	onclick="fn_set_options(this,'{$selectedProductID}', '{$po.customOptionID}','{$vr.customOptionVariantID}','{$po.customOptionName}');"><img src="{$view_public_path}/uploads/catalog/custom-option-variant/{$vr.variantThumbImage}" alt="image" class="img-fluid hand var_image_{$vr.customOptionVariantID}"/></a>
                                        <span class="font-weight-bold h6 mt-3 text-secondary position-absolute left-0">{$vr.value}</span>
                                        </li>
                                        {/if}
                                        {if $selected_variant ==''}
                                                {assign var="option" value="->"|cat:$language.lblSelect|cat: $option}
                                        {else}
                                                {assign var="option" value=$option}
                                        {/if}
                             {/foreach}
                             {form->select 
					id="option_"|cat:$selectedProductID|cat:"_"|cat:$po.customOptionID 
					name="option_"|cat:$obj_prefix|cat:$selectedProductID|cat:"_"|cat:$po.customOptionID
					class="listbox form-control custom_option hide" 
					onchange="fn_change_options(this,'$selectedProductID', '$customOptionID');"						
					options="$option"
                                        value="$selected_variant"
					rel=$po.customOptionID
				}
                                {form->hidden class="hid_custom_option" name="hidoption_"|cat:$selectedProductID|cat:"_"|cat:$po.customOptionID  value=$selected_variant rel=$po.customOptionID}
                             {/if}