I love the way shark carried out,I would like to thank him. After going through the videos,the add to cart button would not add and the the alert message says no such product found.I have product in the database. I need help with it please!!
am having this error: Failed to load resource: the server responded with a status of 404 (Not Found). this is my ajax: $.ajax({ method:"POST", url: "addtocart", data: { 'prod_id':prod_id, 'product_qty':product_qty, csrfmiddlewaretoken:token }, success: function (response) { console.log(response) alertify.success(response.status) } }); the error is from my ajax url
Hello sharma When i open the Inspect and click on Add to Cart button, in the console log doesn`t apear a message. I think the button doesn't work. I watch the video 3 times and the code is the same. I think the problem is at that button class. Please help me, i need a response. Thanks a lot.
Hi bro , i have this error : Method Not Allowed (POST): /products/iphone-x Method Not Allowed: /products/iphone-x , i have used require post decorator with function based views and class based views , method post in html form , method post in js but still getting this error pls help me i really need this and is there any way that i could access to codes of this video? (just for the ajax)
For some reason when i click the button "Add to cart" nothing happens i have no idea why, i went through the code more than 3 times and I've done everything pretty much the same
Check the following things: 1. If you have given the class name correctly in the button and jqclick. 2. Check if you have linked your custom.css to your layout file. 3. If you have done both the above and still not working, just write and alert(); inside the jqclick function to check if your button is able to atleast reach the function on click event.
@@SharmaCoder still not working i checked the "addToCartBtn" class name i passed it correctly with the '.' selector, in the "main.html" first line is {{%load static%}}
I love the way shark carried out,I would like to thank him.
After going through the videos,the add to cart button would not add and the the alert message says no such product found.I have product in the database.
I need help with it please!!
am having this error:
Failed to load resource: the server responded with a status of 404 (Not Found).
this is my ajax:
$.ajax({
method:"POST",
url: "addtocart",
data: {
'prod_id':prod_id,
'product_qty':product_qty,
csrfmiddlewaretoken:token
},
success: function (response) {
console.log(response)
alertify.success(response.status)
}
});
the error is from my ajax url
ayuda
@SharmaCoder
HELPPPPP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@SharmaCoder
my ajax - finally work
$.ajax({
type: "POST",
url: "/add-to-cart",
data: {
'product_id': product_id,
'product_qty':product_qty,
csrfmiddlewaretoken: token
},
success: function (response) {
console.log(response)
alertify.success(response.status)
}
});
Hello sharma
When i open the Inspect and click on Add to Cart button, in the console log doesn`t apear a message. I think the button doesn't work. I watch the video 3 times and the code is the same. I think the problem is at that button class. Please help me, i need a response. Thanks a lot.
Your problem solved ?please help I am also getting same error
@@chandreshsolanki7580 yes, only press in chrome CTRL+SHIFT+R to delete your cache and the code will apear
Same issue for me when solve it??
Please help me???
Clear cache and retry.
not working..
Hello sir how to make add to cart without user login? Thanks sir
sir how do you fix this error failed to load resource: the server responded with a status of 500 (Internal Server Error)
did you get the solution
Bro tujhe Mila kuch solution iska same error@@ziy4dmhd
I'm loving this code
you explain nicely
Thank you
jsonresponse wont display
i've got a 'Method Not Allowed: /add-to-cart' Error, do u know guys how to fix that?
Hi bro , i have this error : Method Not Allowed (POST): /products/iphone-x
Method Not Allowed: /products/iphone-x , i have used require post decorator with function based views and class based views , method post in html form , method post in js but still getting this error pls help me i really need this and is there any way that i could access to codes of this video? (just for the ajax)
Seems like you have not added a post route for the specified url.
Anyways, You can download the code from the description.
For some reason when i click the button "Add to cart" nothing happens i have no idea why, i went through the code more than 3 times and I've done everything pretty much the same
Check the following things:
1. If you have given the class name correctly in the button and jqclick.
2. Check if you have linked your custom.css to your layout file.
3. If you have done both the above and still not working, just write and alert(); inside the jqclick function to check if your button is able to atleast reach the function on click event.
@@SharmaCoder still not working i checked the "addToCartBtn" class name i passed it correctly with the '.' selector, in the "main.html" first line is {{%load static%}}
and i wrote the function "alert()" in the success section and tried it at the beggining of the function and still not working
Write the alert () as the first line in the jqclick. Comment the ajax for time being.
i did that still nothing happened :(
So sir cosole says 500(internal server error)
Bro it is not working and not showing any error. My items can't save the cart model please help
I have also same error if your error got solved please help me
After following the coding flow of adding items still i'm unable to add items to cart
You are getting any errors?
@@SharmaCoder now working, thanks !
@@ejazmohammad8563please help what will you do
please help i have the same problem
@@ejazmohammad8563help me I am not getting any error but output is not working
In console it is saying that 500(internal server error)
Click on that error message. It will take you to the networks tab. There you can see the error source and rectify it.
Any updates on laravel 8 sir?
the e-commerce one
We will be continuing with the laravel ecom series after this django series..
Will finish the Django ecom series ASAP.
I got an error int() argument must be string,a byte-like object or a number , not Nonetype
i am also getting same error
I have everything as per video but it does not respond anything
What is the issue?
@@SharmaCoder sir when I click on button nothing happend
@@SharmaCoder and my code is not showing any error
@@SharmaCoder500(Internal server error)
Click on that 500 error message in your console. It will take you to the networks tab. There you can see the error source and rectify it.
I am getting post 500 internal server error
how did u resolve?
@@kpsanjnaI am also getting same error pls help if you get solution
Fst check the code in detail, then close your db and your project and then connect again.. It will surely work.
@@kpsanjna it works
@@kpsanjna thank you
Uncaught TypeError: $.ajax is not a function
check the script tag , ajax link tag etc in head section etc.
@@ziy4dmhd same problem Uncaught TypeError: $.ajax is not a function