<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
{assign var="productID" value=$productID|default:''}
{assign var="productReqID" value=$productReqID|default:''}
<title>{$language.lblBusiness}: {$language.lblProductsTitle} : {if $productID}{$language.lblEditProduct} {else} {$language.lblAddNewProduct}{/if}</title>
{include file='CommonStyles.tpl'}
{include file='CommonJavaScript.tpl'}
<link href="{$view_styles}/jqueryui.plugin.css" rel="stylesheet" type="text/css" />
<link href="{$view_styles}/jquery-ui-1.8.19.custom.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/ui.daterangepicker.css" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/product-details.css" media="screen" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/chosen.css" />
<script type="text/javascript" src="{$view_javascript}/chosen.jquery.min.js"></script>
    
<script type="text/javascript">
var lblNoMatch  =       "{$language.lblNoMatch}"
</script>
</head>
<body class="{$languageDirection}">
<div class="outer" id="main">{include file='CommonHeader.tpl'}
    {*<!--***********************************************************************START CONTAINER SECTION******************************************************-->*}
<div class="content-wrapper">
<div class="container-fluid">
  <noscript>
  <div class="message_info">{$language.lblJsEnable} !!</div>
  </noscript>{if $productReqID>0 || $productID>0}
  <div class="clearfix">
    <div class="pull-right right">{include file='ContentLanguageOptions.tpl'}</div>{assign var="cancelHref" value="product/index/"}  
  </div>
  {/if}
  <div id="common_message"></div>
    {if $profileStatus|default:''!='yes'}
        {assign var="flag" value="yes"}
           <div class="message_info">{$language.lblBusinessProfile}
           {html->anchor href="/user/edit/" rel="" caption="{$language.lblEditProfile}" class="" style="float:right"}
           </div>
    {elseif $agreeBusiness|default:''!='yes'}
        {assign var="flag" value="yes"}
           <div class="message_info">{$language.lblMerAgremnt}</div>
    {else}
        {assign var="flag" value="No"}
    {/if}
    {*<!-- Inner Content Container starts-->*}
  <div class="inner_content_wrapper">
      {* <!-- tab product details starts -->*}
      <h2>{if $productID>0}{$language.lblEditProduct} ( {$productTitle} )
  {elseif $productReqID>0}
  {assign var="cancelHref" value="product/request/"}
  {$language.lblEditRequestedProduct} ( {$productTitle} )
  {else} {$language.lblAddNewProduct}{/if}</h2>
          <div class="row">
          <div class="left_block col-sm-3 col-lg-2 col-xs-12">
              <div class="tab-block-01">
              </div>
              <h6 class="mob-Lmenu">{html->anchor rel="product-details-save" caption="<span>&nbsp;</span>{$language.lblProductDetails}"}</h6> 
              <ul class="left-tab leftList margin-bottom" id="maintab">
                <li class="sub">{html->anchor rel="product-details-save" caption="<span>{$language.lblGeneral}</span>" class="left-tab-a" id="general"}</li>
                <li class="sub">{html->anchor rel="product-details-save" caption="<span>{$language.lblQuantityandPrice}</span>" class="left-tab-a" id="qtyPrice"}</li>                <li class="sub">{html->anchor rel="product-details-save" caption="<span>{$language.lblContents}</span>" class="left-tab-a"}</li>
                {if $productID} 
		<li class="sub">{html->anchor rel="product-details-save" caption="<span>{$language.lblSizeChart}</span>" class="left-tab-a"}</li> {/if}
		 {if $bindAttributeForm|default:'' eq '1'}
                <li class="sub">{html->anchor rel="attribute-save" caption="<span>{$language.lblCustomAttributes}</span>" class="left-tab-a"}</li>
                {/if}
		 {if $bindOptionForm|default:'' eq '1'}
                <li class="sub">{html->anchor rel="custom-option-save" caption="<span>{$language.lblCustomOptions}</span>" class="left-tab-a"}</li>
                {/if}
		 {if $bindInventoryForm|default:'' eq '1'}
		        <li class="sub inventoryTab">{html->anchor rel="related-save" caption="<span>{$language.lblCombinations}</span>" class="left-tab-a inventoryLink"}</li>
		{/if}
		 {if $bindShippingForm|default:'' eq '1'}
		        <li class="sub">{html->anchor rel="shipping-save" caption="<span>{$language.lblShipping}</span>" class="left-tab-a"}</li>
		{/if}
		{if $productID && $productReqID==""} 
                <li class="sub">{html->anchor rel="related-save" caption="<span>{$language.lblRelatedProducts}</span>" class="left-tab-a"}</li>
                {/if}
		{if $productID && $productReqID==""} 
		 <li class="sub">{html->anchor rel="upsell-save" caption="<span>{$language.lblUpsells}</span>" class="left-tab-a"}</li> {/if}
		 {if $productID && $productReqID==""} 
		<li class="sub">{html->anchor rel="crosssell-save" caption="<span>{$language.lblCrosssells}</span>" class="left-tab-a"}</li> {/if}
             </ul>
            </div>
              {*<!--Left block end-->*}
              {*<!-- tab General tab-1 starts -->*}
             <div class="contents cut-left-mob col-sm-9 col-lg-10 col-xs-12">
                 <div class="container-section">
             {form->start name="Product" action="" method="post" enctype="multipart/form-data" rel="product-details-save"}
             <div id="product-details-save-section" class="save-floating-section">
            <div class="cm-buttons-floating">
                <div class="submit-position">
		  {if $flag|default:''=='No'}
		      {form->submit  name="submitProductDetails" id="submitProductDetails" class="btn btn-primary btn-sm" value="{$language.lblSave}"}                
			  <span class="or-block">{$language.lblOr}</span>{html->anchor href="product/index/" class="btn btn-default btn-sm" content=$language.lblCancel}
		  {else}
               {form->button name="DisableSubmit" disabled="disabled" class="btn btn-primary btn-sm disabled" value="{$language.lblSave}"}
		  {/if}
			   </div>
            </div>
            <div class="cm-buttons"></div>
			</div>
                     {*<!--Float button div end-->*}
                     {*<!--tab section start-->*}
            <div  class="tabpane" style="display:block;">
              <div class="tabpane_inner"> <span class="BreadCrump">
                <ul class="clearfix">
                  <li>{$language.lblProductDetails}&raquo; </li>
                  <li> <span> {$language.lblGeneral} </span></li>
                </ul>
                </span>
				{assign var="productReqID" value=$productReqID|default:''}	  
      {if $productReqID==""} {if $productID}
		{if $review_before_publish eq 'No'}
        <div class="pull-right">
		{html->anchor href="product/clone/id/$productID"  class="custom-btnt btn btn-primary add" content=" <strong><span class='icon-plus2'></span>{$language.lblCloneProduct}</strong>"} </div>
		{/if}      
	  {/if} {/if}	  
                <div class="form_listing">
                    <div class="info-head">
                      <h3 class="border-bottom">{$language.lblBasicInformation}</h3>
                    </div>
                    
		    <div class="form-group row">
                            <label class="col-sm-4 col-md-3 col-xs-12">{$language.lblAttributeSet}</label>
                            <div class="col-sm-7 col-md-6 col-lg-5 col-xs-12">
		{if $productID || $productReqID} 
                    {form->hidden name="hidAttrSetID" value=$attributeSetID|default:''}
                    {form->hidden name="hidAttributeSetID" value=$attributeSetID|default:''}
	      {*{form->select  name="attributeSetID" value=$resSelectproduct.attributeSetID class="form-control"  options=$resAttrSet  caption="->{$language.msgAttributeSet}" disabled=disabled}*}
	      
	      {/if}              
              {form->select   name="attributeSetID" class="form-control"   options=$resAttrSet  caption="->{$language.msgAttributeSet}" validate="required" error=$language.msgAttributeSet}
                            </div>
                          </div>
		    <div class="form-group row">
                            <label class="col-sm-4 col-md-3">{$language.lblBrandManufacturer}</label>
                            <div class="col-sm-7 col-md-6 col-lg-5 col-xs-12">	
								{assign var="class" value=""}
								{if count($listBrand) lt 2000}
									{assign var="class" value="choosen"}
								{/if}							
								{form->select 
									class="{$class} form-control" 
									name="brandID" 
									value=$resSelectproduct.brandID|default:''  
									options=$listBrand  
									caption="->{$language.lblSelectBrand}"}
			                </div>
                     </div>
		      {form->hidden name="productAddedBy" value="1"}
			   {form->hidden name="businessID" value="1"}
                 
                      
					{if $productID}
				      <div class="form-group row">
                       <label class="col-sm-4 col-md-3 col-xs-12"> {$language.lblSelectedCategory}  </label>
                       <div class="col-sm-7 col-md-6 col-lg-5 col-xs-12">
                        {assign var="count" value=0}
                        {if (!empty($resProductcategory))} 
                          {foreach from=$resProductcategory item="productCategoryName"} 
						  {if isset($productCategoryName.productCategoryName)}
						  {assign var="count" value={$count+1}}
						  {if $count>1}>>{/if}{$productCategoryName.productCategoryName}
						  {/if}
						  {/foreach}
                                                  {/if}
                        </div>
                      </div>	
					{/if}
					{form->hidden name="productTypeID" value=$resProductTypeList[0].productTypeID|default:''}
         {form->hidden name="productTypeKey" value='product_product'}  
        {form->hidden id="productSelectedType"  name="productSelectedType" value="product" rel="product"}
        {form->hidden id="businessID"  name="businessID" value=$businessID|default:''} 
                          <div class="form-group row">
                            <label class="col-sm-4 col-md-3 col-xs-12">{$language.lblProductCategory} 
                                <span class="cmn-tooltip pos-rel"> 
                                    <span class="icon-set icon-question"></span> 
                                    <span class="help">{$language.lblfilterProducts}</span> 
                                </span>
                            </label>
                      <ul class="levl-01"> 
	   {form->hidden  name="productTypeID" value=$resProductTypeList[0].productTypeID|default:''}
	   {form->hidden name="productTypeKey" value='product_product'}  
	    {form->hidden id="productSelectedType"  name="productSelectedType" value="product" rel="product"}                          
		    <li class="clearfix">
				 <div class="top-spc clearfix">
				 <div class="category-section pos-relative col-md-6 col-sm-7 col-xs-12 form-group"> <i class="icon-enlarge hidden-xs"></i>
				  <div class="div-city" id="selProductCategory">
                      <div class="fixed-section">
                          <h2>{$language.lblProductCategory}</h2>
                      {assign var="categoryValue" value=""}
				{form->textbox name="filterCategories" class="filterBrands form-control margin-bottom" placeholder="{$language.lblSearchCategories}"}
                          </div>
				{assign var="categoryValue" value=""}
			        <ul  class="dragtree categoryList" id="categoryList">
                        {*<!--menu function-->*}
                 {function name=categories level=0 catValues=0}
                {foreach from=$data item="productCategory"} 
					 {if $productCategory.productCategoryStatus=='Inactive'}
				  {assign var="categoryName" value="<span class='inactive'>"|cat:$productCategory.productCategoryName|cat:"</span>"}              
				  {else}
				  {assign var="categoryName" value=$productCategory.productCategoryName} 
				  {/if}
                        <li  data-level="{$level}" category="{$productCategory.productCategoryID}" catname="{$productCategory.productCategoryName}" class="left-spacing {if $productCategory.productCategoryID==1} ui-state-disabled {/if} li_catIDs" >
									{if !(in_array($productCategory.productCategoryID, $categoryIDList|default:array()))}
                                    <span class="expand {if !(!empty($productCategory['children']) && is_array($productCategory['children']))}hide{/if} icon-plus2"></span>
									{else}
									<span class="expand colapse {if !(!empty($productCategory['children']) && is_array($productCategory['children']))}hide{/if} icon-icon-plus"></span>
									{/if}
									{if !(!empty($productCategory['children']) && is_array($productCategory['children']))}
																		  
									 {assign var="categoryValue" value=$catValues|cat:","|cat:$productCategory.productCategoryID}
										{*{if !(in_array($productCategory.productCategoryID, $categoryIDList|default:array()))}
										 {assign var="disable" value="disabled"}
										 {else}
										  {assign var="disable" value=""}
										 {/if}*}
									{form->checkbox   name="productCategoryID" class="categoryTree" id="category" options=$categoryValue|cat:"->"|cat:"&nbsp;"|cat:$categoryName value=$resProductcategory|default:''} 
									{else}
									 {assign var="categoryValue" value=$catValues|cat:","|cat:$productCategory.productCategoryID}
									{$categoryName} 
									{/if}
							{assign var="children" value=$productCategory['children']|default:''}
                             {if isset($productCategory['children']) && is_array($productCategory['children']) && !empty($productCategory['children'])}
                               <ul id="" class="categoryList {if !(in_array($productCategory.productCategoryID, $categoryIDList|default:array()))}hide {/if}"> 
                            {call name=categories data=$children level=$level+1 catValues=$categoryValue}  <!--menu function calling-->
                            </ul>
                        {else}
                             {if (is_array($productCategory)) && (isset($productCategory['menuItemID'])) && (is_numeric($productCategory['menuItemID']))}
                        </li>	
                        {/if}
                    {/if}
            {/foreach}  
          {/function}
          {call categories data=$resProductCategories} {*<!--menu function calling-->*}
             	 </ul>  
