<?php /* Smarty version Smarty-3.1.8, created on 2020-12-10 17:31:00
         compiled from "/home/agmc/beta/application/core/views/frontend/mini/catalog/default/AjaxCustVariants.tpl" */ ?>
<?php /*%%SmartyHeaderCode:10079374705e26d464ee2580-60013831%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '3ae7d527964e63bd2d36dba38180f66af84db18f' => 
    array (
      0 => '/home/agmc/beta/application/core/views/frontend/mini/catalog/default/AjaxCustVariants.tpl',
      1 => 1605520856,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '10079374705e26d464ee2580-60013831',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.8',
  'unifunc' => 'content_5e26d464f326a5_82374017',
  'variables' => 
  array (
    'po' => 0,
    'option' => 0,
    'vr' => 0,
    'productDefaultCurrency' => 0,
    'currentCurrencyID' => 0,
    'priceDiff' => 0,
    'customOptionID' => 0,
    'setdefaultimages' => 0,
    'selected_variant' => 0,
    'selectedProductID' => 0,
    'view_public_path' => 0,
    'language' => 0,
    'obj_prefix' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5e26d464f326a5_82374017')) {function content_5e26d464f326a5_82374017($_smarty_tpl) {?> <?php if ($_smarty_tpl->tpl_vars['po']->value['variants']){?>
                                <?php $_smarty_tpl->tpl_vars["option"] = new Smarty_variable('', null, 0);?>
                                <?php $_smarty_tpl->tpl_vars["selected_variant"] = new Smarty_variable('', null, 0);?>
                                <?php $_smarty_tpl->tpl_vars["customOptionID"] = new Smarty_variable($_smarty_tpl->tpl_vars['po']->value['customOptionID'], null, 0);?>  
                               <?php  $_smarty_tpl->tpl_vars["vr"] = new Smarty_Variable; $_smarty_tpl->tpl_vars["vr"]->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['po']->value['variants']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars["vr"]->key => $_smarty_tpl->tpl_vars["vr"]->value){
$_smarty_tpl->tpl_vars["vr"]->_loop = true;
?>
                                    <?php $_smarty_tpl->tpl_vars["option"] = new Smarty_variable((((($_smarty_tpl->tpl_vars['option']->value).("~*")).($_smarty_tpl->tpl_vars['vr']->value['customOptionVariantID'])).("->")).($_smarty_tpl->tpl_vars['vr']->value['value']), null, 0);?>
                                    <?php if ($_smarty_tpl->tpl_vars['vr']->value['priceDiff']>0){?>
                                        <?php $_smarty_tpl->tpl_vars["priceDiff"] = new Smarty_variable($_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER]['price'][0][0]->getFormattedCurrency($_smarty_tpl->tpl_vars['vr']->value['priceDiff'],'',$_smarty_tpl->tpl_vars['productDefaultCurrency']->value,$_smarty_tpl->tpl_vars['currentCurrencyID']->value), null, 0);?>
                                        <?php if ($_smarty_tpl->tpl_vars['vr']->value['priceDiffType']=='I'){?>
                                            <?php $_smarty_tpl->tpl_vars["option"] = new Smarty_variable(((($_smarty_tpl->tpl_vars['option']->value).(" ( + ")).($_smarty_tpl->tpl_vars['priceDiff']->value)).(" )"), null, 0);?>
                                        <?php }elseif($_smarty_tpl->tpl_vars['vr']->value['priceDiffType']=='D'){?>
                                            <?php $_smarty_tpl->tpl_vars["option"] = new Smarty_variable(((($_smarty_tpl->tpl_vars['option']->value).(" ( - ")).($_smarty_tpl->tpl_vars['priceDiff']->value)).(" )"), null, 0);?>
                                        <?php }elseif($_smarty_tpl->tpl_vars['vr']->value['priceDiffType']=='O'){?>
                                            <?php $_smarty_tpl->tpl_vars["option"] = new Smarty_variable(((($_smarty_tpl->tpl_vars['option']->value).(" ( ")).($_smarty_tpl->tpl_vars['priceDiff']->value)).(" )"), null, 0);?>
                                        <?php }?>
                                    <?php }?>
								<?php if ($_smarty_tpl->tpl_vars['setdefaultimages']->value[$_smarty_tpl->tpl_vars['customOptionID']->value]['id']>0){?>	
									<?php $_smarty_tpl->tpl_vars["selected_variant"] = new Smarty_variable($_smarty_tpl->tpl_vars['setdefaultimages']->value[$_smarty_tpl->tpl_vars['customOptionID']->value]['id'], null, 0);?>
                                    <?php $_smarty_tpl->tpl_vars["selected_variant_image"] = new Smarty_variable($_smarty_tpl->tpl_vars['setdefaultimages']->value[$_smarty_tpl->tpl_vars['customOptionID']->value]['image'], null, 0);?>
                                <?php }else{ ?>
									<?php if ($_smarty_tpl->tpl_vars['vr']->value['isDefault']==1){?>
										<?php $_smarty_tpl->tpl_vars["selected_variant"] = new Smarty_variable($_smarty_tpl->tpl_vars['vr']->value['customOptionVariantID'], null, 0);?>
										<?php $_smarty_tpl->tpl_vars["selected_variant_image"] = new Smarty_variable($_smarty_tpl->tpl_vars['vr']->value['variantThumbImage'], null, 0);?>
										
									<?php }?>
								<?php }?>
                                
                                        <?php if ($_smarty_tpl->tpl_vars['vr']->value['variantThumbImage']!=''){?>
                                        <li class="trans5s float-left mx-1 mb-2" id="variant_thumb_image_li_<?php echo $_smarty_tpl->tpl_vars['vr']->value['customOptionVariantID'];?>
">
                                            
                                       <a class="d-inline-block <?php if ($_smarty_tpl->tpl_vars['vr']->value['customOptionVariantID']==$_smarty_tpl->tpl_vars['selected_variant']->value){?>active <?php }?> variants_<?php echo $_smarty_tpl->tpl_vars['po']->value['customOptionID'];?>
" id="variant_thumb_image_<?php echo $_smarty_tpl->tpl_vars['vr']->value['customOptionVariantID'];?>
"  href="javascript:void(0);"  
                                           	onclick="fn_set_options(this,'<?php echo $_smarty_tpl->tpl_vars['selectedProductID']->value;?>
', '<?php echo $_smarty_tpl->tpl_vars['po']->value['customOptionID'];?>
','<?php echo $_smarty_tpl->tpl_vars['vr']->value['customOptionVariantID'];?>
','<?php echo $_smarty_tpl->tpl_vars['po']->value['customOptionName'];?>
');"><img src="<?php echo $_smarty_tpl->tpl_vars['view_public_path']->value;?>
/uploads/catalog/custom-option-variant/<?php echo $_smarty_tpl->tpl_vars['vr']->value['variantThumbImage'];?>
" alt="<?php echo $_smarty_tpl->tpl_vars['po']->value['customOptionName'];?>
" class="img-fluid hand var_image_<?php echo $_smarty_tpl->tpl_vars['vr']->value['customOptionVariantID'];?>
"/></a>
                                        <span class="font-weight-bold  text-uppercase h6 mt-3 text-secondary position-absolute left-0"><?php echo $_smarty_tpl->tpl_vars['vr']->value['value'];?>
</span>
                                        </li>
                                        <?php }?>
                                        <?php if ($_smarty_tpl->tpl_vars['selected_variant']->value==''){?>
                                                <?php $_smarty_tpl->tpl_vars["option"] = new Smarty_variable((("->").($_smarty_tpl->tpl_vars['language']->value['lblSelect'])).($_smarty_tpl->tpl_vars['option']->value), null, 0);?>
                                        <?php }else{ ?>
                                                <?php $_smarty_tpl->tpl_vars["option"] = new Smarty_variable($_smarty_tpl->tpl_vars['option']->value, null, 0);?>
                                        <?php }?>
                             <?php } ?>
                             <?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->select(array('id'=>((("option_").($_smarty_tpl->tpl_vars['selectedProductID']->value)).("_")).($_smarty_tpl->tpl_vars['po']->value['customOptionID']),'name'=>(((("option_").($_smarty_tpl->tpl_vars['obj_prefix']->value)).($_smarty_tpl->tpl_vars['selectedProductID']->value)).("_")).($_smarty_tpl->tpl_vars['po']->value['customOptionID']),'class'=>"listbox form-control custom_option hide",'onchange'=>"fn_change_options(this,'".($_smarty_tpl->tpl_vars['selectedProductID']->value)."', '".($_smarty_tpl->tpl_vars['customOptionID']->value)."');",'options'=>($_smarty_tpl->tpl_vars['option']->value),'value'=>($_smarty_tpl->tpl_vars['selected_variant']->value),'rel'=>$_smarty_tpl->tpl_vars['po']->value['customOptionID']),$_smarty_tpl);?>

                                <?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->hidden(array('class'=>"hid_custom_option",'name'=>((("hidoption_").($_smarty_tpl->tpl_vars['selectedProductID']->value)).("_")).($_smarty_tpl->tpl_vars['po']->value['customOptionID']),'value'=>$_smarty_tpl->tpl_vars['selected_variant']->value,'rel'=>$_smarty_tpl->tpl_vars['po']->value['customOptionID']),$_smarty_tpl);?>

                                <?php }else{ ?>
                                    <?php if ((($tmp = @$_smarty_tpl->tpl_vars['po']->value['customOptionID'])===null||$tmp==='' ? '' : $tmp)!=''){?>
                                        <?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->hidden(array('class'=>"hid_custom_option",'name'=>((("hidoption_").($_smarty_tpl->tpl_vars['selectedProductID']->value)).("_")).($_smarty_tpl->tpl_vars['po']->value['customOptionID']),'value'=>'','rel'=>$_smarty_tpl->tpl_vars['po']->value['customOptionID']),$_smarty_tpl);?>
<?php }?>
                                <?php }?>
                             <?php }} ?>