<?php /* Smarty version Smarty-3.1.8, created on 2019-11-27 08:56:00
         compiled from "/home/stg70/public_html/agmc-v2/application/core/views/manage/standard/CustomOptionAddvariant.tpl" */ ?>
<?php /*%%SmartyHeaderCode:6810023175dde01e0871826-95159681%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '389b4cf22b019708f45a72233f21e7c92d12136c' => 
    array (
      0 => '/home/stg70/public_html/agmc-v2/application/core/views/manage/standard/CustomOptionAddvariant.tpl',
      1 => 1574771589,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '6810023175dde01e0871826-95159681',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'language' => 0,
    'resAttributeOptions' => 0,
    'numRows' => 0,
    'resAttributeEdit' => 0,
    'FILE_UPLOAD_LIMIT' => 0,
    'VALID_IMAGE_FILES' => 0,
    'attrOptionCount' => 0,
    'attributeOptions' => 0,
    'setIsDelete' => 0,
    'view_images' => 0,
    'isDefaultCheckboxChecked' => 0,
    'customOptionID' => 0,
    'currentAction' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.8',
  'unifunc' => 'content_5dde01e08d6b11_55911683',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5dde01e08d6b11_55911683')) {function content_5dde01e08d6b11_55911683($_smarty_tpl) {?><?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->fieldGroup(array('fieldName'=>"varValue",'group'=>"attrOptionsGroup",'parentGroup'=>'','validate'=>"inputType->isnotequal->textbox~*inputType->isnotequal->textarea~*inputType->isnotequal->date~*inputType->isnotequal->datetime~*inputType->isnotequal->time~*inputType->isnotequal->file~*required",'error'=>$_smarty_tpl->tpl_vars['language']->value['errAttrOptionValue']),$_smarty_tpl);?>

                                        <?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->fieldGroup(array('fieldName'=>"variantCode",'group'=>"attrOptionsGroup",'parentGroup'=>'','validate'=>"inputType->isnotequal->textbox~*inputType->isnotequal->textarea~*inputType->isnotequal->date~*inputType->isnotequal->datetime~*inputType->isnotequal->time~*inputType->isnotequal->file~*required",'error'=>$_smarty_tpl->tpl_vars['language']->value['errAttrOptionCodeValue']),$_smarty_tpl);?>

                    

                    
<?php $_smarty_tpl->tpl_vars["numRows"] = new Smarty_variable((($tmp = @count($_smarty_tpl->tpl_vars['resAttributeOptions']->value))===null||$tmp==='' ? '' : $tmp), null, 0);?>
<div>
<div class="grid_table00 <?php if ($_smarty_tpl->tpl_vars['numRows']->value==0){?> hide <?php }?>" id="optionGrid">
  <table width="100%" border="0" cellspacing="0" cellpadding="0" id="tableElm" class="dragdrop-table-border">
    <tr class="nodrag nodrop">
      <th align="left" valign="middle"><?php echo $_smarty_tpl->tpl_vars['language']->value['lblValue'];?>
</th>
      <th align="left" valign="middle"><?php echo $_smarty_tpl->tpl_vars['language']->value['lblCode'];?>
</th>
     
      <?php if ((($tmp = @$_smarty_tpl->tpl_vars['resAttributeEdit']->value['inputType'])===null||$tmp==='' ? '' : $tmp)!='multiselect'){?> 
      <th align="left" class="variant_image" valign="middle" width="10%">
			<?php echo $_smarty_tpl->tpl_vars['language']->value['lblThumbnail'];?>

			<span class="cmn-tooltip"><span class="icon-set icon-hlp"></span> <span class="tlptxt"><?php echo $_smarty_tpl->tpl_vars['language']->value['lblMaximumFileSize'];?>
 <?php echo $_smarty_tpl->tpl_vars['FILE_UPLOAD_LIMIT']->value;?>
, <?php echo $_smarty_tpl->tpl_vars['language']->value['lblFileTypes'];?>
 <?php echo $_smarty_tpl->tpl_vars['VALID_IMAGE_FILES']->value;?>
</span></span>
			</th>
	  <?php }?>    
      <th align="left" valign="middle" width="10%"><?php echo $_smarty_tpl->tpl_vars['language']->value['lblIsDefault'];?>
</th>
      <th align="left" valign="middle"  width="20"></th>
    </tr>
    <?php $_smarty_tpl->tpl_vars["attrOptionCount"] = new Smarty_variable("0", null, 0);?>
    <?php if ((($tmp = @$_smarty_tpl->tpl_vars['resAttributeOptions']->value)===null||$tmp==='' ? '' : $tmp)){?> 
    <?php  $_smarty_tpl->tpl_vars["attributeOptions"] = new Smarty_Variable; $_smarty_tpl->tpl_vars["attributeOptions"]->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['resAttributeOptions']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars["attributeOptions"]->key => $_smarty_tpl->tpl_vars["attributeOptions"]->value){
$_smarty_tpl->tpl_vars["attributeOptions"]->_loop = true;
?>
    <?php $_smarty_tpl->tpl_vars["attrOptionCount"] = new Smarty_variable($_smarty_tpl->tpl_vars['attrOptionCount']->value+1, null, 0);?> 
	<?php if (isset($_smarty_tpl->tpl_vars['attributeOptions']->value['is_delete'])){?>
	<?php $_smarty_tpl->tpl_vars["setIsDelete"] = new Smarty_variable($_smarty_tpl->tpl_vars['attributeOptions']->value['is_delete'], null, 0);?> 
	<?php }else{ ?>
	<?php $_smarty_tpl->tpl_vars["setIsDelete"] = new Smarty_variable("0", null, 0);?> 
	<?php }?>
    <tr class="attributeOptionRow <?php if ($_smarty_tpl->tpl_vars['setIsDelete']->value=='1'){?> hide <?php }?> saved" id="attributeOptionRow_<?php echo $_smarty_tpl->tpl_vars['attrOptionCount']->value;?>
">
    <td align="left" valign="top">
<?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->hidden(array('name'=>"attrOptionsGroup[".($_smarty_tpl->tpl_vars['attrOptionCount']->value)."][sortOrder]",'value'=>$_smarty_tpl->tpl_vars['attributeOptions']->value['sortOrder']),$_smarty_tpl);?>

	<?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->hidden(array('name'=>"attrOptionsGroup[".($_smarty_tpl->tpl_vars['attrOptionCount']->value)."][customOptionVariantID]",'value'=>$_smarty_tpl->tpl_vars['attributeOptions']->value['customOptionVariantID']),$_smarty_tpl);?>
 		
	<?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->hidden(array('name'=>"attrOptionsGroup[".($_smarty_tpl->tpl_vars['attrOptionCount']->value)."][is_delete]",'class'=>"attributeOptionsRows",'value'=>$_smarty_tpl->tpl_vars['setIsDelete']->value),$_smarty_tpl);?>
                       
        <?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->hidden(array('name'=>"attrOptionsGroup[".($_smarty_tpl->tpl_vars['attrOptionCount']->value)."][vsbID]",'value'=>$_smarty_tpl->tpl_vars['attributeOptions']->value['vsbID']),$_smarty_tpl);?>
     
        <?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->hidden(array('name'=>"attrOptionsGroup[".($_smarty_tpl->tpl_vars['attrOptionCount']->value)."][priceDiff]",'value'=>$_smarty_tpl->tpl_vars['attributeOptions']->value['priceDiff']),$_smarty_tpl);?>
   
         <?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->hidden(array('name'=>"attrOptionsGroup[".($_smarty_tpl->tpl_vars['attrOptionCount']->value)."][priceDiffType]",'value'=>$_smarty_tpl->tpl_vars['attributeOptions']->value['priceDiffType']),$_smarty_tpl);?>
 
        <?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->hidden(array('name'=>"attrOptionsGroup[".($_smarty_tpl->tpl_vars['attrOptionCount']->value)."][weightDiff]",'value'=>$_smarty_tpl->tpl_vars['attributeOptions']->value['weightDiff']),$_smarty_tpl);?>
   
         <?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->hidden(array('name'=>"attrOptionsGroup[".($_smarty_tpl->tpl_vars['attrOptionCount']->value)."][weightDiffType]",'value'=>$_smarty_tpl->tpl_vars['attributeOptions']->value['weightDiffType']),$_smarty_tpl);?>
                         
  	<?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->textbox(array('name'=>"attrOptionsGroup[".($_smarty_tpl->tpl_vars['attrOptionCount']->value)."][varValue]",'error_class'=>"message_inline_validation",'class'=>"textbox",'form'=>"formAttributeAdd",'value'=>html_entity_decode((($tmp = @$_smarty_tpl->tpl_vars['attributeOptions']->value['value'])===null||$tmp==='' ? '' : $tmp)),'maxlength'=>"255",'rel'=>"attrOptionsGroup_".($_smarty_tpl->tpl_vars['attrOptionCount']->value)."_is_delete",'fieldName'=>"varValue",'group'=>"attrOptionsGroup",'row'=>$_smarty_tpl->tpl_vars['attrOptionCount']->value),$_smarty_tpl);?>

   </td>
   <td align="left" valign="top">
                  
  	<?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->textbox(array('name'=>"attrOptionsGroup[".($_smarty_tpl->tpl_vars['attrOptionCount']->value)."][variantCode]",'error_class'=>"message_inline_validation",'class'=>"textbox",'form'=>"formAttributeAdd",'value'=>html_entity_decode((($tmp = @$_smarty_tpl->tpl_vars['attributeOptions']->value['variantCode'])===null||$tmp==='' ? '' : $tmp)),'maxlength'=>"255",'rel'=>"attrOptionsGroup_".($_smarty_tpl->tpl_vars['attrOptionCount']->value)."_is_delete",'fieldName'=>"variantCode",'group'=>"attrOptionsGroup",'row'=>$_smarty_tpl->tpl_vars['attrOptionCount']->value),$_smarty_tpl);?>

   </td>

  <?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->hidden(array('name'=>"no_image_path",'value'=>($_smarty_tpl->tpl_vars['view_images']->value)."/thumbnail.gif"),$_smarty_tpl);?>
 
   <?php if (isset($_smarty_tpl->tpl_vars['attributeOptions']->value['inputType'])&&($_smarty_tpl->tpl_vars['attributeOptions']->value['inputType']=='select')){?>  
    <td align="center" valign="top">       
        <div class="thumb-image2 grid-upload-img thumb-image_<?php echo $_smarty_tpl->tpl_vars['attrOptionCount']->value;?>
">		  
<?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->upload_image(array('message_delete'=>($_smarty_tpl->tpl_vars['language']->value['lblmsgdeleteImg']),'icon'=>"icon-img-upload.png",'name'=>("OptionVariantThumb_").($_smarty_tpl->tpl_vars['attrOptionCount']->value),'path'=>"uploads/catalog/custom-option-variant/",'file'=>(($tmp = @$_smarty_tpl->tpl_vars['attributeOptions']->value['variantThumbImage'])===null||$tmp==='' ? '' : $tmp),'form'=>"formAttributeAdd",'width'=>"77",'validate'=>"isImage",'error'=>$_smarty_tpl->tpl_vars['language']->value['errValidImage']),$_smarty_tpl);?>

  <?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->hidden(array('name'=>"attrOptionsGroup[".($_smarty_tpl->tpl_vars['attrOptionCount']->value)."][hidThumb]",'value'=>("uploads/catalog/custom-option-variant/").($_smarty_tpl->tpl_vars['attributeOptions']->value['variantThumbImage'])),$_smarty_tpl);?>
        
       </div> 
    </td><?php }?>
    <td align="center" valign="top"> 
    <?php if (isset($_smarty_tpl->tpl_vars['attributeOptions']->value['isDefault'])&&($_smarty_tpl->tpl_vars['attributeOptions']->value['isDefault']==1)){?>
    <?php $_smarty_tpl->tpl_vars["isDefaultCheckboxChecked"] = new Smarty_variable("checked", null, 0);?> 
    <?php }else{ ?>
    <?php $_smarty_tpl->tpl_vars["isDefaultCheckboxChecked"] = new Smarty_variable('', null, 0);?> 
    <?php }?>
  <?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->checkbox(array('name'=>"attrOptionsGroup[".($_smarty_tpl->tpl_vars['attrOptionCount']->value)."][isDefault]",'class'=>"isDefaultCheckbox",'checked'=>$_smarty_tpl->tpl_vars['isDefaultCheckboxChecked']->value,'value'=>"1"),$_smarty_tpl);?>
</td>
  <td align="center"  valign="top" width="20">
  <?php echo $_smarty_tpl->smarty->registered_objects['html'][0]->anchor(array('rel'=>"attrOptionsGroup_".($_smarty_tpl->tpl_vars['attrOptionCount']->value)."_is_delete",'id'=>($_smarty_tpl->tpl_vars['attributeOptions']->value['customOptionVariantID']),'title'=>($_smarty_tpl->tpl_vars['language']->value['lblDelete']),'content'=>'','class'=>"delete03 icon-set deleteRow"),$_smarty_tpl);?>
 
   </td>    
    </tr>
    <?php } ?>
    <?php }?>
    <tr class="nodrag nodrop hide" id="attroptions_loader">
      <td colspan="7" align="center"><img src="<?php echo $_smarty_tpl->tpl_vars['view_images']->value;?>
/loader-1.gif" /></td>
    </tr>
  </table>
</div>

</div>
<?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->hidden(array('name'=>"attrOptionAddCount",'value'=>$_smarty_tpl->tpl_vars['attrOptionCount']->value),$_smarty_tpl);?>

<?php if ($_smarty_tpl->tpl_vars['customOptionID']->value>0){?>
<?php $_smarty_tpl->tpl_vars["currentAction"] = new Smarty_variable("edit", null, 0);?> 
<?php }else{ ?>
<?php $_smarty_tpl->tpl_vars["currentAction"] = new Smarty_variable("new", null, 0);?> 
<?php }?>
<?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->hidden(array('name'=>"attributeMode",'value'=>$_smarty_tpl->tpl_vars['currentAction']->value),$_smarty_tpl);?>

<?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->validate_script(array('form'=>"formAttributeAdd"),$_smarty_tpl);?>

<?php }} ?>