Laravel 8 E-com Part-22 : How to make add to cart in laravel using jQuery Ajax | Ajax Cart

preview_player
Показать описание
In this video, you will learn how to make the add to cart functionality in laravel 8 ecommerce using jQuery Ajax.

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

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

Sir what a way of teaching, I really appreciate it!

faizudesigns
Автор

good job but just one think if you put the route(/add_to_card)in side the middleware the allert (login to continue is dosent work because the access to this route we need to login.

mohamedlaaroussi
Автор

please what could be the cause of this error on this part 22 am getting the below error please help me
The GET method is not supported for this route. Supported methods: POST.

rotimiidowu
Автор

You're the best instructor, thank you.

ReemRamzi
Автор

hi sharma i am having a bug whereby the product_id remain the same in all products i have followed every bit of the tutorial.kindly help

voskilltheentertainer
Автор

Hi sir,
I faced a problem.
When I add to cart, it tell me the post method is not support it for this route
why I applied every single thing after you.

The problem is
the post method is not support for this route
please please help me

yagoobali
Автор

Hey sir, when i press add to cart I have error 404, the route in web.php and in the ajax are the same (in ajax I have the /) add-to-cart

Eliptik_
Автор

hi sir, i see you click on category name then it return to category page (at 19:04), how can I do that?

thuydungtrinh
Автор

Good tutorial! Just a doubt... usually is not need to login for add to cart. Is which way should be made it, considering that user relation is not exists? I Could create an cookie with a random token and save in a column for example 'user_id_temp' for not logged user and after logged assign user_id? thanks!

cloudeweb
Автор

This series of tutorials is amazing. You learn so much from it.

BucurIonNiculae
Автор

when I click add to cart, I get error 405 (Method Not Allowed), can you help please? @Sharma Coder

noxigen
Автор

The alert message is not working.

$.ajax({
method: "POST",
url: "/add-to-cart",
data: {
'product_id': product_id,
'product_qty': product_qty,
},
success: function (response) {
alert(response.status);
}
});
});

donaldmjbart-williams
Автор

Hello, I am confused that why you are not using sessions for cart functionality? Is it good for performance point of view to make entry in cart table?

usmanarif
Автор

Hi Good job what if i want to add to cart before logging in and then after log in that cart still exists

kakaisaac
Автор

how i fix this? SQLSTATE[42S22]: Column not found: 1054 Unknown column 'prod_id' in 'where clause' (SQL: select exists(select * from `carts` where `prod_id` = 4 and `user_id` = 1) as `exists`)"

anselmus.r
Автор

Hey sir,
when i press add to cart I have error 405 (Method Not Allowed)

deathstalker
Автор

mr sharma if i may i am following your steps and it gives me The GET method is not supported
and i copied the code for the $ajax

ahmedabdallah
Автор

hi sir i need your help
jquery doesn't works
and when i click on add to cart button i ain't got reaction

ismaelseck
Автор

very good video this is what i was looking for thank you!

tuanphamvan
Автор

sir i have am working the same style flow to add qty in the cart but it won't work

kyawswarthein
welcome to shbcf.ru