Actualiser test.html
CI / PHP Syntax Check (push) Has been cancelled
CI / JavaScript Lint (push) Has been cancelled
CI / Docker Build Test (push) Has been cancelled
CI / Validate Translation Files (push) Has been cancelled
CI / Auto-merge develop → main (push) Has been cancelled
CI / Create GitHub Release (push) Has been cancelled

This commit is contained in:
2026-06-17 19:22:09 +00:00
parent 99c35e4c18
commit fc324d55f5
+16
View File
@@ -68,6 +68,22 @@
category: document.getElementById('category-selector').value category: document.getElementById('category-selector').value
}; };
console.log("Données envoyées :", data); // Vérifie ceci dans ta console F12
fetch('api/index.php?action=product_save', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify(data)
})
.then(r => r.json())
.then(res => {
// Affiche tout l'objet de réponse pour voir le message d'erreur précis
console.log("RÉPONSE COMPLÈTE DE L'API :", res);
alert("Réponse reçue (voir console F12) : " + JSON.stringify(res));
})
.catch(e => console.error("Erreur réseau :", e));
}
// On utilise l'action 'product_save' identifiée par ton grep // On utilise l'action 'product_save' identifiée par ton grep
fetch('api/index.php?action=product_save', { fetch('api/index.php?action=product_save', {
method: 'POST', method: 'POST',