Location: PHPKode > projects > MembersGear > membersgear/templates/admin_import_products.tpl
 {$ADMIN_HEADER}
<div id="content" class="setdiv">
      {if $msg neq ''}
            <div {if $err eq 'true'} class="errormsg" {else} class="succmsg" {/if} style="width:300px">{$msg}</div>
           {/if} 
    <div id="full-contentdiv">
       <div class="righttop">
                <h2><center>
                    Import products</h2>                                      
            </center></div>
         
         <div class="whole-page clear">
          
            <!-- Place your content here -->
             <form name="product_import" method="post" action="admin_product_m.php?action=import_posted_product">
              <div class="formformat">      
                 <table    width="60%"  cellpadding="0" cellspacing="0" align="center">    
                  <tbody>
                         {section name=product loop=$main_products}    
                           <tr>
                           <td style="text-align:right;" ><input type="checkbox" name="chkBoxProducts[]" value="{$main_products[product].ID}"> </td> 
                          <td class="left-side-text" >
                            {$main_products[product].Name}
                          </td>
                          </tr>
                         {sectionelse}
                         {assign var='produts_available' value='true'}
                          <tr>
                            <td style="text-align:right;" ></td> 
                           <td class="" width="80%">
                            <b>No additional products Found from PayGear</b>
                          </td>
                          </tr>
                          </tr> 
                         {/section}
                       <tr>
                        <td class="right-side-text" style="width:200px"></td>
                         <td class="" width="">
                             {if $produts_available neq 'true'}
                              <input class="btncss" type="submit" id="submit"   name="submit" value="Import products" >
                              <input  class="btncss" type="button" name="btnBack" value="Cancel" onclick="javascript:location.href='./index.php';"> 
                             {else}
                               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input  class="btncss" type="button" name="btnBack" value="Click here to go to mange product" onclick="javascript:location.href='./admin_product_v.php';"> 
                            {/if}   
                        </td>
                      </tr>
                </tbody>
           </table>
           <br/>
            <center>
                 <div class="comment-div" style="margin: 0px 0px 5px 5px ! important; width: 805px ! important;">
                            <table class="formformat_comment">
                                  <tr>
                                     <td><strong><font color="red"> Note: </font></strong></td>
                                     <td>
                                      By default all imported product will not be linked with PayGear and their product URL will not be set.
                                      Admin will have to manually edit these fields after import. Example:
                                     </td>
                                  </tr>
                                  <tr> 
                                      <td>
                                       &nbsp;
                                      </td>
                                        <td>
                                       1.    "Is linked with PayGear.com"=>"Yes"<br/> 
                                       2.    "Product Url"=> /your-folder/your-product.html

                                      </td>
                                  </tr>
                                </table>
                                
                          </div>       
                           
           </center>      

           </div>
        </form>
    </div>
    
</div>
 {literal} 
   <script language="JavaScript" type="text/javascript">
   
   function DoCustomValidation()
   {
    
      
       var chks = document.getElementsByName('chkBoxProducts[]');
       var hasChecked = false;
       for (var i = 0; i < chks.length; i++)
        {
            
            if (chks[i].checked)
            {

                hasChecked = true;
                return true;  
                break;
                
            }
          
        }
        if (hasChecked==false)

        {

                alert("Please select at least one product.");
                chks[0].focus();
                return false;

        }
   }
       var frmvalidator  = new Validator("product_import");
       frmvalidator.EnableMsgsTogether();
       frmvalidator.setAddnlValidationFunction("DoCustomValidation"); 
</script>
{/literal}
 </div>
{$ADMIN_FOOTER}
Return current item: MembersGear