</div>

				 {form->validate name="categorySelected" validate="required" error=$language.errSelectAnyCategory}</div></div></li></ul></div>
                    <div class="form-group row" >
                       <label class="col-sm-4 col-md-3 col-xs-12"> {$language.lblProductTitle} </label>
                       <div class="col-sm-7 col-md-6 col-lg-5 col-xs-12">
                          {form->textbox   name="productTitle"  validate="required"  error=$language.errProductTitle class="form-control"  maxlength="225"}
                        </div>
                        
                      </div>
                                 
                    <div class="form-group row">
                        <label class="col-sm-4 col-md-3 col-xs-12">{$language.lblProductUrl}</label>
                        <div class="col-sm-7 col-md-6 col-lg-5 col-xs-12">
                   
                            {form->textbox   name="productUrl"  class="form-control"  maxlength="225" validate="isKey~*productUrl->database->products,productUrl,productID!='{$productID|default:""}' AND productStatus!='Deleted'" error=$language.errInValidProductIDKey|cat:'~*~*'|cat:$language.errUrlKeyExists validate_inline="yes"}
                        </div>
                    </div>
                    <div class="form-group row clearfix">
                            <label class="col-sm-4 col-md-3 col-xs-12">{$language.lblStartDate}</label>
                            <div class="col-sm-7 col-md-6 col-lg-5 col-xs-12">
							{assign var="productStartTime" value=$productStartTime|default:''}
			     {if $productStartTime!="0000-00-00"} 
                              {assign var="productStartTime" value=$productStartTime|customDate}			      
                              {else}
                              {assign var="productStartTime" value=""}
                              {/if}                
                              {form->hidden name="hiddenStartTimezone" value="1"}                
                              {if $productID && !$productReqID}                
                              {form->textbox name="productStartTime"    validate="isDate"  error=$language.errValidDate class="date_picker_field date-picker form-control" value=$productStartTime}                                
                              {else}                              
                              {form->textbox name="productStartTime"   validate="isDate~*hiddenStartTimezone->value->1->required"  error=$language.errValidDate|cat:"~*"|cat:$language.errPassedTime class="date-picker date-picker form-control"}                
                              {/if}
			    </div>
                          </div>                            
                          <div class="form-group row clearfix">
                            <label class="col-sm-4 col-md-3">{$language.lblEndDate}</label>
                            <div class="col-sm-7 col-md-6 col-lg-5 col-xs-12">
							{assign var="productEndTime" value=$productEndTime|default:''}
			      {if $productEndTime!="0000-00-00"}                           
                              {assign var="productEndTime" value=$productEndTime|customDate}                
                              {else}                              
                              {assign var="productEndTime" value=""}
                              {/if}                             
                               {form->textbox name="productEndTime" validate="timerCheck->isequal->checked~*required~*isDate" error=$language.errValidDate
                              class="form-control date-picker"} 
                              {form->hidden name="hiddenStartEndDate" value="2"}
                              {form->validate name="StartEndDatecheck"  validate="hiddenStartEndDate->isequal->0~*required" error=$language.errStartEndDate}
                              {form->hidden name="productTimeZone" value=$productTimeZone|default:''}
			    </div>
                          </div>			      
                          <div class="form-group row clearfix">
                            <label class="col-sm-4 col-md-3">{$language.lblShowCountDownCounter}</label>
                            <div class="col-sm-8 col-md-9">
                              <div class="levl-03">
                                <div>{if $showCountTimer|default:''=="Yes"}
                             {assign var="timer" value="checked"}                             
                              {/if}
                              {if $showCountTimer|default:''=="No"}                       
                               {assign var="timer" value=""}
                              {/if}
			      {form->hidden name="timerCheck" value=$timer|default:''}
                                {form->checkbox id="showCountTimer" name="showCountTimer" value="Yes" checked=$timer|default:'' class="checkbox01"} </div>
                              </div>
                            </div>
                          </div>
                          {form->hidden name="hiddenProductType"}                                                   
			  <div class="form-group row clearfix">
                	       <label class="col-sm-4 col-md-3 col-xs-12">{$language.lblEnableInventoryTracking}</label>
                           <div class="col-sm-7 col-md-6 col-lg-5 col-xs-12">                    
			     {form->select  id="InventoryTrackLevel" name="InventoryTrackLevel" class="form-control" options="No->{$language.lblDoNotTrack}~*Product->{$language.lblProductLevel}~*Options->{$language.lblCombinationLevel}"}	 
                          </div>
                          </div>         
						{if $productReturn['enableReturn'] == 'Yes'}		 
							<div class="form-group row clearfix">
								<label class="col-sm-4 col-md-3">{$language.lblReturnable}</label>
								<div class="col-sm-8 col-md-9">
									{if $resSelectproduct.productReturnable|default:''!=''} 
										{assign var="returnable" value=$resSelectproduct.productReturnable}
									{else}
										{assign var="returnable" value=$productReturn['enableReturn']}
									{/if}
									<div class="levl-03">
										<div>
											{form->checkbox name="productReturnable" value="Yes" class="checkbox01" checked="{if $returnable == 'Yes'}checked{/if}" onClick="return enableReturn()"}
										</div>
									</div>
								</div>	
							</div>	
							<div class="form-group row clearfix">
								<label class="col-sm-4 col-md-3 col-xs-12">{$language.lblReturnPeriod}</label>
								<div class="col-sm-7 col-md-6 col-lg-5 col-xs-12">
									{if $resSelectproduct.productReturnPeriod|default:''!=''}
										{assign var="returnPeriodVal" value=$resSelectproduct.productReturnPeriod}
									{else}	
										{assign var="returnPeriodVal" value=$productReturn['returnPeriod']}
									{/if}	
										{form->textbox name="returnPeriod" class="form-control" validate="productReturnable->isEqual->Yes~*required~*isWholeNumberWithOutZero" error="~*"|cat:$language.errReturnPeriod|cat:"~*"|cat:$language.errValidNumber value=$returnPeriodVal}
								</div>	
							</div>	
						{/if}
                          {form->hidden name="hidshippingStatus" class=" checkbox01" value="Free"} 
                          {if !$productReqID && $productID>0} 
                              {if $productStatus|default:''!='Pending'}
                                <div class="form-group row clearfix">
                                    <label class="col-sm-4 col-md-3 col-xs-12">{$language.lblStatus}</label>
                                    <div class="col-sm-8 col-md-9" id="pedioddiv"><div class="custom-radio"> 
                                            {if $productStatus|default:''=='Pending'}
                                              {assign var="disabled" value="disabled"}
                                            {else}
                                                 {assign var="disabled" value=""}
                                            {/if}
                                            {form->radio name="productStatus" class="customradio" options="Active->{$language.lblActive}~*Inactive->{$language.lblInactive}" disabled=$disabled value="Active"} 
                                        </div></div>
                                  </div>
                             {else}
                                 {form->hidden name="productStatus" value="Pending"}
                             {/if}
                          {/if}
                            
                             
                    <div class="form-group cropSection cur_menu">
                      <h3 class="border-bottom">{$language.lblMedia}</h3>
                    </div>
                     
                    <div class="form-group media-upload clearfix"> {assign var="productImage" value=$productImage|default:''}       
                      <label class="col-sm-4 col-md-3 col-xs-12">{$language.lblProductImage}
						  <span class="sub-text">{$language.lblMaximumFileSize} {$FILE_UPLOAD_LIMIT}<br/> {$language.lblFileTypes} {$VALID_IMAGE_FILES} </span></label>
                      <div class="col-sm-8 col-md-9">
