<div class="pane01 product-related">
 {form->start name="formProductSearch" action="" method="post" rel="related-save"}
    <div class="save-floating-section" id="related-save-section">
          <div class="cm-buttons-floating related-save-fix">
           <div class="submit-position"> 
            {form->button class="btn btn-primary btn-sm" id="productrelatedProductSubmit" value="{$language.lblSave}"}
	    </div>
          </div>
        <div class="cm-buttons"></div>
	</div>
    <div class="row">
        <div class="col-md-6 margin-bottom">
            <div class="related-section clearfix">
                <div class="related-top clearfix">
             <div class="category-list01 form-group col-md-6 col-sm-12 rmv-padding pos-rel">
                            {html->anchor id="categoryLabel"  class="select-box-static" caption="<span id='selectedText'>{$language.lblSelectCategory}</span>"} 
                    <div class="div-city cate-dropdown " id="categoryVisible" style="display:none">
                       
	   {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"}                      
				  <div id="selProductCategory">
                      <div class="fixed-section">
                      {assign var="categoryValue" value=""}
				{form->textbox name="filterCategories" class="filterBrands form-control" placeholder="Search Categories"}
                          </div>
				{assign var="categoryValue" value=""}
			        <ul  class="dragtree categoryList main-listing" id="categoryList">
                        {*<!--menu function-->*}
                 {function name=categories1 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}"></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=$productCategory.productCategoryID|cat:"->"|cat:"&nbsp;"|cat:$categoryName} 
									{else}
									 {assign var="categoryValue" value=$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=categories1 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 categories1 data=$resProductCategories} {*<!--menu function calling-->*}
             	 </ul>  
</div>
				 {form->validate name="categorySelected" validate="hiddenbuyboxStatus->isnotequal->Yes~*required" error=$language.errSelectAnyCategory}
                      </div>
                      </div>
            <div class="textfield col-md-6 col-sm-12 form-group">
                        
   {form->textbox   name="searchKeyword" value="{$language.lblProductIDTitle}"
   class="form-control" onfocus="if(this.value=='{$language.lblProductIDTitle}') this.value='';" onblur="if(this.value=='')  	this.value='{$language.lblProductIDTitle}';"}  
                        
                      </div>
            <div class="col-sm-12 col-md-6 rmv-padding">
                {form->button name="submitProductSearch" id="submitProductSearch" class="btn btn-primary btn-sm" value="{$language.lblSearch}"}
                    {html->anchor class="action-link" onclick="ResetProducts()" href="" content="{$language.lblListAll}"} 
            </div>
                    </div>
        
                <div class="leftblock03 drop-div border-top" id="divExceptAll" >
	   {include file='RelatedProductsLeft.tpl'}
        
        </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="related-section clearfix">
                
                {if $resRightListUpcomingProducts|@Count eq 0}              
                 {assign var="outerborder" value='outer-border'}
                 {assign var="toplabelhide" value='hide'}               
              {/if} 
                <div class="related-head">
                <h3>{$language.lblRelatedProducts}</h3>
                    </div>
                <div class="drop-div rightblock03" id="divRightAll" >
                 
             	 <ul id="product_drop_right_id" class='connect product_drop_right {$outerborder}'>
                    
            {if $resRightListUpcomingProducts|@Count > 0}
          	{foreach from=$resRightListUpcomingProducts item="resRightListUpcomingProduct" key="key"}
                	<li id="{$resRightListUpcomingProduct.productID}" class="sort{$resRightListUpcomingProduct.productID}">
                    {html->anchor href="" class="icon-close-narrow product_drop_delete"}
                   
                    <div class="title">{$resRightListUpcomingProduct.productTitle|truncate:60}</div>
                  
                    </li>
		   {assign var="sorthide" value='hide'}
                  {/foreach}
                     {else}
                     <span class=" sort-label {$toplabelhide}">{$language.lbldragnDropProducts}</span>
		 {/if}
	  <span class="sort-label {$sorthide}">{$language.lbldragnDropProducts}</span>
                </ul>
               </div>
            </div>
        </div>
    </div>
    {form->close}
          {form->hidden  name="searchItems"} 
        </div>       

<div class="clearfix"></div>
<script type="text/javascript">
var lblProductIDTitle='{$language.lblProductIDTitle}';
</script>
