<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{$language.lblBusiness} : {$language.lblImportdata}</title>
{include file='CommonStyles.tpl'}
{include file='CommonJavaScript.tpl'}
{include file='CommonCustomStyles.tpl'}
<link rel="stylesheet" type="text/css" href="{$view_styles}/adding-page.css" media="screen" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/right-menu.css" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/ui.daterangepicker.css" />
<link href="{$view_styles}/jquery-ui-1.8.19.custom.css" rel="stylesheet" type="text/css" />
</head><body class="{$languageDirection}">
<div id="main" class="outer">
  {include file='CommonHeader.tpl'}
  <!--End:Header Container-->
  <!--***********************************************************************START CONTAINER SECTION******************************************************-->
    <div class="content-wrapper">
  <div class="container-fluid clearfix">

    <div class="clearfix">
      <div class="pull-right right">
        {include file='ContentLanguageOptions.tpl'}
      </div>
    </div>

    <div class="right-sidebar">
    <div class="side_wrapper">      
      </div>
    </div>
    <!--End: Right Block-->
    <div class="left_wrapper">
      <div class="content_wrapper">
          <div class="clearfix">
        <h2 class="pull-left">{$language.lblImportdata}</h2> 
        <div class="tab02 order-tab pull-right margin-bottom">{if $itab|default:''}
  	      {assign var="Ptab" value=''}
  	      {assign var="Itab" value='active'}
  	      {assign var="Ctab" value=''}	     
  	      {elseif $ctab|default:''}
  	      {assign var="Ptab" value=''}
  	      {assign var="Itab" value=''}
  	      {assign var="Ctab" value='active'}	      
  	      {else}
  	      {assign var="Ptab" value='active'}
  	      {assign var="Itab" value=''}
  	      {assign var="Ctab" value=''}	     
  	      {/if}
	      
      	  <ul>   
            <li><a href="javascript:void(0);" class="{$Ptab} tab-anchor" >{$language.lblProducts}</a></li>
            <li><a href="javascript:void(0);" class="{$Ctab} tab-anchor" >{$language.lblProductCombos}</a></li>
            <li><a href="javascript:void(0);" class="{$Itab} tab-anchor" >{$language.lblImages}</a></li>
          </ul>
      <!--
         {html->anchor name="cancel" content="<strong>Product Combinations</strong>" class="tab-anchor" href="product/export/pattern/Combinations"} {html->anchor name="cancel" content="<strong>Images</strong>" class="tab-anchor" href="product/export/pattern/Product_images"}-->
        </div>
        </div>
        <!-- Inner Content Container starts-->
      	<div class="inner_content_wrapper margin-top">
	
          <div id="common_message" ></div>
	   {if $show_log|default:''==1}
	 <div class="search_container">		<div class="inner imp-result">{if $error_log|default:''==1}  {html->anchor href="product/downloadLog/" class="file-display linkbtnt01 fixing_right" caption=$language.lblDownLoadErrorLog title=$language.lblErrorLog}{/if} 
		<span style="background-color:#D6EEF7;font-style: italic;">{$pattern}</span> - <p> {$language.lblTotalObjectsInCsv}:<strong> {$count_log['total']}</strong></p> <span class="space">::::</span>
		<p> {$language.lblNewObjects}:<strong>{$count_log['new']}</strong></p> <span class="space">::::</span>
		 <p>  {$language.lblUpdatedObjects}:<strong>{$count_log['exist']}</strong></p> <span class="space">::::</span>
		  <p>{$language.lblSkippedObjects}: <strong class="skip">{$count_log['skipped']}</strong> </p>  
		</div>			
		</div>{/if}	
          <div class="tab-content container-section margin-top" {if ($ptab|default:'') || ($itab|default:''=="" && $ctab|default:''=="")} style="display:block" {else} style="display:none" {/if}>
	  
          <div class="form_listing form_listing03">
          {form->start name="productImport" method="post" action="" enctype="multipart/form-data"}
                        
              <div class="form-group clearfix">
                <div class=" col-md-offset-3 col-sm-offset-5 col-md-7 col-sm-7">
                  <p>
                    {$language.lblcsvmsg}</p>
                        <div class="lis-ex-field">
                         <strong>{$language.lblProducts}</strong>
                  <ul class="clearfix">
                      {foreach from=$pdtexportArray key="k" item="ioptionTitle"}
                  <li class="col-md-4 col-sm-6 col-xs-12 margin-bottom">	      
                  {if in_array($ioptionTitle,$pdtReq)}	      
                  {if $ioptionTitle=='Variant Title'} <strong>{$ioptionTitle}</strong></br><span class="cntnt">(leave it blank if same as product Title)</span>{else if}<strong>{$ioptionTitle}</strong>{/if}
                  {else}
                  {$ioptionTitle}
                  {/if}
                  </li>
                  {/foreach}
                  </ul>
                </div>
                </div>
	      </div>
            <div class="form-group clearfix">
            <h3 class="border-bottom">{$language.lblImportOptions}</h3>
              </div>
              {form->hidden name="import_options[businessID]" value=$businessID}
              
              <div class="form-group clearfix">
                <label class=" control-label col-md-3 col-sm-5">{$language.lblMenuLanguages}</label>             
                <div class=" col-md-6 col-sm-7">
                  {form->select style="width:37.5%" name="import_options[languageID]" id="languageID" class="form-control"  options="{$view_common_languages}"}
                 </div>              
              </div>
              
	      <div class="form-group clearfix">
                <label class=" control-label col-md-3 col-sm-5">{$language.lblImagesdirectory}</label>
                <!--End:Left-->
		<div class=" col-md-6 col-sm-7">
		{form->textbox id="images_path" name="import_options[images_path]"  class="form-control" value="public/uploads/exim/product-images" validate="required" error=$language.errImagePath}
		{form->hidden  name="pattern_id" value="products"}
		<span class="sub-text">{$language.lblImagesdirectorymsg}</span>
				</div>
                <!--End:right-->
              </div>
	      
	       <div class="form-group clearfix">
        
	        <!--End:right-->
			 <label class="control-label col-md-3 col-sm-5">{$language.lblSelectFile}</label>
                <!--End:Left-->
				<div class="col-md-6 col-sm-7">
	{form->upload_custom class="upload_custom" title="{$language.lblChooseFile}" name="file_csv_file[0]" id="file_90a539823307f6170ff1748114040785" validate="isValidFileExtension"  error="{$language.lblInvalidFile}"  filetext="{$language.lblChooseFile}" filenotext="{$language.lblNoFileChosen}"}
        <input id="type_90a539823307f6170ff1748114040785" type="hidden" value="" name="type_csv_file[0]">  
	    {form->hidden  name="import_options[lang_code]" value="1"}   
			</div>
               <!--End:right-->
              </div>
	      <div class="form-group clearfix">
                <div class="col-md-3 col-sm-5 hiden-xs">&nbsp;</div>
                <div class=" col-md-6 col-sm-7">{form->submit name="submit_import" value=$language.lblImport class="btn btn-primary"} 
                </div>
          </div>
            <!--End:right-->
                </div>
		{form->close}
           </div>  
	    <div class="tab-content  container-section margin-top" {if $ctab|default:''} style="display:block" {else} style="display:none" {/if}> 
      <div class="content_wrapper">      
        <!-- Inner Content Container starts-->
      	<div class="inner_content_wrapper full_width">
          <div id="common_message" ></div>
          <div class="form_listing form_listing03">
          {form->start name="ComboImport" method="post" action=""  enctype="multipart/form-data"}
           
              {form->hidden  name="pattern_id" value="product_combinations"}
              <div class="form-group clearfix">
	      <div class=" col-md-offset-3 col-sm-offset-5 col-md-7 col-sm-7"><p>{$language.lblcsvmsg}.</p>
              <div class="lis-ex-field"> <strong>{$language.lblProductCombos}</strong>
	    <ul class="clearfix">
                {foreach from=$comboexportArray key="k" item="i"} <li class="col-md-4 col-sm-6 margin-bottom">
		 {if in_array($i,$comboReq)}	      
	      <strong><em>{$i}</em></strong>
	      {else}
	     {$i}
	      {/if}	
		</li>{/foreach}
                </ul></div>
                </div>
                <!--End:right-->
              </div>
              <div class="form-group clearfix"> <div class=" col-md-offset-3 col-sm-offset-5 col-md-7 col-sm-7 "><strong>
{*                          N.B :- Plz make sure that custom options used in Csv are existed for corresponding products.*}
                          {$language.lblImportOptionsInstuction}
                      </strong></div></div>
	         <div class="form-group clearfix">
            <h3 class="border-bottom">{$language.lblImportOptions}</h3>
            </div>		  
	     <div class="form-group clearfix">
                <label class=" control-label col-md-3 col-sm-5">{$language.lblSelectFile}</label>
                <!--End:Left-->
				
			  
			  
                <!--End:Left-->
				<div class=" col-md-6 col-sm-7">
	{form->upload_custom class="upload_custom" name="file_csv_file[0]" validate="isValidFileExtension" filetext=$language.lblChooseFile
filenotext=$language.lblNoFileChosen error=$language.lblInvalidFile id="file_90a539823307f6170ff1748114040785"}
        <input id="type_90a539823307f6170ff1748114040785" type="hidden" value="" name="type_csv_file[0]">  
	    {form->hidden  name="import_options[lang_code]" value="1"}   
			  </div>
             <!--End:right-->
                </div>
              <div class="form-group clearfix">
             
                
                    <div class=" col-md-3 col-sm-5 hiden-xs">&nbsp;</div>
                	<div class=" col-md-6 col-sm-7">{form->submit name="submit_import" value=$language.lblImport class="btn btn-primary curve-3"}
                    </div>
              
                <!--End:right-->
              </div>
	      
            {form->close}
           </div>  
         </div>
	  </div>
	  
          <!--End:From Listing-->
	    </div>
     
      <!--End:Border 2-->
   
     <div class="tab-content container-section margin-top" {if $itab|default:''} style="display:block" {else} style="display:none" {/if}>
      
      <div class="inner_content_wrapper full_width">  
          <div id="common_message" ></div>
          <div class="form_listing form_listing03">
          {form->start name="imageImport" method="post" action=""  enctype="multipart/form-data"} 
	 
            <ul>              
            
              <div class="form-group clearfix">
		<div class=" col-md-offset-3 col-sm-offset-5 col-md-7 col-sm-7"><p>{$language.lblcsvmsg}.</p>
                <div class="lis-ex-field">
		  <strong>{$language.lblProductImages}</strong>
	<ul class="clearfix">
                	{foreach from=$imagexportArray key="k" item="i"}
			<li class="col-md-4 col-sm-6 margin-bottom">{if in_array($i,$imgReq)}	      
	      <strong><em>{$i}</em></strong>
	      {else}
	     {$i}
	      {/if}</li>
			
			{/foreach}
                </ul>
					
		</div>
                </div>
              </div>
		 <div class="form-group clearfix">
            <h3 class="border-bottom">{$language.lblImportOptions}</h3>
            </div>		 
             <div class="form-group clearfix">
                <label class=" control-label col-md-3 col-sm-5">{$language.lblImagesdirectory}</label>
                <!--End:Left-->
				<div class=" col-md-6 col-sm-7">
		{form->textbox id="imageDir" name="import_options[images_path]"  class="text-box form-control"  value="public/uploads/exim/product-images" validate="required" error=$language.errImagePath}
		{form->hidden  name="pattern_id" value="product_images"}<br/>
		<span class="sub-text">{$language.lblImagesdirectorymsg}</span>
				</div>
                <!--End:right-->
              </div>{form->hidden  name="pattern_id" value="product_images"}	      
	        <div class="form-group clearfix">
				 <label class=" control-label col-md-3 col-sm-5">{$language.lblSelectFile}</label>
                <!--End:Left-->
				<div class=" col-md-6 col-sm-7">
		  {form->upload_custom class="upload_custom" name="file_csv_file[0]" validate="isValidFileExtension" error=$language.lblInvalidFile}</div>
                <!--End:right-->
				
              </div>
              <div class="form-group clearfix">
            
                    <div class=" col-md-3 col-sm-5">&nbsp;</div>
                	<div class="  col-md-6 col-sm-7">{form->submit name="submit_import" value=$language.lblImport class="curve-3 btn btn-primary"}                     
                </div>
              
                <!--End:right-->
              </div>
            </ul>{form->close}
           </div>  
          <!--End:From Listing-->
          </div>
      </div>
      <!--End:Border 2-->
    </div>
   
      
      
     </div>
    </div>
    <!--End: left Block-->

       </div>     
      </div>    
  <!--***********************************************************************END CONTAINER SECTION******************************************************-->
  <!--End:Content Container-->
  {include file='CommonBottom.tpl'}
</div>
<!--End:Outer Container-->
<script type="text/javascript" src="{$common_js}/uploadImage.plugin.js"></script> 
<script type="text/javascript">
{literal}
$(function(){
	$('.selectall').click(function () {	 
	   $('.export').prop('checked','checked');
      });
	$('.uncheckall').click(function () {
	   $('.export').prop('checked',false);
      });
	 $('.side_wrapper ul li a[rel=subscribe-export]').addClass('selected'); 
	  setSideMenu();
	 });
{/literal}
$(".tab-anchor").click(function () {
	$(".tab-anchor").removeClass("active");
	$(this).addClass("active");
  var index = $(".tab-anchor").index(this);
  $(".tab-content").hide();
  $(".tab-content:eq("+index+")").fadeIn();
});
</script>
{include file='CommonJavaScriptBottom.tpl'} 
{html->messages_script id="common_message"}
<script type="text/javascript" src="{$common_js}/validate.plugin.js"></script> 
{form->validate_script form="productImport"}
{form->validate_script form="imageImport"}
{form->validate_script form="ComboImport"}
</body>
</html>
