🚀Get access to full PHP CRUD project. www.udemy.com/course/learn-php-crud-operation-create-read-update-and-delete/?referralCode=4C91E67AB34784662E54 🚀Registration system using PHP and MySQL www.udemy.com/course/registration-and-login-system-using-php-and-mysql/?referralCode=F96D572ED43994DAD56F ******************************* 👉Instagram: @khaiserkhanam instagram.com/khaiserkhanam/
hi hope you're doing great I'm glad to know u and now I'm doing the same and watch every single video u made in this category but now i want to import my data into my laptop's xampp but i got some error and my data didn't import can u make a video about it how i can export and import this project i made with in another device
I Somehow found a way Thank God Almighty. And teacher Kaisher Khanam I am thankful to God that these videos you've posted have already included the solutions from start to end. I just found a way how to specifically get the specific item quantity of each no matter if it's 2 or 99 items was in cart, I can specifically change the quantity connected to cart_details database table. Thank you so much and I hope you would post more of videos like this since this is a HUGE Diamond in the rough. I could never learn more enough from start to end. I was able to make the admin login page and registration with the IP address including except the add to cart features on admin.
Yea guys ,i know that many of us got stuck here in this video ,so i did lot of searching and found out that when you tell chatgpt to correct this code or solve error in this code, it will give you a code containing cart_id in it ....the thing is that you have to drop the primary key from product_id, create a column in cart_details table and give the primary key and auto increment to cart_id .hope it works for you all .i did this and it worked for me
For those who are stuck maybe try removing all the items in your cart first, I previously had 4 items in my cart and it prompted me the error. Then I decided to go remove and add just 1 product and it worked. (I pray that she'll spot and fix the error in the later part)
Only the last quantity that we entered will be taken as input and will update every product in cart database with the last value.. If we have multiple product in cart then your last quantity input field data will be taken
Yep, that's what happened for me. When I tried to just update 1 item in the cart it updates all the items in the cart! At least I have a better understanding now!
Hi Ma'am, I observed the new value(after quantity has been change) does not reflect into navbar total/sum price. so when changing to new page, like going back to the home page, the value it display still from the single quantity.
Mam updating the quantity fatal error occurred when multiply $total_price=$total_price*$quantities; The error shows int*string not supported in php How to solve the issue
Video no 31 , line number 128 [ $total_price=$total_price*$quantities; ] this is not work and error, Error is ->Fatal error: Uncaught TypeError: Unsupported operand types: int string in C:\xampp\htdocs\Ecommerce website\cart.php:140 Stack trace: #0 {main} thrown in C:\xampp\htdocs\Ecommerce website\cart.php on line 140,this is the error please solve this please 🥺
Suppose , we add 2 items in cart and I want to update the quantity of only one item then it's not updating ,it is updating the quantity of both items ,pls tell us how to solve this error and also I want to display the quantity in cart .there is 1 more error whenever we refresh the cart it shows the default quantity again and again . Please tell us about it.
While updating u can do one thing in where clause along with ip address give product Id as well using and operator..if both this are true then only cart item will be updated. Check for this.
im having this annoying error Fatal error: Uncaught TypeError: Unsupported operand types: int * string in D:\XAMPP FILES\htdocs\EcommerceV3\cart.php:131 Stack trace: #0 {main} thrown in D:\XAMPP FILES\htdocs\EcommerceV3\cart.php on line 131 anyone know?
hello, i had the same error as you, i did what you did and i'm still getting the error: Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'where ip_address='::1'' at line 1 in C:\xampp\htdocs\WebSiteParaiso\carrinho.php:140 Stack trace: #0 C:\xampp\htdocs\WebSiteParaiso\carrinho.php(140): mysqli_query(Object(mysqli), 'Update `carrinh...') #1 {main} thrown in C:\xampp\htdocs\WebSiteParaiso\carrinho.php on line 140
🚀Get access to full PHP CRUD project.
www.udemy.com/course/learn-php-crud-operation-create-read-update-and-delete/?referralCode=4C91E67AB34784662E54
🚀Registration system using PHP and MySQL
www.udemy.com/course/registration-and-login-system-using-php-and-mysql/?referralCode=F96D572ED43994DAD56F
*******************************
👉Instagram: @khaiserkhanam
instagram.com/khaiserkhanam/
hi hope you're doing great I'm glad to know u and now I'm doing the same and watch every single video u made in this category but now i want to import my data into my laptop's xampp but i got some error and my data didn't import can u make a video about it how i can export and import this project i made with in another device
Try to make the type of input quantity as number it will works
I Somehow found a way Thank God Almighty. And teacher Kaisher Khanam I am thankful to God that these videos you've posted have already included the solutions from start to end. I just found a way how to specifically get the specific item quantity of each no matter if it's 2 or 99 items was in cart, I can specifically change the quantity connected to cart_details database table. Thank you so much and I hope you would post more of videos like this since this is a HUGE Diamond in the rough. I could never learn more enough from start to end. I was able to make the admin login page and registration with the IP address including except the add to cart features on admin.
trying to figure that out as well. what did you do?
Can you please, paste the updating cart quantity solution here.
Thanks
can u pls teach us how
bro can you share the code with me
Pls comment the code I really need this solution 🙏🏻
Yea guys ,i know that many of us got stuck here in this video ,so i did lot of searching and found out that when you tell chatgpt to correct this code or solve error in this code, it will give you a code containing cart_id in it ....the thing is that you have to drop the primary key from product_id, create a column in cart_details table and give the primary key and auto increment to cart_id .hope it works for you all .i did this and it worked for me
For those who are stuck maybe try removing all the items in your cart first, I previously had 4 items in my cart and it prompted me the error. Then I decided to go remove and add just 1 product and it worked. (I pray that she'll spot and fix the error in the later part)
did you solve the issue when updating specific products?
@b nope that's a error she never fix
function totalSavedCard(){
global $con;
$ip = getIPAddress();
$select_query="Select * from `cart_details` where ip_address='$ip' ";
$result_select=mysqli_query($con,$select_query);
while($row_data=mysqli_fetch_assoc($result_select)){
$productid=$row_data['product_id'];
$quantity=$row_data['quantity'];
$select_queryP="Select * from `product` where id=$productid ";
$result_selectP=mysqli_query($con,$select_queryP);
$row_data=mysqli_fetch_assoc($result_selectP);
$name=$row_data['name'];
$image1=$row_data['image1'];
$price=$row_data['price'];
echo "
$name
$price /-
Remove
";
}
}
function updateCart(){
if(isset($_POST['update'])) {
global $con;
$ip = getIPAddress();
$quantity = $_POST['qty'];
$product_id = $_POST['product_id'];
$update_query = "UPDATE `cart_details` set quantity = $quantity WHERE product_id = $product_id and ip_address='$ip'";
$result = mysqli_query($con, $update_query);
if($result) {
echo "alert('Quantity updated successfully.$quantity $product_id' )";
} else {
echo "alert('Error updating quantity: " . mysqli_error($con);" )";
}
}
}@@bruisinflare
Yeah bro me also having this error
Only the last quantity that we entered will be taken as input and will update every product in cart database with the last value.. If we have multiple product in cart then your last quantity input field data will be taken
so what is the solution please
same thing happened with me
when there are 2 or more items in the cart and you try to update only one item all other items get updated too
Yep, that's what happened for me. When I tried to just update 1 item in the cart it updates all the items in the cart! At least I have a better understanding now!
I too have this issue. and I don't know how to update if it has multiple items.
yes that's what i think if you try to update quantity for an product all products get updated
@@marwanassou4016 I tried fixing it for a week but sadly couldnt manage it so I just removed the quantity option all together
@@marwanassou4016 bro are you solve the problem i'm stuck with it now
Hi Ma'am, I observed the new value(after quantity has been change) does not reflect into navbar total/sum price. so when changing to new page, like going back to the home page, the value it display still from the single quantity.
Mam updating the quantity fatal error occurred when multiply $total_price=$total_price*$quantities;
The error shows int*string not supported in php
How to solve the issue
I also get this error, did you find a solution?
@@VendarMohammed you can convert this quantities into integer then u can multiply this value $quantities = intval($quantities);
@@bhuvaneshwari.b.g3637 not working this can you please share a peice of that part of code please
pls vai help me....same problem this vedio
@@globalexpresszone5363 check with chatgpt paste the part of code and post the error hope it will helps you am also follow the same way
Please what is the advantages of using add to cart with cookies over ip_address
mam u r great but here is problom in multiple cart if u r updating only one in it cant updating any sulotion plz
if you found the reply plz respond here
.myupdatebtn{
width: 100%;
margin-top:10px
}
.myupdatebtn{
width: 100%;
margin-top:10px
}
@@rasikaeranda3738 wow amazing u saved me thanks alotnow i understood u r code .
@@vikrambais4885 Can u help me on this problem?
This error shows what the solution prof :
Uncaught TypeError: Unsupported operand types: float * string in
bro how did you solved thiss?? please
Video no 31 , line number 128 [ $total_price=$total_price*$quantities; ] this is not work and error, Error is ->Fatal error: Uncaught TypeError: Unsupported operand types: int string in C:\xampp\htdocs\Ecommerce website\cart.php:140 Stack trace: #0 {main} thrown
in C:\xampp\htdocs\Ecommerce website\cart.php on line 140,this is the error please solve this please 🥺
Pls make videos only in English mam than only everyone can understand. P.S I am tamil
Can someone help solve this issue of updating quantity?
do you solve the issue?
Suppose , we add 2 items in cart and I want to update the quantity of only one item then it's not updating ,it is updating the quantity of both items ,pls tell us how to solve this error and also I want to display the quantity in cart .there is 1 more error whenever we refresh the cart it shows the default quantity again and again . Please tell us about it.
While updating u can do one thing in where clause along with ip address give product Id as well using and operator..if both this are true then only cart item will be updated. Check for this.
@@KhanamCoding still the same error
@@vinaykshirsagar62 U solved this error?
@@KhanamCoding still same problem...can you please make another video to solve this problem?
you find the solution for this one
Maam you missed the part 30
U must check once again ur updating cart video,,there are more error coming while I practice
.myupdatebtn{
width: 100%;
margin-top:10px
}
Found a way to solve the updating problem from this link
can you share me the solution pls
I am also want the solution please share with me also brother
For anyone who can't update the quantity.
Can you share the full part... Updating quantity
it's work if you have only an item but when you add two more it not work
hello vai same problem
@@globalexpresszone5363 solved the problem
im having this annoying error Fatal error: Uncaught TypeError: Unsupported operand types: int * string in D:\XAMPP FILES\htdocs\EcommerceV3\cart.php:131 Stack trace: #0 {main} thrown in D:\XAMPP FILES\htdocs\EcommerceV3\cart.php on line 131 anyone know?
30 no video is missing from this playlist 😢
If anyone found the solution of updating cart quantities pls comment the code I need this 🙏🏻
Bro my problem is also same
So, if you got the solution then please let me know also.
I have an error
Could you please brief about your error.
Someone should help solve this issue of updating quantity..
Please paste in the comment, thanks
.myupdatebtn{
width: 100%;
margin-top:10px
}
if(isset($_POST['update_cart']) && isset($_POST['quantity'][$product_id])){
$qty = $_POST['quantity'][$product_id];
$update_cart = "update `cart_details` set quantity=$qty where product_id=$product_id";
$result_products_quantity = mysqli_query($con,$update_cart);
$total_price = $total_price*$qty;
}
?>
Please make it in Hindi so many people can join u
Ah! English is better o.
hello, i had the same error as you, i did what you did and i'm still getting the error: Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'where ip_address='::1'' at line 1 in C:\xampp\htdocs\WebSiteParaiso\carrinho.php:140 Stack trace: #0 C:\xampp\htdocs\WebSiteParaiso\carrinho.php(140): mysqli_query(Object(mysqli), 'Update `carrinh...') #1 {main} thrown in C:\xampp\htdocs\WebSiteParaiso\carrinho.php on line 140
i got that issue too, please help me if you got the right code
@@ace4452 do you slove the issue ?
Pls am having same issue pls I need help
query syntax error only please check one more time query syntax or paste query in comment box