<div class="crop-block form-group">
  <div class="img-left clearfix"> 
              <p><strong>{$language.lblLargerimage}</strong></p>
                 {if $productReqID} 
                  {assign var="productImageLoc" value="catalog-request/product"}                  
                  {else}                  
                  {assign var="productImageLoc" value="catalog/product"} 
                  {/if} 
                   <span  class="product-img-main pull-left clearfix">
		    {form->upload_image
					name			= "productImage"
					delete_button	= "no"
					path			= "uploads/"|cat:$productImageLoc|cat:"/"|cat:"large/"
					file			= $productImage|default:''
					validate		= "required" 
                                        error			= $language.errValidImage} </span>   
            <div  class="pull-left img-txt">{$language.lblPimage} <a href="#" id="preview_hide">{$language.lblUploadPreview}</a></div>    
		    {form->hidden name="hidMainImage" value=$productImage}
  </div>
             <div class="img-right" id="preview_main">
              <p>  {$language.lblPreviewimage} ( {$language.lblImagedisplay} {$dataResize['previewWidth']}*{$dataResize['previewHeight']}).</p>
                
                   <span class="pull-left">
		  {form->upload_image
				name		= "productImageThumb"
				path		= "uploads/"|cat:$productImageLoc|cat:"/"|cat:"preview-main/"
				file		= $productImageThumb|default:''
				validate	= "isImage"
				error		= $language.errValidImage
				message_delete = $language.lblmsgdeleteImg} </span> 
                   <div class="pull-right img-txt"> {$language.lbllistthumbnail}  (   
    {$dataResize['thumbWidth']}*{$dataResize['thumbHeight']}) & {$language.lblsmallthumbnail} ({$dataResize['smallthumbWidth']}*
    {$dataResize['smallthumbHeight']})  {$language.lblGenerateImg}</div>
			  {form->hidden name="hidThumbImage" value= $productImage}	  
	     </div>
           </div> </div>
		      {form->hidden name="thumbPreview" value=$thumbPreview|default:''}
                       {form->hidden name="productID" value=$productID}          
                        {form->hidden name="productRequestID" value=$productReqID}
                        {form->hidden name="productCommisionhidden" value=$globalCommisionPercentage|default:''} 
                         
                    </div>                   
                </div>
                        <div class="form_listing" id="select_product"> </div>
              </div>
            </div>
                    {*<!-- tab General tab-1 ends --> *}
                    {*<!-- tab Contents tab-2 starts -->*}
             <div class="tabpane" style="display:none">
              <div class="tabpane_inner"> <span class="BreadCrump">
                <ul class="clearfix">
                  <li>{$language.lblProductDetails}&raquo; </li>
                  <li>{$language.lblQuantityandPrice}</li>
                </ul>
                </span>
                <div class="form_listing">
                  <div class="info-head clearfix">
                      <h3 class="border-bottom">{$language.lblPricingInventory}</h3>
                      </div>
                         <div class="form-group row">
                                <label class="col-sm-4 col-md-3 col-xs-12">{$language.lblSellAsBatch}</label>
                                <div class="col-sm-7 col-md-6 col-lg-5 col-xs-12">
                                {form->checkbox name="sellAsBatch" value="Yes" class="checkbox01"  tabindex="17" checked="{if $sellAsBatch eq "Yes"}checked{/if}"}
                                </div>
                            </div>
                            <div class="form-group row sellasbatch">
                                <label class="col-sm-4 col-md-3 col-xs-12">{$language.lblBatchType}</label>
                                <div class="col-sm-7 col-md-6 col-lg-5 col-xs-12">
                                    <div class="col-xs-6 rmv-padding">
                                {form->select id="batchType" name="batchType" class="form-control" options="pieces->Pieces~*numbers->Numbers"}</div>
                                </div>
                            </div>

                            <div class="form-group row sellasbatch">
                                <label class="col-sm-4 col-md-3 col-xs-12">{$language.lblQuantityPerBatch}</label>
                                <div class="col-sm-7 col-md-6 col-lg-5 col-xs-12"> <div class="col-xs-6 rmv-padding">
                                    {form->textbox  class="form-control" name="qtyPerBatch" value="{$qtyPerBatch}" validate="sellAsBatch->isequal->Yes~*required~*isWholeNumberWithoutZero"  error=$language.errRequired|cat:"~*"|cat:$language.errQuantityRequired|cat:"~*"|cat:$language.errValidNumber}</div>
                                </div>
                            </div>
                          <div class="form-group row">
                            <label class="col-sm-4 col-md-3 col-xs-12">{$language.lblMinimumOrder}<span class="sub-text">({$language.lblMinimumOrderLimitIndividual})</span></label>
                            <div class="col-sm-7 col-md-6 col-lg-5 col-xs-12">
                            {if $productMinBuyLimit|default:''=="" || $productMinBuyLimit|default:''=="0"}
                              {assign var="productMinBuyLimit" value="1"}
                              {/if}
                              {form->textbox maxlength="9"  name="productMinBuyLimit" validate="required~*isWholeNumberWithOutZero"  error=$language.errMinimumOrder|cat:"~*"|cat:$language.errMinimumOrderZero class="form-control"} </div>
                          </div>
                          <div class="form-group row">
                            <label class="col-sm-4 col-md-3 col-xs-12">{$language.lblMaximumOrderLimit}<span class="sub-text">({$language.lblMaximumOrderLimitIndividual})</span></label>
                            <div class="col-sm-7 col-md-6 col-lg-5 col-xs-12"> {form->hidden name="hiddenmaxcertificate" value=1}                  
                              {form->textbox  maxlength="9" name="productMaxBuyLimit" validate="isWholeNumberWithOutZero"  error=$language.errMaximumOrderLimitZero class="form-control"}                  
                              {form->validate name="hidmaxcertificate" validate="hiddenmaxcertificate->isequal->0~*required" error=$language.errMaxOrderLimit}</div>
                          </div>
                          {form->hidden name="productDefaultCurrency" value=$defaultCurrency} 
                 {if $taxApplicable=="Yes"}
                              {assign var="tax" value="checked"}
                              {else}
                               {assign var="tax" value=""}
                              {/if}                              
                           <div class="form-group row stock">
                            <label class="col-sm-4 col-md-3 col-xs-12">{$language.lblNotifyQty}</label>
                            <div class="col-sm-7 col-md-6 col-lg-5 col-xs-12">                            
             {form->textbox name= "productQuantityNotifyAt"  class= "form-control"
                    maxlength= "9" validate="InventoryTrackLevel->isnotequal->No~*isWholeNumberWithOutZero" error=$language.errValidQunatity value="1"}
                    </div>
                          </div>
			    <div class="form-group row stock">
                            <label class="col-sm-4 col-md-3 col-xs-12">{$language.lblShowAvailQty}</label>
                            <div class="col-sm-7 col-md-6 col-lg-5 col-xs-12">                            
            {form->textbox name= "showQuantityAvailable"  class= "form-control"
                    maxlength		= "9" validate="InventoryTrackLevel->isnotequal->No~*showQuantityAvailable->isnotequal->~*isWholeNumberWithZero" error=$language.errValidQunatity}
                    </div>
                           </div>
                          {if $taxApplicable=="Yes"}
                          <div class="form-group row">
                            <label class="col-sm-4 col-md-3 col-xs-12">{$language.lblTaxClass}</label>
                            <div class="col-sm-7 col-md-6 col-lg-5 col-xs-12"> {form->select name="taxClassID" class="form-control" options=$resTaxClass caption="->{$language.lblSelectTaxClass}"} </div>
                          </div>
                          {/if}			              
                           <div class="form-group row">                  
                  <label class="col-sm-4 col-md-3 col-xs-12">{$language.lblMeasurementClass}</label> <div class="col-sm-7 col-md-6 col-lg-5 col-xs-12"> 
                               <div class="row">
                 <div  class="col-xs-6">
                   <label class="label">{$language.lblWeight}</label> 
                     {form->select  name="measurementWeight" class="form-control" value=$resSelectproduct.measurementWeight|default:'' options=$resWeight}  </div>
                           <div  class="col-xs-6"> <label class="label">{$language.lblLength}</label> {form->select name="measurementLength" options=$resLength class="form-control" value=$resSelectproduct.measurementLength|default:''}</div>
                               </div>
                      </div> </div>			   
                    <div class="form-group row">
                     <label class="col-sm-4 col-md-3 col-xs-12"> {$language.lblMOptions}</label>
                      <div class="col-sm-7 col-md-6 col-lg-5 col-xs-12">{if $multiOptionsAvailable|default:''=="Yes"}                    
                              {assign var="enableMultiple" value="checked"}                    
                              {else}                    
                              {assign var="enableMultiple" value=""}                    
                              {/if}
			        {form->hidden name="enableMultiple" value=$enableMultiple}
                        {form->checkbox id="enableMultipleOptions" name="enableMultipleOptions" value="Yes" checked=$enableMultiple class="checkbox01"}
                        <span class="cmn-tooltip pos-rel"><span class="icon-question"></span> <span class="help">{$language.lblmvariantToolTip}</span></span>
                      </div>
                    </div>
                    
                    <div class="clearfix " id="optionTab"> 
                    {include file='ProductAdd_Options.tpl'}
                        <div class="single-option">
                            <a class="btn-add btn btn-primary btn-sm pull-right margin-top" id="add_new_options"><span class="icon-plus2"></span>{$language.lblAddOptions}</a>
                        </div>  
                    </div>
                        
                                
                </div>
              </div>
            </div>   
                    {*<!-- tab Contents tab-2 ends --> *}
                    {* <!-- tab Contents tab-2 ends -->  *}
            <div class="tabpane" style="display:none;">
              <div class="tabpane_inner"> <span class="BreadCrump">
                <ul class="clearfix">
                  <li>{$language.lblProductDetails}&raquo; </li>
                  <li> <span> {$language.lblContents} </span></li>
                </ul>
                </span>
                <div class="form_listing">
		      <div class="info-head"><h3 class="border-bottom">{$language.lblProductInfo}</h3></div>
                        <div class="form-group row"> 
                     
                      <label class="col-sm-4 col-md-3">{$language.lblShortDescription}</label>
                      <div class="col-sm-8 col-md-9">
                         {form->editor  mode="simple" skin=2 name="productShortDescription" id="productShortDescription" value=$resSelectproduct.productShortDescription|default:'' class="text-area-01"}
                      </div>
                    </div> 
                  <div class="form-group row"> 
                      {* <!--start: left pane -->*}
                      <label class="col-sm-4 col-md-3">{$language.lblDescription}</label>
                      <div class="col-sm-8 col-md-9">
                          {form->editor   mode="simple" skin=2 name="productDescription" id="productDescription" validate="required" value=$resSelectproduct.productDescription|default:'' error=$language.errProductDescription class="text-area-01"}
                      </div>
                    </div> 
                    <div class="form-group row"> 
                        {*<!--start: left pane -->*}
                      <label class="col-sm-4 col-md-3">{$language.lblHighlights}</label>
                      <div class="col-sm-8 col-md-9">
                          {form->editor   mode="simple" skin=2 name="productHighlights" id="productHighlights"  value=$resSelectproduct.productHighlights  class="text-area-01"}
                      </div>
                    </div>
		     <div class="form-group row">
                    <label class="col-sm-4 col-md-3">{$language.lblSearchTags}</label>
                    <div class=" col-sm-7 col-md-6 col-lg-5 col-xs-12 "> {form->textarea   name="searchTags" class="form-control"}</div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-4 col-md-3"> {$language.lblMetaTitle} </label>
                    <div class="col-sm-7 col-md-6 col-lg-5 col-xs-12 "> {form->textbox   name="productMetaTitle" class="form-control"}</div>
                  </div>
                  
                   <div class="form-group row">
                    <label class="col-sm-4 col-md-3">{$language.lblMetaKeywords}</label>
                    <div class="col-sm-7 col-md-6 col-lg-5 col-xs-12 "> {form->textarea  name="productMetaKeywords" class="form-control" cols="4" rows="4"} 
                    </div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-4 col-md-3"> {$language.lblMetaDescription} </label>
                    <div class="col-sm-7 col-md-6 col-lg-5 col-xs-12 ">
                      {form->textarea   name="productMetaDescription" class="form-control" cols="4" rows="4"} 
                    </div>
                  </div>
              
                </div>
              </div>
            </div>

             {* <!-- tab Contents tab-2.2.2 starts -->  *}
                    {if $productID}<div class="tabpane" style="display:none;">
              <div class="tabpane_inner"> <span class="BreadCrump">
                <ul class="clearfix">
                  <li>{$language.lblProductDetails}&raquo; </li>
                  <li> <span> {$language.lblMenuSizechart} </span></li>
                </ul>
                </span>
			 {*<div class="form_listing">
			 {form->start name="formSizeChartAdd" action="" method="post" enctype="multipart/form-data" rel="sizechart-save"}*}
			<div class="form_listing">
                  <ul class="levl-00">
					  <li class="clearfix">
                          <div class="left01 ">{$language.lblEnableSizeChart}</div>
                            <div class="right01 pull-right top-spc">		
								{assign var="enableSizeChart" value=$enableSizeChart|default:''} 
								<ul class="levl-03">
									<li>
										{assign var="sizeChart" value=$sizeChart|default:''}
										{if $enableSizeChart=="Yes" && $productID!=""}
											{assign var="sizeChart" value="checked"}                             
										{/if}
										{if ($enableSizeChart=="" || $enableSizeChart=="No") && $productID!=""}                       
											{assign var="sizeChart" value=""}
										{/if}                             
										{form->hidden name="issizeChartCheck" value=$sizeChart}
										{form->checkbox  id="enableSizeChart" name="enableSizeChart" value="Yes" checked=$sizeChart class="checkbox01"} 
										
									</li>
								</ul>
							 </div>
						</li>
						  <li class="clearfix" id="showAgreeSection">
							  <div class="left01 ">{$language.lblSizeChart}</div>
								<div class="right01 pull-right top-spc">		
									
									<ul class="levl-03">
										<li>
											   {form->editor  mode="simple" skin=2 name="productSizeChart" id="productSizeChart" value="" error=$language.errProductDescription class="text-area-01"}
										</li>
									</ul>
								 </div>
							</li>						
					</ul>
				 </div>
              </div>
            </div>
	    {/if}
                    
                     {* <!-- tab Contents tab-2.2.2 ends -->  *}       
                    
                    
                    
                    {*<!--  tab-3 starts -->*}
             {form->close}
             {include file='CustomAttribute.tpl'}
	      {include file='ProductCustomOption.tpl'}
	      {form->hidden name="optionBlockChange" value="0"}
                 {include file='ProductInventory.tpl'}
                 {include file='ProductShipping.tpl'}
	  {if $productID && $productReqID==""}
          <div class="tabpane" style="display:none;">
            <div class="tabpane_inner">
	      <span class="BreadCrump">
                <ul class="clearfix">
                  <li> {$language.lblProductDetails}&raquo; </li>
                  <li> <span> {$language.lblRelatedProducts} </span></li>
                </ul>
                </span>
             {form->hidden name="selectedProductProductIDs" value=$Productproducts}
        <div class="content-block"> {form->hidden name="hid_view_images" value="$view_images/input_bg/remove.gif"}
          <div class="drope-block-03" id="divLoadProducts"> {include file='AjaxRelatedProducts.tpl'}
          </div>
        </div>
              </div>
            </div>
          {/if}
	    {if $productID && $productReqID==""}
	   <div class="tabpane" style="display:none;">
            <div class="tabpane_inner">
	      <span class="BreadCrump">
                <ul class="clearfix">
                  <li> {$language.lblProductDetails}&raquo; </li>
                  <li> <span> {$language.lblUpSellProducts} </span></li>
                </ul>
                </span>
             {form->hidden name="selectedProductProductIDsUp" value=$ProductUpproducts}
        <div class="content-block"> {form->hidden name="hid_view_images" value="$view_images/input_bg/remove.gif"}
          <div class="drope-block-03" id="divLoadUpsellProducts"> {include file='AjaxUpsellProducts.tpl'}
          </div>
        </div>
              </div>
            </div>
	  {/if}
	   {if $productID && $productReqID==""}<div class="tabpane"  style="display:none;">
            <div class="tabpane_inner">
	      <span class="BreadCrump">
                <ul class="clearfix">
                  <li> {$language.lblProductDetails}&raquo; </li>
                  <li> <span> {$language.lblCrossSellProducts} </span></li>
                </ul>
                </span>
             {form->hidden name="selectedProductProductIDsCross" value=$ProductCrossproducts}
        <div class="content-block"> {form->hidden name="hid_view_images" value="$view_images/input_bg/remove.gif"}
          <div class="drope-block-03" id="divLoadCrosssellProducts"> {include file='AjaxCrosssellProducts.tpl'}
          </div>
        </div>
              </div>
            </div>
	    {/if}
          </div>
              </div>
  </div>
  </div>  
