{form->fieldGroup 	fieldName		= "productOptionName" 
					group			= "productOptionsGroup" 
					parentGroup		= "" 
					validate		= "enableMultiple->isequal->checked~*required"
					error			= $language.errRequired}
{form->fieldGroup 	fieldName		= "optionSKU" 
					group			= "productOptionsGroup" 
					parentGroup		= "" 
					validate		= "required~*callback_checkOptSKUexist"
					error			= $language.errRequired|cat:"~*"|cat:$language.errSkuExists}
{*{form->fieldGroup 	fieldName		= "productOptionRegularPrice" 
					group			= "productOptionsGroup" 
					parentGroup		= "" 
					validate		= "required~*isPrice"
					error			= $language.errRequired|cat:"~*"|cat:$language.errValidRateShort|cat:"~*"|cat:$language.errRegularProductPrice
                    postTrigger		= 'if($("#productOptionsGroup_#0#_productOptionProductPrice").val() != ""){$("#productOptionsGroup_#0#_productOptionProductPrice").blur()};'} 
                    
{form->fieldGroup 	fieldName		= "productOptionProductPrice" 
					group			= "productOptionsGroup" 
					parentGroup		= "" 
					validate		= "isPrice~*productOptionsGroup_#0#_productOptionProductPrice->isnotequal->~*productOptionsGroup_#0#_productOptionProductPrice->lt->productOptionsGroup_#0#_productOptionRegularPrice" 
					error			= $language.errValidRateShort|cat:"~*~*"|cat:$language.errProductsalePrice} *}                 

{*{form->fieldGroup 	fieldName		= "productOptionQuantity" 
					group			= "productOptionsGroup" 
					parentGroup		= "" 
					validate		= "InventoryTrackLevel->isequal->Product~*required~*isWholeNumberWithZero"
					error			= $language.errValidQuantity}
					
{form->fieldGroup 	fieldName		= "packageWeight" 
					group			= "productOptionsGroup" 
					parentGroup		= "" 
					validate		= "isPrice"  
					error			= $language.errValidNumberShort} 
                    
 {form->fieldGroup 	fieldName		= "packageWidth" 
					group			= "productOptionsGroup" 
					parentGroup		= "" 
					validate		= "isPrice"  
					error			= $language.errValidNumberShort} 
                    
{form->fieldGroup 	fieldName		= "packageHeight" 
					group			= "productOptionsGroup" 
					parentGroup		= "" 
					validate		= "isPrice"  
					error			= $language.errValidNumberShort} 
                      
{form->fieldGroup 	fieldName		= "packageLength" 
					group			= "productOptionsGroup" 
					parentGroup		= "" 
					validate		= "isPrice"  
					error			= $language.errValidNumberShort}         *}          
{assign var="numRows" value=$resProductOptions|count|default:0}    
     {assign var="productForm" value="Product"}   
    <ul class="levl-00" id="moptions">     
     {assign var="productOptionCount" value="0"}
     
<!--Option postback-->

	{if $postCallback|default:''==1}
	{assign var="resProductOptions" value=$resProductOptions_postback}{/if}
