alert('quantity updated')"; if($payment=='Online'){ echo "
Please wait while we will re-direct you to payment page...
"; echo ""; }elseif($payment=='COD') { $quantities = $_POST['quantity']; $org_quantities = $_POST['org_quantity']; $product_ids = $_POST['product_id']; for ($i = 0; $i < count($product_ids); $i++) { $quantity = $quantities[$i]; $org_quantity = $org_quantities[$i]; $product_id = $product_ids[$i]; // Calculate new quantity $current_quantity = $org_quantity - $quantity; // Update the product stock in the database $query = "UPDATE `product` SET product_quantity = '$current_quantity' WHERE product_id = '$product_id'"; // exit; mysqli_query($connect, $query) or die(mysqli_error($connect)); } echo "
Please wait while we update the record loading...
"; echo ""; } // ================================================================ End Payment ==================================================== // } // ***************************************************** Update If User Already Excists ***************************************************// else { mysqli_query($connect,"UPDATE `billing_details` SET `billing_name`='$billing_name',`billing_email`='$billing_email',`billing_phone`='$billing_phone',`billing_address`='$billing_address',`billing_pincode`='$billing_pincode',`state`='$billing_state',`district`='$billing_district',`billing_notes`='$billing_notes' WHERE `registered_users_id`='$registered_users_id'") or die(mysqli_error()); mysqli_query($connect,"UPDATE `order_cart_add` SET `billing_id` = '$billing_id' where session_id = '$session_id'") or die(mysqli_error()); // ================================================================ Payment ==================================================== // if($payment=='Online'){ echo "
Please wait while we will re-direct you to payment page...
"; echo ""; }elseif($payment=='COD') { $quantities = $_POST['quantity']; $org_quantities = $_POST['org_quantity']; $product_ids = $_POST['product_id']; for ($i = 0; $i < count($product_ids); $i++) { $quantity = $quantities[$i]; $org_quantity = $org_quantities[$i]; $product_id = $product_ids[$i]; // Calculate new quantity $current_quantity = $org_quantity - $quantity; // Update the product stock in the database $query = "UPDATE `product` SET product_quantity = '$current_quantity' WHERE product_id = '$product_id'"; // exit; mysqli_query($connect, $query) or die(mysqli_error($connect)); } echo "
Please wait while we update the record loading...
"; echo ""; } // ================================================================ End Payment ==================================================== // } } ?> Maharatri - Temple HTML Template
preloader

Checkout

Are you a returning customer? Click here to login

Do you have a coupon code? Click here to apply

If you have a coupon code, apply it below

Billing Details

Product Qunantity Total
Gita Book

1 Piece

x1 23.99$
Ramayana Book

2 Piece

x1 9.99$
Mahabharat Book

3 Piece

x2 13.99$
Grand Total
56.99$

Your personal data will be used to process your order, support your experience throughout this website, and for other purposes described in our privacy policy.