You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
::use 'design.mtt'::
<div class="span12"> <div class="article"> <h2>::_("Import products")::</h2> ::if step==1:: <form action="/product/import/::contract.id::" method="POST" enctype="multipart/form-data"> <p> <input name="file" type="file"/> </p> <p> <input type="submit" class="btn btn-primary" value="::_("Import")::"/> </p> </form> ::elseif step==2:: <h4>Produits à importer</h4> <div style="margin-bottom:24px;"> ::if !csv.isEmpty():: <table class="table table-bordered" style="/*font-size:11px;*/background-color:#FFF;"> <tr> ::foreach h csv.getHeaders():: <th>::_(h)::</th> ::end:: </tr> ::foreach d csv.getDatas():: <tr> ::foreach r d:: <td> ::if r!=null:: ::r:: ::end:: </td> ::end:: </tr> ::end:: </table> <div class="alert alert-error"> <b>::_("Warning")::</b> <p> ::raw _("Before validating the import, please check if the table above is correctly filled.<br/>If data are not in line or not corresponding to the right column, it means that your CSV file is not correct."):: </p> <a href="/product/import/::contract.id::">Recommencer</a> </div> <a href="/product/import/::contract.id::?confirm=1" class="btn btn-danger">::_("Import these products in the database")::</a> ::else:: <div class="alert alert-error"> <b>::_("Ouch!")::</b> <p>::_("It seems that there is no data to import.")::</p> <a href="/product/import/::contract.id::">Recommencer</a> </div> ::end:: </div> <!--<div ::cond data2.length > 0:: > <h4>::_("Products already available in the database")::</h4> <table class="table" style="font-size:11px;color:#666666;background-color:#FFF;"> <tr> <th>::_("Name")::</th> <th>::_("Price")::</th> </tr> ::foreach d data2:: <tr> ::foreach r d:: <td> ::if r!=null:: ::r:: ::end:: </td> ::end:: </tr> ::end:: </table> </div>--> ::elseif step==3:: ::if numImported>0:: <div class="alert alert-success"> <b>::__("Congratulations! You have imported ::num:: products in your database", {num:numImported})::</b> </div> ::else:: <p>::_("You did not import anything in your database because your file was empty or contained products already present in the database.")::</p> ::end:: <a href="/contractAdmin/products/::contract.id::">::_("Back to the management of products")::</a> ::end:: </div>
<div class="block"> <h3>::_("Help")::</h3> ::_("This page will allow you to import a large number of products in your database from an Excel file."):: <br/> <ul> <li>::raw _("To start, <a href=\"/produits.xls\">Download this demo file</a>")::</li> <li>::raw _("Fill correctly this file, or modify your existing file to respect strictly the order of columns")::</li> <li>::raw _("When your file is ready, click on\"Save as\" in your Excel sheet and choose the format CSV")::</li> <li>::raw _("Choose the following options: separation characters: <b>comma</b>, encoding: <b>Unicode UTF8<b/>"):: </li> <li>::raw _("Save your file")::</li> <li>::raw _("Then click on the button above \"Choose a file\" and send your file"):: </li> </ul> </div> </div> ::end::
|