From b1481025eaf2232a94c4e49342f70045f76f143e Mon Sep 17 00:00:00 2001 From: ArchanRD Date: Fri, 11 Oct 2024 16:41:40 +0530 Subject: [PATCH 1/4] correction: route name --- menu.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/menu.php b/menu.php index eec9947..7dd1d52 100644 --- a/menu.php +++ b/menu.php @@ -300,7 +300,7 @@ function convertCartToArray(cart) { -
+
From 49a7b55c73918ca7073f39e6766243415fffe4d9 Mon Sep 17 00:00:00 2001 From: ArchanRD Date: Fri, 11 Oct 2024 16:42:25 +0530 Subject: [PATCH 2/4] add missing restaurant id --- checkout.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/checkout.php b/checkout.php index 74ad3b8..c2afb5b 100644 --- a/checkout.php +++ b/checkout.php @@ -7,7 +7,7 @@ $order=$_SESSION['Order']; $amount=$_SESSION['amount']; $userId= $_SESSION['user_id']; - +$rid = $_SESSION['rest_id']; $oid = mt_rand(10000, 99999); $_SESSION['orderid'] = str_pad($oid, 5, '0', STR_PAD_LEFT); From 5f9d2828be6459857378bb7c8d2aff2f08015bb6 Mon Sep 17 00:00:00 2001 From: ArchanRD Date: Fri, 11 Oct 2024 16:55:27 +0530 Subject: [PATCH 3/4] Fix: Razorpay form opens --- pay.php | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/pay.php b/pay.php index 9c15007..3cecebf 100644 --- a/pay.php +++ b/pay.php @@ -121,7 +121,29 @@ \ No newline at end of file From 1a2c3dbc23852308d942645df4bfb7711e7925d8 Mon Sep 17 00:00:00 2001 From: ArchanRD Date: Fri, 11 Oct 2024 16:56:19 +0530 Subject: [PATCH 4/4] Fix: default value for order attribute --- verify.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/verify.php b/verify.php index a997613..28675b4 100644 --- a/verify.php +++ b/verify.php @@ -52,9 +52,9 @@ $phone=$_SESSION['Billing_phone']; $name=$_SESSION['name']; - - $sql = "INSERT INTO `orders` ( `order_id`, `r_id`, `user_id`, `amount`, `address`, `phone`, `payment`, `order_status`, `rating`, `name`) - VALUES ('$orderId', '$restId', '$userId', '$amount', '$address', '$phone', '$tranStatus', 'Accecpted', '0', '$name');"; + // Added $order in the query as it is set to 'NOT NULL' and no DEFAULT value is provided. Later it is updated in below forEach loop. + $sql = "INSERT INTO `orders` ( `order_id`, `r_id`, `user_id`, `order`, `amount`, `address`, `phone`, `payment`, `order_status`, `rating`, `name`) + VALUES ('$orderId', '$restId', '$userId', '$order', '$amount', '$address', '$phone', '$tranStatus', 'Accecpted', '0', '$name');"; $result = mysqli_query($conn, $sql); foreach ($order as $item) { @@ -63,7 +63,7 @@ } if ($result) { - header("location: Track_order.php"); + header("location: track_order.php"); } }