<!--Option postback-->

      {if $resProductOptions|default:''}                
      {foreach from=$resProductOptions item="productOptions"}
     
      {assign var="productOptionCount" value=$productOptionCount+1} 
      
                 
         <li class="clearfix option productOptionRow remove-padding">
         <h3 class="single-option"><a class="op-delete deleteRow"  href="javascript:void(0);" rel="productOptionsGroup_{$productOptionCount}_is_delete" title="Delete" id="{$productOptionCount}">x</a><span>{$language.lblProductVariant} {$productOptionCount}</span></h3>
          {form->hidden 	name			= "productOptionsGroup[{$productOptionCount}][option_id]" 
    					value			= "{$productOptions.option_id}"} 
					{form->hidden 	name			= "productOptionsGroup[{$productOptionCount}][is_delete]" 
        class			= "multioptiondelete"
    					value			= "0"}  
        {form->hidden 	name			= "productOptionsGroup[{$productOptionCount}][realOptionCount]"     				
                    value			= $productOptionCount}
                    
          {form->hidden 	name			= "productOptionsGroup[{$productOptionCount}][productOptionImageSort]"} 
           {form->hidden 	name			= "productOptionsGroup[{$productOptionCount}][vsb]"     				
                    value			= $productOptions.vsb}
                     {form->hidden 	name			= "productOptionsGroup[{$productOptionCount}][modelCode]"     				
                    value			= $productOptions.modelCode}
                     {form->hidden 	name			= "productOptionsGroup[{$productOptionCount}][bmwCode]"     				
                    value			= $productOptions.bmwCode}
                     {form->hidden 	name			= "productOptionsGroup[{$productOptionCount}][modelYear]"     				
                    value			= $productOptions.modelYear}
                  <ul class="levl-00"> 
                 <li class="clearfix single-option">                 
                    <div class="left1 mandatory">
                     {$language.lblOptionName}
                    </div>
                    <div class="right1 ">
                     <ul class="levl-01">
                  		<li class="clearfix first">
                      <div class="width-50per fixing_left">                        
		{form->textbox  error_class		= "message_inline_validation" 
					size			= "25" 
                        name			= "productOptionsGroup[{$productOptionCount}][productOptionName]" 
                        class			= "textbox productName"
                        form			= $productForm  
                        value			= $productOptions.productOptionName|unescape
                        maxlength		= "255"
                        validate_inline	= "yes" 
                        rel				= "productOptionsGroup_{$productOptionCount}_is_delete"  
                        fieldName		= "productOptionName" 
					group			= "productOptionsGroup"
                        row				= $productOptionCount} 
                      </div>                                    
                    </li>
                    </ul></div>
                  </li>
		 <li class="clearfix">                 
                    <div class="left1 mandatory">
                     {$language.lblSKU}
                    </div>
                    <div class="right1 ">
                     <ul class="levl-01">
					<li class="clearfix first">
                      <div class="width-25per fixing_left">                        
		{form->textbox  error_class		= "message_inline_validation" 
			size			= "25" 
                        name			= "productOptionsGroup[{$productOptionCount}][optionSKU]" 
                        class			= "textbox productName"
                        form			= $productForm  
                        value			= $productOptions.optionSKU|unescape
                        maxlength		= "255"
                        validate_inline	= "yes" 
                        rel				= $productOptionCount  
                        fieldName		= "optionSKU" 
			group			= "productOptionsGroup"
                        row				= $productOptionCount} 
                      </div>                                    
                    </li>
                    </ul></div>
                  </li>
		  
                  <div id="sellerInfo">
                        {include file='AssignSellers.tpl'}
                  </div>
                 {*<li class="clearfix">                 
                    <div class="left1 mandatory">{$language.lblPrice}</div>
                    <div class="right1 ">
                    	<ul class="levl-02 clearfix">
                        <li><label class="label1">{$language.lblItemPrice}</label>
					{form->textbox 	name= "productOptionsGroup[{$productOptionCount}][productOptionRegularPrice]"  
					error_class		= "message_inline_validation"   
					form			= $productForm 
					validate_inline	= "yes" 
					class			= "textbox length0_50pers option_price_new" 
					maxlength		= "11" 
					rel				= $productOptionCount 
					fieldName		= "productOptionRegularPrice" 
					value			= $productOptions.productOptionRegularPrice|price_no_symbol
					 group			= "productOptionsGroup"
					row				= $productOptionCount}
			</li>
                         <li><label class="label1">{$language.lblSaleprice}</label>
                             {assign var="salePrice" value="{$productOptions.productOptionProductPrice|price_no_symbol}"}
                             {if $postCallback|default:''==1 && $productOptions.productOptionProductPrice==''}      
                                 {assign var="salePrice" value="{$productOptions.productOptionProductPrice}"}
                             {/if}    
{form->textbox name= "productOptionsGroup[{$productOptionCount}][productOptionProductPrice]"    
    				error_class		= "message_inline_validation" 
                    form			= $productForm 
                    validate_inline	= "yes" 
                    class			= "textbox length0_50pers option_price_new sale_price" 
                    rel				= $productOptionCount
		    maxlength="11" 
                    fieldName		= "productOptionProductPrice"
                    value			= $salePrice
                    row				= $productOptionCount
		    group			= "productOptionsGroup"} 
 </li>
   <li><label class="label1">{$language.lblCashBack}</label>
{form->textbox name= "productOptionsGroup[{$productOptionCount}][productOptionCashBack]"    
    				
                    form			= $productForm 
                    validate_inline	= "yes" 
                    class			= "textbox length0_50pers option_price_new sale_price" 
                    rel				= $productOptionCount
		    maxlength="11" 
                    fieldName		= "productOptionCashBack"
                    value			= $productOptions.productOptionCashBack|price_no_symbol
                    row				= $productOptionCount
		    group			= "productOptionsGroup"} 
 </li> 
 
                        
                        </ul>
                    </div>
                  </li>*}
				  
		{*					
				  <li class="clearfix hide not-for-buybox">
                    <div class="left1 ">{$language.lblTierPrice}</div>
                    <div class="right1">
                    
                    <ul id="tiers_table">
                    <li class="header clearfix">
                    <div class="column"><label class="label1 mandatory">{$language.lblCustomerGroup}</label></div>
                    <div class="column sml"><label class="label1 mandatory">{$language.lblQty}</label></div>
                    <div class="column"><label class="label1 mandatory">{$language.lblPrice}</label></div></li>
                    <li class="levl-02 clearfix" id="tier_price_container_{$productOptionCount}">
					{if isset( $productOptions['tier_price'])}
                                    {foreach $productOptions['tier_price'] as $key=>$tier_price}
                                     <div class="clearfix parent">
                         <div class="column">
							{assign var="userGroupID" value="{$tier_price['userGroupID']}"} 
							{if $tier_price['allGroups']|default:''==1}
								{assign var="userGroupID" value=""}
							{/if} 
							   {form->select options="{$listUsergroups}" 
										caption="->{$language.lblAllGroups}"
										value="{$userGroupID}"
										rel="{$productOptionCount}_{$key}"
										productOptionCount="{$productOptionCount}"
										name="productOptionsGroup[{$productOptionCount}][tier_price][{$key}][userGroupID]"  
										class="option_tier_price_user_group textbox custgroup "}
                                        <span class="message_validation  tier_{$productOptionCount}_{$key} hide"><span>{$language.errDuplicateCombination}</span></span>
		    </div>
            <div class="column sml">
			<small class="nobr">{$language.lblandabove}</small>
		   {form->textbox 
											class="option_tier_price_qty {$productOptionCount}_{$key} textbox required-entry length30"
											validate="callback_tierprice_quantity"
											value="{$tier_price['quantity']}"
											error="Required"
											name="productOptionsGroup[{$productOptionCount}][tier_price][{$key}][quantity]"}
										
		    </div>
			
                    <div class="column">
		 {form->textbox 
											class="option_tier_price_tier_price {$productOptionCount}_{$key} textbox required-entry "
											validate="callback_tierprice_price"
											value="{$tier_price['tierPrice']|price_no_symbol}"
											error="Required"
											name="productOptionsGroup[{$productOptionCount}][tier_price][{$key}][tierPrice]"}
		    </div>
            <div class="column-del">
            {html->anchor  class="icon-set delete02 txt-hide" id="tier_price_row_{$key}_delete_button"  title="{$language.lblDelete}" onclick="return tierPriceControl.deleteItem($(this));"}
									</div>
           
            </div>
            {/foreach}
			{/if}
            </li>
            <li>
             {html->anchor  class="btn-add curve-3" id="id_{$productOptionCount}" content="<span class='h'></span><span class='v'></span>{$language.lblAddTier}" title="{$language.lblAddTier}" onclick="return tierPriceControl.addItem('{$productOptionCount}','productOptionsGroup','option_')"}
            </li>
							</ul>
                   
                    </div>
                  </li>*}
				  
				  
                  {*<li class="clearfix stock">
                    <div class="left1 optionQty">{$language.lblQuantity}</div>
                    <div class="right1">
                    <ul class="levl-02 clearfix">
                        <li>{if isset($productOptions.productOptionQuantity) && $productOptions.productOptionQuantity==0  && isset($productOptions.productQuantityUnlimited) && $productOptions.productQuantityUnlimited==1}                    
                                   {assign var="productOptionQuantity" value=""}                    
				    {else}                    
					    {assign var="productOptionQuantity" value=$productOptions.productOptionQuantity}                    
				    {/if}                    
                        
        {form->textbox  style="width:231px"
					name= "productOptionsGroup[{$productOptionCount}][productOptionQuantity]"  
					value			= $productOptionQuantity
        				class			= "textbox length0_50pers" 
					 error_class		= "message_inline_validation" 
					validate_inline	= "yes" 
					 value			= $productOptionQuantity
					form			= $productForm
					rel				= $productOptionCount                      
					fieldName		= "productOptionQuantity" 
					group			= "productOptionsGroup"
					row				= $productOptionCount}</li>
                        </ul>
                      
                    </div>
                  </li>*}   
                  
                  
                  
              {*    
                  <li class="clearfix">
                      <div class="left1">{$language.lblPackage}</div>
                      <div class="right1">
                        <ul class="levl-02 clearfix">
                        <li><label class="label1">{$language.lblWeight}</label>{form->textbox 	name= "productOptionsGroup[{$productOptionCount}][packageWeight]"
    				class			= "textbox width-100px" 
                    error_class		= "message_inline_validation" 
                    form			= $productForm 
                    validate_inline	= "yes" 
                    rel				= $productOptionCount
                    fieldName		= "packageWeight" 
                    group			= "productOptionsGroup"
                    value=$productOptions.packageWeight 
                    row				= $productOptionCount}</li>
<li><label class="label1">{$language.lblLength} </label>{form->textbox 	name= "productOptionsGroup[{$productOptionCount}][packageLength]"
    				class			= "textbox width-100px" 
                    error_class		= "message_inline_validation" 
                    form			= $productForm 
                    validate_inline	= "yes" 
                    rel				= $productOptionCount
                      group			= "productOptionsGroup"
                    value=$productOptions.packageLength                    
                    fieldName		= "packageLength" 
                    row				= $productOptionCount}</li>
                         <li><label class="label1">{$language.lblWidth}</label>
{form->textbox 	name			= "productOptionsGroup[{$productOptionCount}][packageWidth]"
    				class			= "textbox width-100px" 
                    error_class		= "message_inline_validation" 
                    form			= $productForm 
                    rel				= $productOptionCount
                    group			= "productOptionsGroup"
                    validate_inline	= "yes"                  
                    maxlength		= "9" 
                    fieldName		= "packageWidth"
                      value=$productOptions.packageWidth  
                    row				= $productOptionCount}</li>
			 
                          <li><label class="label1">{$language.lblHeight}</label>{form->textbox 	name			= "productOptionsGroup[{$productOptionCount}][packageHeight]"
    				class			= "textbox width-100px" 
                    error_class		= "message_inline_validation" 
                    form			= $productForm 
                    validate_inline	= "yes" 
                    rel				= $productOptionCount 
                      group			= "productOptionsGroup"
                    value=$productOptions.packageHeight 
                  
                    fieldName		= "packageHeight" 
                    row				= $productOptionCount}</li>

                          </ul>
                      </div>
                    </li>*}
                       <li class="clearfix single-option">
                    <div class="left1"></div>
                    <div class="right1 top-spc ">{if isset($productOptions.defaultOpion) && ($productOptions.defaultOpion=="Yes")}                      
                            {assign var="OptionDefault" value="checked"}                      
                            {else}                      
                            {assign var="OptionDefault" value=""}                      
                            {/if}  
                     {form->radio 	name= "productOptionsGroup[{$productOptionCount}][defaultOpion]"  
    				   options		= "Yes->{$language.lblsetDefaultproductoption}"
                       rel			= $productOptionCount 
                       class        = "defaultOpion"
                       value=$productOptions.productOptionDefault|default:''
                       checked=$OptionDefault} </div>
                  </li>
                  <li class=" clearfix single-option">
                    <div class="left1"><strong>{$language.lblOptionStatus}</strong></div>
                    <div class="right1 top-spc">
                    {form->radio name	= "productOptionsGroup[{$productOptionCount}][productOptionStatus]"
        				options			= "Active->{$language.lblActive}~*Inactive->{$language.lblInactive}" 
                        value			= $productOptions.productOptionStatus 
                        fieldName		= "productOptionStatus" 
						group			= "productOptionsGroup"
                        row				= $productOptionCount} 
                   </div>
                  </li>
                  
                                           
                 
                </ul>
              </li>
      {form->hidden name="productOptionImageCount"|cat:$productOptionCount value=$productImageCount} 
    
 {/foreach}                
      {/if}
      <li class="hide" id="productoptions_loader">             
       <img src="{$view_images}/loader-1.gif" />
      </li> 
    
    </ul>
    
    
   {form->hidden name="productOptionAddCount" value=$productOptionCount} 
  
 
{form->hidden name="optionSaveStatus" value=$optionSaveStatus|default:'' post_back="no"}        
 
{form->validate_script form			= $productForm} 
    <script type="text/javascript">
$('.img-list').sortable({		
		items: "> li",
		update: function(event, ui) {
			var result = $(this).sortable('toArray');						 
			$("#productOptionsGroup_"+$(this).attr('rel')+"_productOptionImageSort").val(result);
			}
	});
	</script> 