</div>
	<script type="text/template" id="groupPricetemplate">
	 <div class="clearfix parent">
                        <div class="col-xs-6 field rmv-padding">
		 {form->select 
					options="{$listUsergroups}" 
					rel="<%= productOptionCount%>_<%= index%>"
					productOptionCount="<%= productOptionCount%>"
					name="<%= group%>[<%= productOptionCount%>][group_price][<%= index%>][userGroupID]"  
					class="<%= prefix%>group_price_user_group input-text custgroup required-entry form-control"}
					<span class="message_validation grp_<%= productOptionCount%>_<%= index%> hide"><span>{$language.errDuplicateCombination}</span></span>
		    </div>
			
                    <div class="col-xs-5 rmv-padding">
		 {form->textbox 
					class="<%= prefix%>group_price_sp_price <%= productOptionCount%>_<%= index%> form-control validate-zero-or-greater required-entry"
					validate="callback_usergroupprice"
					error="Required"
					name="<%= group%>[<%= productOptionCount%>][group_price][<%= index%>][specialPrice]"}
		    </div>
            <div> <a title="{$language.lblDeleteGroupPrice}"  class="icon-close txt-hide" id="group_price_row_<%= index%>_delete_button" onclick="return groupPriceControl.deleteItem($(this));">
				</a>
				</div>
            </div>
	</script>
	<script type="text/template" id="tierPriceRowTemplate">
	<div class="clearfix parent">
                        <div class="col-xs-4 field rmv-padding">
		  {form->select 
					caption="->{$language.lblAllGroups}"
					options="{$listUsergroups}" 
					rel="<%= productOptionCount%>_<%= index%>"
					productOptionCount="<%= productOptionCount%>"
					name="<%= group%>[<%= productOptionCount%>][tier_price][<%= index%>][userGroupID]"  
					class="<%= prefix%>tier_price_user_group form-control"}
					<span class="message_validation tier_<%= productOptionCount%>_<%= index%>  hide"><span>{$language.errDuplicateCombination}</span></span>
		    </div>
            <div class="col-xs-4 field rmv-padding">
			<small class="hidden-xs hidden-sm">{$language.lblandabove}</small>
		   {form->textbox 
					class="<%= prefix%>tier_price_qty <%= productOptionCount%>_<%= index%> tier-qty form-control required-entry"
					validate="callback_tierprice_quantity"
					error="Required"
					name="<%= group%>[<%= productOptionCount%>][tier_price][<%= index%>][quantity]"}
		    </div>
                    <div class="col-xs-3 rmv-padding">
			{form->textbox 
					class="tier_price_tier_price <%= productOptionCount%>_<%= index%> form-control required-entry "
					validate="callback_tierprice_price"
					error="Required"
					name="<%= group%>[<%= productOptionCount%>][tier_price][<%= index%>][tierPrice]"}
		    </div>
            <div><a title="{$language.lblDeleteTier}"  class="icon-close txt-hide" id="tier_price_row_<%= index%>_delete_button" onclick="return tierPriceControl.deleteItem($(this));">
					</a>
									</div>
            </div>
	</script>
