// Updated CSV Import
This commit is contained in:
@@ -82,7 +82,7 @@
|
|||||||
* Upload fancybox
|
* Upload fancybox
|
||||||
*}
|
*}
|
||||||
<div style="display: none">
|
<div style="display: none">
|
||||||
<div id="upload_file_import" style="background-color: #EBEDF4; border: 1px solid #CCCED7">
|
<div id="upload_file_import" style="padding-left: 10px; background-color: #EBEDF4; border: 1px solid #CCCED7">
|
||||||
<div class="clear"> </div>
|
<div class="clear"> </div>
|
||||||
<form action="{$current}&token={$token}" method="POST" enctype="multipart/form-data">
|
<form action="{$current}&token={$token}" method="POST" enctype="multipart/form-data">
|
||||||
<label class="clear" style="width:160px; text-align: left;">{l s='Select your CSV file:'} </label>
|
<label class="clear" style="width:160px; text-align: left;">{l s='Select your CSV file:'} </label>
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ class AdminImportControllerCore extends AdminController
|
|||||||
$this->l('Addresses'),
|
$this->l('Addresses'),
|
||||||
$this->l('Manufacturers'),
|
$this->l('Manufacturers'),
|
||||||
$this->l('Suppliers'),
|
$this->l('Suppliers'),
|
||||||
$this->l('Supply Orders'),
|
$this->l('SupplyOrders'),
|
||||||
));
|
));
|
||||||
|
|
||||||
switch ((int)Tools::getValue('entity'))
|
switch ((int)Tools::getValue('entity'))
|
||||||
@@ -340,7 +340,7 @@ class AdminImportControllerCore extends AdminController
|
|||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
// @since 1.5.0
|
// @since 1.5.0
|
||||||
case $this->entities[$this->l('Supply Orders')]:
|
case $this->entities[$this->l('SupplyOrders')]:
|
||||||
// required fields
|
// required fields
|
||||||
$this->required_fields = array(
|
$this->required_fields = array(
|
||||||
'id_supplier',
|
'id_supplier',
|
||||||
@@ -1677,8 +1677,15 @@ class AdminImportControllerCore extends AdminController
|
|||||||
*/
|
*/
|
||||||
public function supplyOrdersImport()
|
public function supplyOrdersImport()
|
||||||
{
|
{
|
||||||
|
$this->receiveTab();
|
||||||
$handle = $this->openCsvFile();
|
$handle = $this->openCsvFile();
|
||||||
//@TODO
|
self::setLocale();
|
||||||
|
|
||||||
|
for ($current_line = 0; $line = fgetcsv($handle, MAX_LINE_SIZE, Tools::getValue('separator')); $current_line++)
|
||||||
|
{
|
||||||
|
//@TODO
|
||||||
|
}
|
||||||
|
|
||||||
$this->closeCsvFile($handle);
|
$this->closeCsvFile($handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1867,8 +1874,9 @@ class AdminImportControllerCore extends AdminController
|
|||||||
case $this->entities[$this->l('Suppliers')]:
|
case $this->entities[$this->l('Suppliers')]:
|
||||||
$this->supplierImport();
|
$this->supplierImport();
|
||||||
break;
|
break;
|
||||||
case $this->entities[$this->l('Supply Orders')]:
|
case $this->entities[$this->l('SupplyOrders')]:
|
||||||
$this->supplyOrdersImport();
|
$this->supplyOrdersImport();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
$this->_errors[] = $this->l('no entity selected');
|
$this->_errors[] = $this->l('no entity selected');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user