<!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">
<title>{$language.lblBusiness} :{$language.lblProductsTitle} :{$language.lblTitleProduct}</title>
{include file='CommonStyles.tpl'}
{include file='CommonJavaScript.tpl'}
<link rel="stylesheet" type="text/css" href="{$view_styles}/choosen.css" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/product-listing.css" media="screen" />
<script type="text/javascript" src="{$view_javascript}/chosen.jquery.min.js"></script>

{form->basepath_script}
{form->rootpath_script}
</head> 
<body class="{$languageDirection}">
<div id="main" class="outer">
    {include file='CommonHeader.tpl'} 
  <!--****************************************START CONTAINER SECTION******************************-->
  <div class="content-wrapper">
      <div class="container-fluid">
          <div class=" clearfix">
                <noscript>
                    <div class="message_info">{$language.lblJsEnable} !!</div>
                </noscript>
        <div id="common_message"></div>
        <!-- Inner Content Container starts-->
        <div class="inner_content_wrapper"> 
          <!-- Search container starts -->
            <div class="container-section search-wrapper ">
                {if $settingsBuyboxEnable|default:'' eq "Yes"}
                    {assign var="productAddAction" value="add"}
                {else}
                    {assign var="productAddAction" value="new"}
                {/if}
                 {html->anchor href="/product/{$productAddAction}/" class="add-btn  btn btn-primary bt-sm margin-horizontal pull-right" content="<span class='icon-plus2'></span> {if $requestReviewSettings=='Yes'} {$language.lblAddProductRequest}{else}{$language.lblAddProduct}{/if}"}
                <h3 class="border-bottom">{$language.lblMenuListProduct}</h3> 
          {form->start name="frmSearchProducts" action="" method="post"}         
          <div class="search_container content-block clearfix">
            <div class="inner">
              <div class="row">
                    <div class="form-group col-xs-12 col-sm-3">
                      <label>{$language.lblProductIDTitle}</label>
                      <span class="form-field01"> {form->textbox name="searchProductName" class="form-control"} </span> 
                      </div>
                    <div class="form-group col-xs-12 col-sm-3">
                      <label>{$language.lblProductCategory}</label>
                      <span class="form-field01"> {form->hidden name="categories" value=$searchProductCategorySel}
                      {form->select name="searchProductCategory" class="form-control" size="5"  multiple="multiple" options=$resCategories} </span> 

                      </div>
                    <div class="form-group col-xs-12 col-sm-3" >
                      <label>{$language.lblBrand}</label>
                      <span class="form-field01"> {form->select class="form-control" name="brandID" caption="->{$language.lblSelect}" options=$listBrand} </span> </div>
                    <div class="advanceSearch form-group col-xs-12 col-sm-3" style="display:none;">
                        <label>{$language.lblStatus}</label>
                      <span class="form-field01"> {form->select class="form-control" name="productStatus" options="->{$language.lblStatus}~*Active->"|cat:$language.lblActive|cat:"~*Inactive->"|cat:$language.lblInactive|cat:"~*Buybox->"|cat:$language.lblBuybox value=""} </span> 
                      </div>
             </div>
             <div class="row">
                   <div class="advanceSearch form-group col-xs-12 col-sm-3" style="display:none;">
                       <label>{$language.lblDate}</label>
                <span class="form-field01"><div class="text-box-div-date">
                    {form->textbox id="searchProductDate" name="searchProductDate" readonly="readonly" class="date-picker form-control" value=$searchProductDate}</div>
                       </span>
                </div>	
                
               <!-- For Frontend Implementations -->
                    <div class="advanceSearch form-group col-xs-12 col-sm-3" style="display:none;">
                      <label>{$language.lblQtyBlw}</label>
                       {form->textbox name="searchQuantityBelow" class="form-control"}
                    </div>                  
                    <div class="advanceSearch form-group col-xs-12 col-sm-6" style="display:none;">
                    <div class="row">
                    <div class="col-xs-6">
                      <label>{$language.lblMin} {$language.lblSaleprice}</label>
                      {form->textbox name="searchPriceFrom" class="form-control"} 
                    </div>
                    <div class="col-xs-6">
                      <label>{$language.lblMax} {$language.lblSaleprice}</label>
                      {form->textbox name="searchPriceUpto" class="form-control"}
                    </div>
                    </div>
                    </div>
                    <div class="advanceSearch form-group col-xs-12 col-sm-6"  style="display:none;">
                    <div class="row">
                    <div class="col-xs-6">
                      <label>{$language.lblMin} {$language.lblDiscount} (%)</label>
                       {form->textbox name="searchDiscountFrom" class="form-control"}
                    </div>
                    <div class="col-xs-6">
                      <label>{$language.lblMax} {$language.lblDiscount} (%)</label>
                      {form->textbox name="searchDiscountTo" class="form-control"}
                    </div>
                    </div>
                      </div>
             </div>
                
                <div class="col-xs-12 rmv-padding">
                  {form->hidden name="searchOption" value="{$searchOption}"}
                  {form->submit name="submitProductSearch" id="submit" class="btn btn-primary btn-sm"  value=$language.lblSearch}
                  {html->anchor href="/product/index/" class="action-link" content="{$language.lblListAll}"}  
				  {html->anchor class="action-link searchLink" id="searchLink" content="{$language.lblAdvanceSearch}" rel="advance"}
				  </div>
              </div>
            </div>
          </div>
          {form->close} 
              </div>
          <!-- Search container ends --> 
          {if $resProducts|@count>0} 
          <!-- sort by starts -->
            <div class="container-section">
          <div class=" clearfix">
     
            <div class="sort_links border-bottom clearfix {if $sortByOption==''}right-pos {/if}"> 
            <div class="pull-left">
             {include file='ContentLanguageOptions.tpl'}
            </div>
                <span class="sort-link"></span> 
			{if $sortByOption=='skey'}
              {assign var="sortLabel" value=$language.lblProductID}
              {elseif $sortByOption=='stitle'}                	
              {assign var="sortLabel" value=$language.lblProductTitle}
              {elseif $sortByOption=='sbusiness'}
              {assign var="sortLabel" value=$language.lblBusiness}
              {elseif $sortByOption=='sprice'}
              {assign var="sortLabel" value=$language.lblSaleprice}
              {elseif $sortByOption=='sdiscount'}
              {assign var="sortLabel" value=$language.lblDiscount}
              {elseif $sortByOption=='sfeatured'}
              {assign var="sortLabel" value=$language.lblFeatured}
              {elseif $sortByOption=='spopular'}
              {assign var="sortLabel" value=$language.lblPopular}
              {elseif $sortByOption=='sendsoon'}
              {assign var="sortLabel" value=$language.lblEndingSoon}
              {elseif $sortByOption=='screated'}
              {assign var="sortLabel" value=$language.lblRecency}
              {/if} 
              
              {if $sortByOrder=='asc' || $sortByOrder==''}
              {assign var="sortOrderAsc" value="active"}
              {assign var="sortOrderDesc" value="inactive"}
              {else}
              {assign var="sortOrderAsc" value="inactive"}
              {assign var="sortOrderDesc" value="active"}
              {/if} <span class="sortby-list pull-right"> 
                {if $sortByOption==''}  
                {$language.lblSortby} 
                <span class="caret"></span>
                </span> 
                {else} 
                {$sortLabel}
                <span class="caret"></span>
                </span>
              {html->anchor class="asnd {$sortOrderAsc}" href="/product/index/{$link}/sortby/{$sortByOption}/orderby/asc/" content="<span class='arw'></span> <span class='line'></span>"}
              {html->anchor  class="dsnd {$sortOrderDesc}" href="/product/index/{$link}/sortby/{$sortByOption}/orderby/desc/"
              content="<span class='line'></span> <span class='arw'></span>"}
              {/if}
              <ul class="sort_links_ul" >
                <li>{html->anchor href="/product/index/$link/sortby/stitle/orderby/$sortByOrderProductTitle/" title="{$language.lblProductTitle}" content="{$language.lblProductTitle}"} </li>
                <li>{html->anchor href="/product/index/{$link}/sortby/sprice/orderby/$sortByOrderByPrice/" title="{$language.lblSaleprice}" content="{$language.lblSaleprice}" class=$csaleprice|default:''} </li>
                <li>{html->anchor href="/product/index/{$link}/sortby/sdiscount/orderby/$sortByOrderByDiscount/" title="{$language.lblDiscount}" content="{$language.lblDiscount}" class=$cdiscount|default:''} </li>
                <li>{html->anchor href="/product/index/{$link}/sortby/sfeatured/orderby/$sortByOrderByFeatured/" title="{$language.lblFeatured}" content="{$language.lblFeatured}" class=$cfeatured|default:''} </li>
                <li>{html->anchor href="/product/index/{$link}/sortby/spopular/orderby/$sortByOrderByPopular/" title="{$language.lblPopular}" content="{$language.lblPopular}" class=$cpopular|default:''} </li>
                <li>{html->anchor href="/product/index/{$link}/sortby/screated/orderby/$sortByOrderDate/" title="{$language.lblRecency}" content="{$language.lblRecency}" class=$cnewlyadded|default:''} </li>
                <li>{html->anchor href="/product/index/{$link}/sortby/sendsoon/orderby/$sortByOrderByEnding/" title="{$language.lblEndingSoon}" content="{$language.lblEndingSoon}" class=$cendingsoon|default:''} </li>
              </ul>
            </div>
            
          </div>
         
          <!-- sort by ends --> 
          <!--Start: Product List--> 
          {form->start name="formProduct" action="" method="post" enctype="multipart/form-data"}
          {if $settingEditProduct=='Yes' && $agreeBusiness|default:''=='yes'}
		{assign var="disabledTxt" value=""}	 
		  {else}
		  {assign var="disabledTxt" value="disabled"}			 
		  {/if}
           {if $agreeBusiness|default:''!='yes'}
            <div class="margin-horizontal margin-vertical">
                <div class="message_info">{$language.lblMerAgremnt}</div>
            </div>
            {/if}
			<div class="grid_table00 product-list"> 
				<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-bordered"  >
					<thead>
						<tr>
						
  						<th align="left" valign="middle" colspan="2" width="30%">
  						    {if $settingEditProduct=='Yes'}<span class="chkd-item">
  						{form->checkbox id="ListStatusLinkCheckbox" class="ListStatusLinkCheckbox v-aline" tabindex="1"}
                              <label for="ListStatusLinkCheckbox">{$language.lblProduct}</label>
                              </span> {/if}</th>
  						
  						<th align="center" valign="middle" width="7%"><label>{$language.lblItemPrice}</label></th>
  						<th align="center" valign="middle" width="7%"><label>{$language.lblSalePrice}</label></th>
                                                  {* <th align="left" valign="middle" width="9%">{$language.lblLowestPrice}</th>*}
  						<th align="center" valign="middle" width="7%"><label>{$language.lblQuantity}</label></th>
  						{if $productStatus eq 'Buybox'}
                <th align="left" valign="middle" width="20%" class="inner_table_grid">
                  <label>{$language.lblOtherSellers}</label>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-bordered inner_table">
                      <tr>
                          <td>{$language.lblSellerName}</td>
                          <td>{$language.lblSellerPrice}</td>
                      </tr>
                  </table>  
                </th>
              {/if}
						</tr>
					</thead>
					<tbody>
                        {assign var="checkboxCounter" value="1"}
						{foreach from=$resProducts item="resProductList" key="key"}
							{assign var="productID" value=$resProductList.productID}
							{assign var="defaultOptionID" value=$resProductList["options"][0]["productOptionID"]|default:''}
                                                        {if $resProductList.enableBuybox|default:'' eq "Yes"}
                                                            {assign var="defaultOption" value=$resProductList["options"][0]["businessOptions"][0]|default:''}
                                                        {else}
                                                            {assign var="defaultOption" value=$resProductList["options"][0]|default:''}
                                                        {/if}
							{if $resProductList.multiOptionsAvailable eq "No"}
								{if $optionIDsString|default:'' != ''}
									{assign var="optionIDsString" value=$optionIDsString|cat:"_"|cat:$defaultOptionID}
								{else}
									{assign var="optionIDsString" value=$defaultOptionID}
								{/if}
							{/if}
							<tr {if $resProductList.productStatus=='Inactive'}class="active inactive-txt"{/if} >
                                
							<td align="left" valign="middle" colspan="2" >
                                <div style="min-width:230px;padding-left: 25px;"> 
                                    {if $settingEditProduct=='Yes'} {*&& $resProductList.enableBuybox|default:'' neq "Yes"*}
                                        <span class="chkd-item" style="position: absolute;left: 15px;top: 30px;">
                                            {form->checkbox class="ListAll v-aline" tabindex="1" id="checkProductIDs_{$checkboxCounter}" name="check_$productID" name="checkProductIDs[]" value=$productID}
                                            <label for="checkProductIDs_{$checkboxCounter}">&nbsp;</label>
                                        </span>
                                    {/if}
							
							{if $resProductList.productImage neq ''}
							<figure><img src="{$view_public_path}/uploads/catalog/product/small/{$resProductList.productImage}" class=" img-responsive" /></figure> {else}
                                                          <figure>  <img src="{$view_images}/{$resProductList.medicineType}.png" alt="{$resProductList.medicineType}" class="pd-img" /></figure>
                                                       
                                                        {/if}
							
							<div class="pdt-details">
                                {html->anchor history="yes" href="/product/show/id/{$resProductList.productID}/" class="normal_link" content="{$resProductList.productTitle|truncate:120}"} <br />
							
							{if $resProductList.productStatus=='Inactive'}<span class="inactive-txt">{$language.{$resProductList.productStatus}}</span>{/if}
							<span class="pd-time">{$resProductList.productCreatedDate|date_format:$date_format} {$resProductList.productCreatedDate|date_format:$time_format}</span>
                                {if isset($defaultOption.optionSKU)}<span class="sku">{$language.lblSKU} : {$defaultOption.optionSKU}
                                                                        {form->hidden name="optionSKU_"|cat:$defaultOptionID value=$defaultOption.optionSKU|default:''}{/if}
                                                                        </span>
                                <span class="edit">
                                    {assign var="href" value="/product/show/id/"|cat:$resProductList.productID|cat:"/"}
							{if $settingEditProduct=='Yes' && $agreeBusiness|default:''=='yes'}
                                                            {if $resProductList.enableBuybox|default:'' eq "Yes"}
                                                                {assign var="editAction" value="buyboxedit"}
                                                            {else}
                                                                {assign var="editAction" value="edit"}
                                                            {/if}
								{html->anchor href="/product/{$editAction}/id/"|cat:$resProductList.productID|cat:"/" title="{$language.lblEdit}" content="<span class='icon-edit-fill'></span> {$language.lblEdit}" class="btn btn-default btn-xs rmv-padding-bottom"}
                               
							{/if}
							
							{if $resProductList.options|@count>1 || $resProductList.combination|default:array()|@count>0}
                               {html->anchor  class="icon-plus2 viewOptions add01" rel=$productID}
                            {/if}
                                </span>
							</div>
							</div>
							</td>
				
                            
							<td align="center" valign="middle">
                                                        {if isset($defaultOption.productOptionRegularPrice)}
							{if $resProductList.multiOptionsAvailable eq "Yes" || $resProductList.combination|default:array()|@count>0}
								<span class="text-box2"> <label>{$defaultOption.productOptionRegularPrice|price:'':$resProductList.productDefaultCurrency:$resProductList.productDefaultCurrency}</label></span>
							{else}
								{form->textbox value=$defaultOption.productOptionRegularPrice 
								name="itemPrice_"|cat:$defaultOptionID 
								class="form-control"
								validate="required~*isPrice"
								disabled=$disabledTxt
								error = $language.errRequired|cat:"~*"|cat:$language.errValidRateShort|cat:"~*"|cat:$language.errRegularProductPrice}	
							{/if}
                                                        {/if}
							</td>
							<td align="center" valign="middle">
                                                        {if isset($defaultOption.productOptionRegularPrice)}
							{if $resProductList.multiOptionsAvailable eq "Yes" || $resProductList.combination|default:array()|@count>0}
								<span class="text-box2">
                                <label>{$defaultOption.productOptionProductPrice|price:'':$resProductList.productDefaultCurrency:$resProductList.productDefaultCurrency}</label></span>
							{else}
								{if $defaultOption.productOptionProductPrice==$defaultOption.productOptionRegularPrice}
									{form->textbox value=''
									name="salePrice_"|cat:$defaultOptionID 
									class="form-control"
									disabled=$disabledTxt
									validate="isPrice~*salePrice_"|cat:$defaultOptionID|cat:"->isnotequal->~*salePrice_"|cat:$defaultOptionID|cat:"->lt->itemPrice_"|cat:$defaultOptionID|cat:""
									error = $language.errValidRateShort|cat:"~*~*"|cat:$language.errProductsalePrice}
								{else}
									{form->textbox value=$defaultOption.productOptionProductPrice 
									name="salePrice_"|cat:$defaultOptionID 
									class="form-control"
									disabled=$disabledTxt
									validate="isPrice~*salePrice_"|cat:$defaultOptionID|cat:"->isnotequal->~*salePrice_"|cat:$defaultOptionID|cat:"->lt->itemPrice_"|cat:$defaultOptionID|cat:""
									error = $language.errValidRateShort|cat:"~*~*"|cat:$language.errProductsalePrice}
								{/if}
							{/if}
                                                        {/if}
							</td>
                                                         {*<td align="left" valign="middle">{$resProductList.price|default:''}  </td>*}  
							<td align="center" valign="middle" nowrap>
							{if $resProductList.multiOptionsAvailable eq "Yes" || $resProductList.combination|default:array()|@count>0}
								{if $resProductList.InventoryTrackLevel=='No'}
									<span class="form-control"> <label>{$language.lblUnlimited}</label></span>
								{else}
									<span class="form-control"> <label>{$resProductList.quantityString}</label></span>
									
								{/if}
							{else}
								{if $resProductList.InventoryTrackLevel=='No'}
									<span class="form-control"><label>{$language.lblUnlimited}</label></span>
								{else if $resProductList.InventoryTrackLevel=='Product'}
									{form->textbox value=$defaultOption.productOptionQuantity disabled=$disabledTxt  
									name="optionQuantity_"|cat:$defaultOptionID  class="editbox text-box2 form-control" validate="isWholeNumberWithZero" error=$language.errValidQunatity}	
								{else}
									<span class="form-control"><label> {$resProductList.quantityString}</label></span>
									
								{/if}
							{/if}
							</td>
							{if $productStatus eq 'Buybox'}
                                <td class="border-center rm-pdH" valign="top">
                                    {foreach $resProductList.otherSeller as $otherSeller}
                                    <div class="clearfix" style="">
                                    <div class="col-xs-6 text-ellipsis">{$otherSeller.businessName}</div>
                                    <div class="col-xs-6">{$otherSeller.productOptionProductPrice|price}<br/></div>
                                    </div> 
                                {/foreach}
                                </td>
                            {/if}
                            
							</tr>
							 {assign var="checkboxCounter" value=$checkboxCounter+1}	
							{if $resProductList.options|@count>1} 
                           
								{foreach from=$resProductList.options item="options" key="key1"}
                                                                    
                                                                {if $resProductList.enableBuybox|default:'' eq "Yes"}
                                                                    {assign var="busOptVal" value=$options['businessOptions'][0]}
                                                                    {assign var="optStatus" value=$busOptVal['busProductStatus']}
                                                                    {assign var="optSKU" value=$busOptVal['businessOptionSKU']}
                                                                    {assign var="optRegPrice" value=$busOptVal['productOptionRegularPrice']}
                                                                    {assign var="optProdPrice" value=$busOptVal['productOptionProductPrice']}
                                                                    {assign var="optProdQty" value=$busOptVal['productOptionQuantity']}
                                                                    {if $busOptVal['productOptionBusinessID']<=0}
                                                                        {continue}
                                                                    {/if}
                                                                {else}
                                                                    {assign var="optStatus" value=$options.productOptionStatus}
                                                                    {assign var="optSKU" value=$options.optionSKU}
                                                                    {assign var="optRegPrice" value=$options.productOptionRegularPrice}
                                                                    {assign var="optProdPrice" value=$options.productOptionProductPrice}
                                                                    {assign var="optProdQty" value=$options.productOptionQuantity}
                                                                {/if}
                                                                
								{assign var="productOptionID" value=$options.productOptionID}
								{if $optionIDsString|default:'' != ''}
									{assign var="optionIDsString" value=$optionIDsString|cat:"_"|cat:$productOptionID}
								{else}
									{assign var="optionIDsString" value=$productOptionID}
								{/if}
									<tr class="details_{$productID} pd-option" style="display:none;">
									<td  align="center" valign="middle" >
                                     
                                     {if $optStatus=='Inactive'}<span class="inactive-txt">{$optStatus}</span>{/if}
									<span class="pd-title"><strong>{$options.productOptionName|truncate:80} </strong></span>
                                   
									</td>
									<td align="center" valign="top">
									{form->textbox value=$optSKU disabled=$disabledTxt 
									validate="required~*callback_checkOptSKUexist" error = $language.errRequired|cat:"~*"|cat:$language.errSkuExists 
									name="optionSKU_"|cat:$productOptionID class="form-control"}	
									</td>
									<td align="center" valign="top">
									{form->textbox value=$optRegPrice 
									name="itemPrice_"|cat:$productOptionID  class="form-control"
									validate="required~*isPrice"
									disabled=$disabledTxt
									error = $language.errRequired|cat:"~*"|cat:$language.errValidRateShort|cat:"~*"|cat:$language.errRegularProductPrice}	
									</td>
									<td align="center" valign="top">
									{if $optProdPrice==$optRegPrice}
										{form->textbox value=''
										name="salePrice_"|cat:$productOptionID  class="form-control"
										disabled=$disabledTxt
										validate="isPrice~*salePrice_"|cat:$productOptionID|cat:"->isnotequal->~*salePrice_"|cat:$productOptionID|cat:"->lt->itemPrice_"|cat:$productOptionID|cat:""
										error = $language.errValidRateShort|cat:"~*~*"|cat:$language.errProductsalePrice}

									{else}
										{form->textbox value=$optProdPrice 
										name="salePrice_"|cat:$productOptionID  class="form-control "
										disabled=$disabledTxt
										validate="isPrice~*salePrice_"|cat:$productOptionID|cat:"->isnotequal->~*salePrice_"|cat:$productOptionID|cat:"->lt->itemPrice_"|cat:$productOptionID|cat:""
										error = $language.errValidRateShort|cat:"~*~*"|cat:$language.errProductsalePrice}
									{/if}
									</td>
									<td align="center" valign="top">
									{if $resProductList.InventoryTrackLevel=='No'}
										{$language.lblUnlimited}
									{else if $resProductList.InventoryTrackLevel=='Product'}
										{form->textbox value=$optProdQty disabled=$disabledTxt 
										name="optionQuantity_"|cat:$productOptionID  class="form-control" validate="isWholeNumberWithZero" error=$language.errValidQunatity}	
									{/if}
									</td>
									
									</tr>
								{/foreach}
							{/if}
			{if $resProductList.combination|default:array()|@count>0}
              {*<tr class="details_{$productID} pd-option" style="display:none;">
                               <td  align="left" valign="middle" class="pd-lf-td" width="1%"></td>
                                <td  align="left" valign="middle" colspan="6"  class="pd-tp-td"></td>
                                <td  align="left" valign="middle" class="pd-lf-td" width="1%"></td>    
                            </tr> *}
								{foreach from=$resProductList.combination|default:array() item="combination" key="key2"}
								{assign var="combinationID" value=$combination.combinationID|default:0}
								{if $combinationIDsString|default:'' != ''}
									{assign var="combinationIDsString" value=$combinationIDsString|cat:"_"|cat:$combinationID}
								{else}
									{assign var="combinationIDsString" value=$combinationID}
								{/if}								
									<tr class="details_{$productID} pd-option" style="display:none;">
                                        {*<td  align="left" valign="middle" class="pd-lf-td" width="1%"></td>*}
									<td  align="center" valign="middle">
                                    
                                   {if $combination.status=='I'}
				   <span class="inactive-txt">									
					{$language.lblInactive}
				    </span>
				   {/if}
					[{$combination.ProductCombo}]
									
									
									</td>
                                    
									<td align="center" valign="top" width="120">
                                        <div style="width:120px;">
                                        {form->textbox value=$combination.combinationSKU|default:'' disabled=$disabledTxt 
                                        validate="required~*callback_checkComSKUexist" error = $language.errRequired|cat:"~*"|cat:$language.errSkuExists name="combinationSKU_"|cat:$combinationID  class="form-control"}	
                                        </div>
									</td>
									<td align="center" valign="top" colspan="2" style="padding:12px 10px !important;">
									{form->textbox value=$combination.combinationPrice|default:'' disabled=$disabledTxt name="combinationPrice_"|cat:$combinationID  class="form-control pull-left"}	
                                    
									{form->select name="combinationPriceDiffType_"|cat:$combinationID  disabled=$disabledTxt class="form-control" value=$combination.combinationPriceDiffType options="N->{$language.lblNone}~*I->{$language.lblIncrease}"}
									</td>
									<td align="center" valign="middle">
									{if $resProductList.InventoryTrackLevel=='No'}
										{$language.lblUnlimited}
									{else if $resProductList.InventoryTrackLevel=='Options'}
										{form->textbox value=$combination.combinationQty|default:'' disabled=$disabledTxt 
										name="combinationQuantity_"|cat:$combinationID  class="form-control" validate="isWholeNumberWithZero" error=$language.errValidQunatity}
									{/if}
									</td>
                                        {*<td align="left" valign="middle">
									</td>
                                    <td  align="left" valign="middle" class="pd-lf-td" width="1%"></td>*}
									</tr>
								{/foreach}
							{/if}
                                        
						{/foreach}
						{form->hidden name="optionIDsString" value=$optionIDsString|default:''}
						{form->hidden name="combinationIDsString" value=$combinationIDsString|default:''}
					</tbody>             
				</table>
            </div>
              </div>
		  
		  <!--end: Product List--> 
          <!--Start: Pagination-->
          <div class="fixing_right pagination_outer"> {paginate->layout  key="page" results_per_page="{$language.lblResultsperpage}" label_record="{$language.lblRecorsFound}" label_pages="{$language.lblPages}"} 

            <!--end: Pagination-->
          </div>
          <!--end: Pagination-->
	  {if $settingEditProduct=='Yes'}
          {assign var="statusoptions" value="->{$language.lblDonotchange}~*Active->{$language.lblActivate}~*Inactive->{$language.lblInactivate}~*Deleted->{$language.lblDelete}"}
          <div class="action_box input-group"> 
              {form->select class="form-control" tabindex="1" name="changeStatus"  options=$statusoptions}

	    <span class="input-group-btn">
		    {if $agreeBusiness|default:''=='yes'}
			    {form->button name="submitProduct" tabindex="1" class="btn btn-primary btn-sm" value="{$language.lblUpdate}"}
		    {else}
			    {form->button tabindex="31" name="DisableSubmit" disabled="disabled"  class="btn btn-primary btn-sm" value="{$language.lblUpdate}"}  
			   
		     {/if}
              </span>
	  </div>
          <div class="clear"></div>{/if}	  
          <div class="clear"></div>
		  {if $settingEditProduct=='Yes' && $agreeBusiness|default:''=='yes'}
		  <div id="item"></div>
		  <!--<div class="cm-buttons-floating"></div>-->
            <div class="cm-buttons buttonsSection text-right pull-right">
            <div class="submit-block"> 
			  {form->submit name="submitProductInline" tabindex="1" class="btn btn-primary btn-sm" value="{$language.lblSave}"}                
			  <span class="or-block">{$language.lblOr}</span>
			  {html->anchor history="yes" href="/product/" class="btn btn-default btn-sm" content=$language.lblCancel}
			  </div>
            </div>
			{/if}
	  
	  
	  
	  
	  
	  
	  
          {form->close} 		  
          {else}
          <div  class="message_info"> {$language.msgNoRecords}</div>
          {/if} </div>
      </div>
      </div>
  </div>
  {include file='CommonFooter.tpl'} </div>
