This commit is contained in:
Michael RICOIS 2018-03-08 11:44:37 +01:00
parent c658d0ec75
commit c86f90f0eb

View File

@ -537,7 +537,10 @@ class AdminBulkUpdate extends AdminTab {
} }
$output .= '<p class="conf">'.$this->l('Products updated').'</p>'; $output .= '<p class="conf">'.$this->l('Products updated').'</p>';
} elseif(Tools::isSubmit('submitUploadPrices')) { }
// MAJ Rapide produits (Reduction, Prix d'achat HT, Prix d'achat TTC)
elseif(Tools::isSubmit('submitUploadPrices'))
{
$f = fopen($_FILES['csvfile']['tmp_name'], 'r'); $f = fopen($_FILES['csvfile']['tmp_name'], 'r');
fgetcsv($f, 0, ';'); fgetcsv($f, 0, ';');
@ -552,8 +555,7 @@ class AdminBulkUpdate extends AdminTab {
$products[] = (int) $line[0]; $products[] = (int) $line[0];
} }
} elseif(Tools::getValue('price_process') == 3 } elseif(Tools::getValue('price_process') == 3 || Tools::getValue('price_process') == 4) {
|| Tools::getValue('price_process') == 4){
while($line = fgetcsv($f, 0, ';')) { while($line = fgetcsv($f, 0, ';')) {
if(empty($line[0])) { if(empty($line[0])) {
continue; continue;
@ -585,8 +587,7 @@ class AdminBulkUpdate extends AdminTab {
fclose($f); fclose($f);
if(Tools::getValue('price_process') == 1 if (Tools::getValue('price_process') == 1 || Tools::getValue('price_process') == 2) {
|| Tools::getValue('price_process') == 2) {
Db::getInstance()->ExecuteS(' Db::getInstance()->ExecuteS('
DELETE FROM `'._DB_PREFIX_.'specific_price` DELETE FROM `'._DB_PREFIX_.'specific_price`
WHERE `id_product` IN ('.implode(', ', $products).') WHERE `id_product` IN ('.implode(', ', $products).')