0){ $reference = $data[0]; // A $asin = $data[1]; // A $id_product = existsRefInDatabase($reference); if($id_product){ $options = array( 'force' => 0, 'nopexport' => 0, 'noqexport' => 0, 'fba' => 0, 'fba_value' => 0, 'latency' => 0, 'disable' => 0, 'price' => 0, 'asin1' => $asin, 'asin2' => "", 'asin3' => "", 'text' => "", 'bullet_point1' =>"", 'bullet_point2' => "", 'bullet_point3' => "", 'bullet_point4' => "", 'bullet_point5' => "", 'shipping' => null, 'shipping_type' => 1 ); Amazon_Product::setProductOptions($id_product, 1, $options); } } $row++; echo $row."
"; ob_end_flush(); flush(); ob_start(); } fclose($handle); echo "Import terminé"; }else{ echo "prob ouverture"; } function utf8EncodeArray($array){ return (is_array($array) ? array_map('utf8_encode', $array) : utf8_encode($array)); } function existsRefInDatabase($reference){ $row = Db::getInstance()->getRow(' SELECT `id_product` FROM `'._DB_PREFIX_.'product` p WHERE p.reference = "'.$reference.'"'); return $row['id_product']; }