</div>
{include file='CommonBottom.tpl'}
</div>
    {*<!--End:Outer Container--> *}
{include file='CommonJavaScriptBottom.tpl'}
<script type="text/javascript" src="{$view_javascript}/moment.min.js"></script>
<script type="text/javascript" src="{$view_javascript}/bootstrap-daterangepicker-min.js"></script>
    

<script type="text/javascript" src="{$common_js}/uploadImage.plugin.js"></script> 
<script type="text/javascript" src="{$view_javascript}/jquery-ui-timepicker-addon.js"></script> 
    {*<!-- NOW DEAL BEGIN --> *}
<script type="text/javascript" src="{$view_javascript}/jquery-ui.multidatespicker.js"></script> 
    {*<!-- NOW DEAL END --> *}
{form->editor_script names="productFinePrint,productHighlights,productDescription,productShortDescription,productSizeChart"}
{html->messages_script id="common_message"}
{form->basepath_script}
{form->rootpath_script}
<script type="text/javascript" src="{$common_js}/validate.plugin.js"></script> 
<script type="text/javascript" src="{$common_js}/underscore.plugin.js"></script> 
<script type="text/javascript">
var strtpass="{$language.errPassedTime}";
var optionprice="{$language.errProductRegularPrice}";
var currDate="{$currDate|customDate}";
var msgSearchWarning="{$language.msgSearchWarning}";
var msgSelectAtleastOne="{$language.msgdelOption}";
var msgSelectDifferentNames="{$language.msgSelectDifferentNames}";
var msgSelectDifferentNamesoption="{$language.msgSelectDifferentNamesoption}";
var msgDeleteItem="{$language.msgDeleteItem}";
var msgDeleteImage="{$language.msgDeleteImage}";
var msgSaveImage="{$language.msgSaveImage}";
var msgOptionDeleted="{$language.msgOptionDeleted}";
var lblDelete="{$language.lblDelete}";
var msgNoImagesAdded="{$language.msgNoImagesAdded}";
var msgOptionSaved="{$language.msgOptionSaved}";
var msgNoOptionsAdded="{$language.msgNoOptionsAdded}";
var msgRelatedProductsSaved="{$language.msgRelatedProductsSaved}";
var msgUpsellProductsSaved="{$language.msgUpsellProductsSaved}";
var msgCrosssellProductsSaved="{$language.msgCrosssellProductsSaved}";
var msgdeldefaultOption="{$language.msgdeldefaultOption}";
var errProductRegularPrice="{$language.errProductRegularPrice}";
var productType="Product";
var lblSelectItem ="{$language.lblSelectItem}";
var errRequired 	=	"{$language.errRequired}";
var errValidNumber 	=	"{$language.errValidNumber}";
var lblPageLeaveAlert = "{$language.lblPageLeaveAlert}";
var defaultCurrency={$defaultCurrency};
var SelectCategory 	=	"{$language.lblSelectCategory}";
var lblCancel 	=	"{$language.lblCancel}";
var lblFrom 	=	"{$language.lblFrom}";
var lblTo 	=	"{$language.lblTo}";
</script> 
<script type="text/javascript" src="{$view_javascript}/jquery.colorbox.js"></script> 
<script type="text/javascript">
var lblSelect 			= "{$language.lblSelect}";
var postCallback = "{$postCallback}";
var __currentTab = "";
//use Rel as assign value
{if $ctab=='coption'}
__currentTab="custom-option-save";
{else if $ctab=='cattr'}
__currentTab="attribute-save";
{/if}
</script>
    
<script type="text/javascript" src="{$view_javascript}/productCommon.page.js"></script> 
<script type="text/javascript" src="{$view_javascript}/productAdd.page.js"></script>
<script type="text/javascript" src="{$view_javascript}/buybox.page.js"></script>
{form->validate_script form="Product"}

<script type="text/javascript">
$(document).ready(function(){
    $('.category-section i').click(function(){
         $('.category-section').toggleClass('open');
        $('body').toggleClass('overflow');
    });
    if (window.matchMedia('(max-width: 768px)').matches) {
      $('.mob-Lmenu').click(function () {
        $(this).toggleClass('active');
        $('.leftList').slideToggle();
      });
    }
    
    $(".choosen").chosen({
        rtl: true
    });
    
}); 
</script>
</body>
</html>