<script  type="text/javascript">
var lblCheckall = "{$language.lblCheckall}";
var lblKeywordItem = "{$language.lblEnterKeywords}";
var lblUncheckall = "{$language.lblUncheckall}";
var lblSelectBusiness = "{$language.lblSelectBusiness}";
var lblSelectCitys = "{$language.lblSelectCitys}";
var lblselected 	= "{$language.lblselected}";
var msgConfirmDeletepdt 	= "{$language.msgConfirmDeletepdt}";
var lblSelectCategory="{$language.lblSelectCategory}";
var lblBasicSearch="{$language.lblBasicSearch}";
var lblAdvanceSearch="{$language.lblAdvanceSearch}";
var lblFrom="{$language.lblFrom}";
var lblTo="{$language.lblTo}";
var lblCancel="{$language.lblCancel}";
var applyLabel="{$language.applyLabel}";
var customRangeLabel="{$language.customRangeLabel}";
var lblFilter="{$language.lblFilter}";
var searchProductDateValue = "{$searchProductDate}";
if(searchProductDateValue=='') {
    defaultDateNeeded ="No"; 
}
</script> 
<script type="text/javascript" src="{$view_javascript}/jquery.multiselect.widget.js"></script> 
<script type="text/javascript" src="{$view_javascript}/productList.page.js"></script> 
<script type="text/javascript" src="{$view_javascript}/jquery.colorbox.js"></script> 
<script type="text/javascript" src="{$common_js}/validate.plugin.js"></script>
<script type="text/javascript" src="{$view_javascript}/table.plugin.js"></script> 
<script>

 $(function() {
 
    function cb(start, end) {
           
        $('#searchProductDate').html(start.format(datePickerDateFormatJs) + ' - ' + end.format(datePickerDateFormatJs));
    }
    cb(moment().subtract(29, 'days'), moment());

    $('#searchProductDate').daterangepicker({
            
        locale: {
            format: datePickerDateFormatJs
          },
        ranges: {
            
          ' {$language.lblToday}': [moment(), moment()],
          '{$language.lblYesterday}': [moment().subtract(1,'days'), moment().subtract(1,'days')], 
          '{$language.lblLast7Days}': [moment().subtract(6,'days'), moment()],
           '{$language.lblLast30Days}': [moment().subtract(29,'days'), moment()],
          '{$language.lblThisMonth}' : [moment().startOf('month'), moment().endOf('month')],
           '{$language.lblLastMonth}': [moment().subtract(1,'month').startOf('month'), moment().subtract(1,'month').endOf('month')]

                      
           
        }
    }, cb);

});
    
    
</script>
    
    
{if $validated|default:'' == 'No'}
	<script type="text/javascript">
		$(document).ready(function(){
			$( ".viewOptions" ).trigger( "click" );
			 $("#searchProductCategory").multiselectCustom({
        noneSelectedText: lblSelectCategory,
        selected: 'categories'
    });
            
            $('#searchProductCategory').select2({
              debug: true,
              placeholder: 'Select Category'
            });
            
        });
	</script> 
{/if}
<!--//*********sales rep***********//--> 
<script type="text/javascript" src="{$view_javascript}/moment.min.js"></script>
<script type="text/javascript" src="{$view_javascript}/daterangepicker.js"></script>
<script language="javascript" type="text/javascript">
$(".salesRep").chosen()
$(".sortby-list").click(function(){ 
 if($(this).siblings(".sort_links_ul").is(':visible'))
 {
 $(this).removeClass("active");
 $(".sort_links_ul").hide();
 }
 else{
 $(this).siblings(".sort_links_ul").slideDown("fast");
 $(this).addClass("active"); 
 } 
$('body').click(function (e) {       
  if ($(".sort_links ").has(e.target).length === 0) {
     $(".sort_links_ul").hide();
	 $(".sortby-list").removeClass("active");
        }
    });
 
});
var msgSelectItem ="{$language.msgSelectItem}";
var lblSelectAction ="{$language.lblSelectAction}";
var msgConfirmDelete ="{$language.msgConfirmDelete}";
</script> 
<!--<script>
$(window).scroll(function(){
 var itemScl = $("#item").offset().top-$(window).innerHeight();
    
 if(itemScl>$(window).scrollTop()){
  $(".cm-buttons").addClass("cm-buttons-floating");
  $(".cm-buttons").removeClass("buttonsSection"); 
 } else {
  $(".cm-buttons").removeClass("cm-buttons-floating");
  $(".cm-buttons").addClass("buttonsSection");

 }
});
</script>-->
<!--//*********sales rep end***********//--> 
{form->validate_script form	= "formProduct"}
{html->messages_script id="common_message"}
</body>
</html>