{form->fieldGroup 	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			= $language.errAttrOptionValue}
                                        {form->fieldGroup 	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			= $language.errAttrOptionCodeValue}
                    
{*{form->fieldGroup 	fieldName		= "priceDiff" 
					group			= "attrOptionsGroup" 
					parentGroup		= "" 
                    validate		= "inputType->isnotequal->textbox~*inputType->isnotequal->textarea~*inputType->isnotequal->date~*inputType->isnotequal->datetime~*inputType->isnotequal->time~*inputType->isnotequal->file~*required~*isPrice"
					error			= $language.errValidPrice}
                    
{form->fieldGroup 	fieldName		= "weightDiff" 
					group			= "attrOptionsGroup" 
					parentGroup		= "" 
					validate		= "inputType->isnotequal->textbox~*inputType->isnotequal->textarea~*inputType->isnotequal->date~*inputType->isnotequal->datetime~*inputType->isnotequal->time~*inputType->isnotequal->file~*required~*isPrice"
					error			= $language.errValidWeight}*}
                    
{assign var="numRows" value=$resAttributeOptions|count|default:''}
<div>
<div class="grid_table00 {if $numRows eq 0} hide {/if}" 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">{$language.lblValue}</th>
      <th align="left" valign="middle">{$language.lblCode}</th>
     {* <th align="left" valign="middle" width="20%" class="priceSect">{$language.lblPrice}</th>
      <th align="left" valign="middle" width="20%" class="priceSect">{$language.lblWeight}</th>*}
      {if $resAttributeEdit.inputType|default:'' neq 'multiselect'} 
      <th align="left" class="variant_image" valign="middle" width="10%">
			{$language.lblThumbnail}
			<span class="cmn-tooltip"><span class="icon-set icon-hlp"></span> <span class="tlptxt">{$language.lblMaximumFileSize} {$FILE_UPLOAD_LIMIT}, {$language.lblFileTypes} {$VALID_IMAGE_FILES}</span></span>
			</th>
	  {/if}    
      <th align="left" valign="middle" width="10%">{$language.lblIsDefault}</th>
      <th align="left" valign="middle"  width="20"></th>
    </tr>
    {assign var="attrOptionCount" value="0"}
    {if $resAttributeOptions|default:''} 
    {foreach from=$resAttributeOptions item="attributeOptions"}
    {assign var="attrOptionCount" value=$attrOptionCount+1} 
	{if isset($attributeOptions.is_delete)}
	{assign var="setIsDelete" value=$attributeOptions.is_delete} 
	{else}
	{assign var="setIsDelete" value="0"} 
	{/if}
    <tr class="attributeOptionRow {if $setIsDelete eq '1'} hide {/if} saved" id="attributeOptionRow_{$attrOptionCount}">
    <td align="left" valign="top">
{form->hidden name="attrOptionsGroup[{$attrOptionCount}][sortOrder]" value=$attributeOptions.sortOrder}
	{form->hidden 	name			= "attrOptionsGroup[{$attrOptionCount}][customOptionVariantID]" 
    				value			= $attributeOptions.customOptionVariantID} 		
	{form->hidden 	name			= "attrOptionsGroup[{$attrOptionCount}][is_delete]" 
    				class			= "attributeOptionsRows"
    				value			= $setIsDelete}                       
        {form->hidden 	name			= "attrOptionsGroup[{$attrOptionCount}][vsbID]" 
    				value			= $attributeOptions.vsbID}     
        {form->hidden 	name			= "attrOptionsGroup[{$attrOptionCount}][priceDiff]" 
    				value			= $attributeOptions.priceDiff}   
         {form->hidden 	name			= "attrOptionsGroup[{$attrOptionCount}][priceDiffType]" 
    				value			= $attributeOptions.priceDiffType} 
        {form->hidden 	name			= "attrOptionsGroup[{$attrOptionCount}][weightDiff]" 
    				value			= $attributeOptions.weightDiff}   
         {form->hidden 	name			= "attrOptionsGroup[{$attrOptionCount}][weightDiffType]" 
    				value			= $attributeOptions.weightDiffType}                         
  	{form->textbox 	name			= "attrOptionsGroup[{$attrOptionCount}][varValue]" 
    				error_class		= "message_inline_validation"
                    class			= "textbox" 
                    form			= "formAttributeAdd" 
                    value			= $attributeOptions.value|default:''|html_entity_decode                    
                    maxlength		= "255" 
                    rel				= "attrOptionsGroup_{$attrOptionCount}_is_delete"  
                    fieldName		= "varValue" 
					group			= "attrOptionsGroup"
                    row				= $attrOptionCount}
   </td>
   <td align="left" valign="top">
                  
  	{form->textbox 	name			= "attrOptionsGroup[{$attrOptionCount}][variantCode]" 
    				error_class		= "message_inline_validation"
                    class			= "textbox" 
                    form			= "formAttributeAdd" 
                    value			= $attributeOptions.variantCode|default:''|html_entity_decode                    
                    maxlength		= "255" 
                    rel				= "attrOptionsGroup_{$attrOptionCount}_is_delete"  
                    fieldName		= "variantCode" 
					group			= "attrOptionsGroup"
                    row				= $attrOptionCount}
   </td>
{*  <td align="left" valign="top" class="priceSect">
    <span class="small-field">
  	{form->textbox 	name			= "attrOptionsGroup[{$attrOptionCount}][priceDiff]" 
                    class			= "textbox width-80per"
                    form			= "formAttributeAdd" 
                    value			= $attributeOptions.priceDiff|default:''|escape
					
                    fieldName		= "priceDiff" 
					group			= "attrOptionsGroup"
                    row				= $attrOptionCount} 
    </span> 
  	{form->select 	name			= "attrOptionsGroup[{$attrOptionCount}][priceDiffType]" 
    				class			= "grid-select" 
    				error_class		= "message_inline_validation"   
                    form			= "formAttributeAdd" 
					
                    fieldName		= "priceDiffType" 
					group			= "attrOptionsGroup"
                    value			= $attributeOptions.priceDiffType|default:''|escape
                    options			="N->{$language.lblNone}~*I->{$language.lblIncrease}"
                    row				= $attrOptionCount}
   
  </td>*}
  {*<td align="left" valign="top" class="priceSect">
     <span class="small-field">
    	{form->textbox 	name			= "attrOptionsGroup[{$attrOptionCount}][weightDiff]"  
    				class			= "textbox width-80per"  
    				error_class		= "message_inline_validation" 
                    form			= "formAttributeAdd" 
				
                    value			= $attributeOptions.weightDiff|default:''|escape
                    fieldName		= "weightDiff" 
					group			= "attrOptionsGroup"
                    row				= $attrOptionCount} 
     </span>
  	{form->select 	name			= "attrOptionsGroup[{$attrOptionCount}][weightDiffType]"
    				class			= "textbox grid-select"
                    error_class		= "message_inline_validation" 
                    form			= "formAttributeAdd" 
					
                    value			= $attributeOptions.weightDiffType|default:''|escape
                    fieldName		= "weightDiffType"
                    options			="N->{$language.lblNone}~*I->{$language.lblIncrease}"
					group			= "attrOptionsGroup"
                    row				= $attrOptionCount} 
  </td>*}{form->hidden name="no_image_path" value="{$view_images}/thumbnail.gif"} 
   {if isset($attributeOptions.inputType) && ($attributeOptions.inputType eq 'select')}  
    <td align="center" valign="top">       
        <div class="thumb-image2 grid-upload-img thumb-image_{$attrOptionCount}">		  
{form->upload_image  message_delete="{$language.lblmsgdeleteImg}" icon="icon-img-upload.png"
name="OptionVariantThumb_"|cat:$attrOptionCount
path="uploads/catalog/custom-option-variant/"
file= $attributeOptions.variantThumbImage|default:''
form="formAttributeAdd" width="77" validate="isImage"
error=$language.errValidImage}
  {form->hidden name="attrOptionsGroup[{$attrOptionCount}][hidThumb]"
  value="uploads/catalog/custom-option-variant/"|cat: $attributeOptions.variantThumbImage}        
       </div> 
    </td>{/if}
    <td align="center" valign="top"> 
    {if isset($attributeOptions.isDefault) && ($attributeOptions.isDefault==1)}
    {assign var="isDefaultCheckboxChecked" value="checked"} 
    {else}
    {assign var="isDefaultCheckboxChecked" value=""} 
    {/if}
  {form->checkbox name="attrOptionsGroup[{$attrOptionCount}][isDefault]"  class="isDefaultCheckbox" checked=$isDefaultCheckboxChecked value="1"}</td>
  <td align="center"  valign="top" width="20">
  {html->anchor rel="attrOptionsGroup_{$attrOptionCount}_is_delete" id="{$attributeOptions.customOptionVariantID}" title="{$language.lblDelete}"  content=""  class="delete03 icon-set deleteRow"} 
   </td>    
    </tr>
    {/foreach}
    {/if}
    <tr class="nodrag nodrop hide" id="attroptions_loader">
      <td colspan="7" align="center"><img src="{$view_images}/loader-1.gif" /></td>
    </tr>
  </table>
</div>
{*{html->anchor class="linkbtnt01 add-new-btn forSelectType fixing_right" href="" id="add_new_options" content="<span class='plus-v'></span><span class='plus-h'></span> {$language.lblAddNew}"}  *}
</div>
{form->hidden name="attrOptionAddCount" value=$attrOptionCount}
{if $customOptionID > 0}
{assign var="currentAction" value="edit"} 
{else}
{assign var="currentAction" value="new"} 
{/if}
{form->hidden name="attributeMode" value=$currentAction}
{form->validate_script form="formAttributeAdd"}
