} else { $db->begin(); $product = new Product($db); $originalId = $id; if ($product->fetch($id) > 0) { $product->ref = GETPOST('clone_ref'); $product->status = 0; $product->status_buy = 0; $product->finished = 1; $product->id = null; if ($product->check()) { $id = $product->create($user); if ($id > 0) { // $product->clone_fournisseurs($originalId, $id); $db->commit(); $db->close(); Header("Location: fiche.php?id=$id"); exit; } else { if ($product->error == 'ErrorProductAlreadyExists')