after array unset add this code $_SESSION["shopping_cart"] = array_merge($_SESSION["shopping_cart"]); Otherwise you cannot add more items. when you add a new item it will be added in the place of the last item.
There is an error. If you remove 2nd product, and then add another product. This will replace the third product. Because you used count for indexing. Your index is not unique.
The only thing I cannot handle is the automated voice you used or else I would've used your videos comeon man use a better listening voice or something.
This is a very good video for the general idea of shopping cart, but at this examples code, working with array with index as key is a really mess when it comes to the "unset/remove" part of the logic, simply won't work in real life. You better prefer associative keys for best results. Weblesson always provide good and practical ideas to do stuff, many Thanks
@@josephuzuegbu7431 I'm not criticizing at all I value the information completely and technically yes I do pay since I've used RUclips premium to learn certain things
i need help i wanna send request to friend from list of friends by clicking on button in front of their name.how to assign functionality to each button click in php please help. here is snippet of code. while($row=$stmt->fetch(PDO::FETCH_ASSOC)){ echo ''.$row["name"].'';
why can't you just read it for yourself? why do you use an automated voice!! i can't understand even after watching so many time. But thanks for the tutorial.
you prolly dont care but does anyone know of a method to get back into an instagram account? I was stupid lost the password. I appreciate any tips you can offer me
Good day can you make a option for the quantity to be changed in the Order Details section. Meaning the customer will add to cart and the Order Details will reflect the total price as if one item was selected (the quantity form is not there) but if a user wants to select more than 1 product they can do that from the order details (the quantity form will be here or if possible a plus and minus option like bootstrap ) instead of removing it from order details and selecting the amount and then adding back to cart?
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in C:\xampp\htdocs\FYP\product.php on line 62 and theres no button and images shown in the webpage :(
after checking in_array condition in your video in else part i want to add quantity only.. for i clicking one product again and again i want to do quantity increase like1,2,3,4,5...... how can i do????
Hello, I have a problem. When I have 2 products in the cart and the first one is removed, the next product you add will overwrite the first one (which was the second one). My code is same as yours. Is there a solution?
its really easy and nice tutorial, but i am facing one problem that is i cant add more product. can anyone please help me how can i add more products? please help on this...as soon as possible. thanks Webslesson
145/5000 My site shows the position of people every few seconds, but I do not know how to save the position in the theme form in my database. Someone can do it.
This is a very good video for the general idea of shopping cart, but at this examples code, working with array with index as key is a really mess when it comes to the "unset/remove" part of the logic, simply won't work in real life. You better prefer associative keys for best results. Weblesson always provide good and practical ideas to do stuff, many Thanks.
help me Warning: mysqli_query(): Couldn't fetch mysqli in index.php on line 96 Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in on line 97
Can you please help me? Whenever I click the add to cart, it says: Fatal error: Call to undefined function array_column() in C:\Users\Elisha\Desktop\USBWebserver v8.6 oot\shopping_cart\shop.php on line 9. I don't know how to fix it :( I need this for my project
good day sir, what if i want to add quantity in the same item that i've get 1 then i have to add another one in the same item without notify me that the item is already added. but i want to add more beacuse like i forgot something to add another quantity in that same product , but the code blocked it and stick to only 1 selection .. how can i change that to add more without alert? please ,, thankyou !
Thank you so much for this great video,but there is a problem when i try to remove item from the cart.Let's say I have 5 item in my cart when 1 delete item no.1(index 0) and add one more item (item no.6) the code will count the items in the cart first which is 4 items(item no.2 - item no.5) and then add the item to index 4 ,so the the item no.5 (index 4) will be replaced by the new item. I have no idea how to fix this problem. Thank for everyanswer :)
sir how about you have a login then add to cart and this is the situation " one user log in then he add to cart then he log out then someone log in " how that the second user dont see the previews record pls help
how to show value in the same td or input if you click on the database product. (In other words, only show a value in the same input if you click on add cart)
This sounds like a tutorial by an AI for other AI's 😅
😂😂😂😂😂😂😂ikrrr
🤣🤣🤣 Accurate af
after array unset add this code
$_SESSION["shopping_cart"] = array_merge($_SESSION["shopping_cart"]);
Otherwise you cannot add more items. when you add a new item it will be added in the place of the last item.
Hi, thank you for your tutorial! When I add 2 products in a cart, the first product gets deleted in the Order Details. How do i fix this?
i guess you should use $count+1 in video 10:45
@@accounts6390 it worked. Thanks
@@accounts6390 thanks 👍🏻
When i run these showed me undefined variable which is in $id=Get_id line
I noticed a bug in the shopping cart. If you add item with negative it will deduct the negative value from the total price.
There is an error. If you remove 2nd product, and then add another product. This will replace the third product. Because you used count for indexing. Your index is not unique.
@Biswarup Roy Chowdhury what should I use instead?
The only thing I cannot handle is the automated voice you used or else I would've used your videos comeon man use a better listening voice or something.
Same, had to mute...
@@WatIsbiz I honestly don't understand why this guy didn't use a better voice over. ughhh
Hey.. Can anyone please help me save the details of the items added in cart in a database ? (I use phpmyadmin).... it's urgent!!
Same ques!
The voice is not helping
This is a very good video for the general idea of shopping cart, but at this examples code, working with array with index as key is a really mess when it comes to the "unset/remove" part of the logic, simply won't work in real life. You better prefer associative keys for best results.
Weblesson always provide good and practical ideas to do stuff, many Thanks
You can also check this Ajax Jquery Drag and Drop Shopping Cart using PHP Mysql - ruclips.net/video/veb_UsjKrdQ/видео.html
I hate it when people upload a video and use Windows voice narration software......Annoying in a way I find hard to describe.
don't let the voice stop you from learning it's free content, plus weblessons are a great source
@@marteltaylor-strickland4642 Why criticizing a resource u are getting freely. You didn't pay for this tutorial. do you?
@@josephuzuegbu7431 I'm not criticizing at all I value the information completely and technically yes I do pay since I've used RUclips premium to learn certain things
i need help i wanna send request to friend from list of friends by clicking on button in front of their name.how to assign functionality to each button click in php please help.
here is snippet of code.
while($row=$stmt->fetch(PDO::FETCH_ASSOC)){
echo ''.$row["name"].'';
echo ' ';
}
Anyone who watched this video? I have confusion where did he get the $_SESSION["shopping_cart"] ?
why can't you just read it for yourself? why do you use an automated voice!! i can't understand even after watching so many time. But thanks for the tutorial.
what do i do after creating a simple cart?
I want to be able to charge the total on the cart with stripe.
Any tips are appreciated.
it was useful till i pressed the add to cart button and it told me $values is an undefined variable
I need help sir, how to save the item to the database once u checked out
hi sir if you already did this please teach me i really need this thank you
insert the same array to database
in insert query
Can you please suggest how to perform checkout and payment after this I have used same code in my project
this code give me this error: "Notice: Undefined index: id" in line 10 and 14
Then check line 14
still good in 2019, nice work man
It's still working in 2021 man 😂
you prolly dont care but does anyone know of a method to get back into an instagram account?
I was stupid lost the password. I appreciate any tips you can offer me
Thank you very much for this great job. Thanks.
Thank you. Your video helped me in the development of the thesis project.
Oh, Thanks for share feedback with us.
How to post these values to another form, through a button of type submit.
why you add hidden field I cant understand will you please explain
Nul
Why i can't insert second item in shopping cart
When i add another item into cart it display item added
Can we see client history and shopping history here?
Is this the only video or is there another one with the checkout option?
how to display the ordered items in shopping cart to order page.
Hi I am php laravel developer if you want develop some web app free way replay me!
@@takshot9941 dear Sir, where r u from? I need some help for customisation a script. thanks
@@turfacreation I am from Afghanistan what type of script need for customization.?
Laravel framework, PHP script.
i would like to know how to update the product quantity?
Sir, Assalamulaikum, Your video very great. This all video helpful
I have a stock column in my table. Can you tell me how to reduce the stock at the time of purchase? Thank you in advance :)
Hi sir, so how i can add the items from to cart to database?
Sir pls the order detail I'd no displaying
That was helpful :)
you can teach in your voice to that will be much better :)
How to display image in order details area?
And how would it be for the information to keep it in the same td without creating more td.
Hi can you please help me for my program.
what are you typing your code on ther???
Sir items not showing into cart pls help
Sounds like a robot or AI talking
When I'm selecting the first product, it doesn't display in the cart. how to fix this?
But other products are visible in the cart when clicking the add to cart button
Not work your code i have sone errors..🥺
Good day can you make a option for the quantity to be changed in the Order Details section. Meaning the customer will add to cart and the Order Details will reflect the total price as if one item was selected (the quantity form is not there) but if a user wants to select more than 1 product they can do that from the order details (the quantity form will be here or if possible a plus and minus option like bootstrap ) instead of removing it from order details and selecting the amount and then adding back to cart?
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in C:\xampp\htdocs\FYP\product.php on line 62
and theres no button and images shown in the webpage :(
can I be able to make transactions with it
how do u store images in a table ???
after checking in_array condition in your video in else part i want to add quantity only.. for i clicking one product again and again i want to do quantity increase like1,2,3,4,5...... how can i do????
right side code is not visible.
Nice tutorial. I expect more nice. Like, initially how to store items, how many items exist , and PayPal tranction.
Hello, I have a problem. When I have 2 products in the cart and the first one is removed, the next product you add will overwrite the first one (which was the second one). My code is same as yours. Is there a solution?
there's a problem with downloading the source code -> unknowing archive?!!!!
very helpful thnaks
its really easy and nice tutorial, but i am facing one problem that is i cant add more product. can anyone please help me how can i add more products? please help on this...as soon as possible. thanks Webslesson
Is somenone who could update the quantity ??? I need to find out how could i solve it.Please ,HELP!
145/5000
My site shows the position of people every few seconds, but I do not know how to save the position in the theme form in my database. Someone can do it.
This is a very good video for the general idea of shopping cart, but at this examples code, working with array with index as key is a really mess when it comes to the "unset/remove" part of the logic, simply won't work in real life. You better prefer associative keys for best results.
Weblesson always provide good and practical ideas to do stuff, many Thanks.
If I select item 'A' twice n want to remove one of the item 'A's' it removes all of them. And image is not showing on the table please help
2021 Toturial very good. Thanks!
this video upload in hindi/urdu..plz...don't understand this language
how to show image in cart
What mean '0' in this line of code = $_SESSION['shopping_cart'][0] ? Thx for answers.
My list is showing in vertical...I copied exact code u wrote..still it's in vertical ...not horizontal
Thank you!. I want to ask if we close the browser and open it again, so will the items in cart remain as it is or they get cleared?
$_SESSION variable will automatically clears its content after the browser gets closed.
@@accounts6390 then what is the solution if cart items should be remain same in cart after added even though browser will close.
@@saisatishethreyas9025 save them to a database
can you please make this shopping cart in laravel and ajax? ...
help me
Warning: mysqli_query(): Couldn't fetch mysqli in index.php on line 96
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in on line 97
Where from this guy who makes best tutorial with gibberish sound.
i'm a biggener of php programming please help me with my problem ,, please contact me
Where from this guy who makes best tutorial with gibberish sound.
good morning ! what is the codes in
my code does not work, plz anyone help? when i click on add to cart button it does not add anything in the Order details.
when inserting the images in the database, it becomes twice a time in the browser. can you help me
Can you please help me? Whenever I click the add to cart, it says: Fatal error: Call to undefined function array_column() in C:\Users\Elisha\Desktop\USBWebserver v8.6
oot\shopping_cart\shop.php on line 9. I don't know how to fix it :( I need this for my project
Did you get sorted in the end?
Download the latest version of phpMyAdmin tat supports array_column() feature.
Hi
what if a product have more then one pictures ? does it works or it will repeat same product details with diff pictures
how to insert into db?
good work, but can you please provide the code for a checkout after the cart
How to save in php ?
nice tutorial . how i send shopping data in database?please give me suggestion.
Hello sir my image is not getting displayed in webpage from database..please help me
Boss how to create otp code system in mobile view , please make tutorial
how can I put the available stock of the product that will be lessen with the input quantity of item to be bought?
I've changed my base. Why do not I add it when I press the button?
good day sir, what if i want to add quantity in the same item that i've get 1 then i have to add another one in the same item without notify me that the item is already added. but i want to add more beacuse like i forgot something to add another quantity in that same product , but the code blocked it and stick to only 1 selection .. how can i change that to add more without alert? please ,, thankyou !
where is the source code
Thank you so much for this great video,but there is a problem when i try to remove item from the cart.Let's say I have 5 item in my cart when 1 delete item no.1(index 0) and add one more item (item no.6) the code will count the items in the cart first which is 4 items(item no.2 - item no.5) and then add the item to index 4 ,so the the item no.5 (index 4) will be replaced by the new item. I have no idea how to fix this problem. Thank for everyanswer :)
Try using array_push, it should solve the problem.
Hi! Anyone can help me ? I cant insert another item in the cart? Thanks in advance!
Please help. When i click add to to cart it only adds the same item the last item in database. How to fix this?
It always say that items already added and cant change quantity because of that.
Thanks for this
i don't want to show quantity in html form but i want to show quantity in cart table what can i do?
sir how about you have a login then add to cart and this is the situation " one user log in then he add to cart then he log out then someone log in " how that the second
user dont see the previews record pls help
thank you for the video... it is very helpful
Bro please make the 2 nd part with PayPal integration
how do you display not just the products but the products and the image in the cart?
how to show value in the same td or input if you click on the database product. (In other words, only show a value in the same input if you click on add cart)
that is good tutorial BUT is'not for the real life
because as user i can change that "hidden" variables because that variables is POST
Try it !
voice is very bad
Code is not working in live server please help me.
Bro Can You Give me All Code..Please..