shop + cart + user login with school

This commit is contained in:
2025-04-13 21:33:59 +02:00
parent 296d7dbb2a
commit 16ff34419e
22 changed files with 1931 additions and 590 deletions
@@ -0,0 +1,13 @@
<?php
session_start();
// Recupera la chiave dell'elemento da rimuovere
$cart_key = $_POST['cart_key'] ?? '';
if ($cart_key && isset($_SESSION['cart'][$cart_key])) {
// Rimuovi l'elemento dal carrello
unset($_SESSION['cart'][$cart_key]);
echo json_encode(['success' => true]);
} else {
echo json_encode(['success' => false, 'message' => 'Elemento non trovato']);
}