PHP Ecom Part 22: How to make Add to Cart using jQuery in PHP MySQL | jQuery Ajax

preview_player
Показать описание
In this video, you will learn how to make add to cart using jQuery in PHP MySQL.

If the video helps you, hit the like button and subscribe to the channel. If you have any doubts or suggestions, drop them in the comments below and i will answer them.
Thanks for watching

Рекомендации по теме
Комментарии
Автор

This tutorial works too. Every time I make a simple syntax error or two when writing the code. Be careful typing...

ИвайлоЧернев
Автор

those who are having problem that the button is not working or not adding cart to database, make sure you remove the datatype: line in your ajax but if the product is aleady added to database the button wont work becouse you set it that way and maybe the problem is in your alatify so trying avoiding it first

BrianKibet-hx
Автор

what do you use extension to make it faster the format of ajax

heinrichsanchez
Автор

my program no error but no data add in cart table and no showing any error

mujtabaqureshi
Автор

if(isset($_SESSION['auth'])){
if(isset($_POST['scope'])){
auth is not set and no inserting data in carts table but 401 error is working so what is solutions sir ?

shuhebansari
Автор

Please help me, i followed all the steps but when i click "add to cart" it does not do anything. No errors, the database table updates but the userId, productId and productQuantity is zero.

Everything-wzrx
Автор

Thank you so much sir, your video helped me a lot.Can you plz make a video for canceling a booking.

navyamariambabu
Автор

Sir, as told in such video, I have followed all the steps but my data is not getting stored in the table and no error is being shown So it would be nice for me if you could help me sir

gayatridodiyagayatridodiya
Автор

Hello sir, I have watched this series from start and following all steps but now when i am already loged in it is still saying login to continue why ?

daniyalkhan
Автор

how to show total cart items on navbar please can someone help

uzzamkhan
Автор

Hello Sir, please i have everything right but my alert message isn't popping up. Please help me.

dannykhay
Автор

Ajax query is not working in my code, do i need to install anything..?

kashishvarshney
Автор

bro please help it is not working i cant add to carts. there is no problem give us ither way to add into the carts . its very bad to stop in this video

io
Автор

My code is also not working for this code can someone please solve my problem when i click on addrToCartBtn i am not getting alert😢

kashishvarshney
Автор

@sharma coder please give me the code only for this video

jhilik
Автор

using this code my add to cart is not working . not accessing session['auth'] and
please give some solution to sort this problem..rest of all are working..
if (isset($_SESSION['auth'])) {
if (isset($_POST['scope'])) {

$scope = $_POST['scope'];
switch ($scope) {
case "add":
$id = $_POST['id'];
$qty = $_POST['qty'];

$user_id =

$insert_query = "INSERT INTO `cart`(`id`, `user_id`, `c_qty`, `created_by`) VALUES ( '$id', '$user_id', '$qty ', current_timestamp())";

$insert_query_run = mysqli_query($con, $insert_query);

if ($insert_query_run) {

echo 201;

} else {

echo 500;
}
break;
default:
echo 500;

}
}

}

coding_with_ashna
welcome to shbcf.ru