In the product view page only a single ordered product is shown rather than all the ordered products of the same user ... I have also used the hasMany relationship in the model and use foreach loop in the view page...kindly guide me now what to do to show all the products of the same user
@@SharmaCoder because last video sir you have missed to add the total price into db. I was thought this video have guide to insert for the total price :) so proceed to checkout must display the total price of all the items and how the total price can be insert into db? I need help sir please 🙏
And to answer your previous question of taking the total price by $request->input(total_price). If you do it this way, you are taking the value from the frontend. User can inspect and change the value to a lesser amount or even 0. So when you take the total_price by $request->input(total_price), then you will get the value from the frontend (which might be changed anytime by the user). So everything has to be processed in the backend code. Frontend is only to display data to users. I hope your doubt is cleared.
help me sir please, how can i fix this? Class "Illuminate\Database\Eloquent\Factories\Product" not found (View: C:\xampp\htdocs\ecom-2 esources\views\frontend\orders\view.blade.php)
public function products(){ return $this->belongsTo(product::Class,'prod_id','id'); } Try this code on orderItem.php in Model Instaed on this public function products():BelongsTo{ return $this->belongsTo(product::Class,'prod_id','id'); }
Hello guys. How are you? Someone who took this course, could you make it available through git-hub, in another way you prefer or send it to me? I'm completing this course and I'm having difficulties in some parts. Through this course I'm finishing my course conclusion work, if all goes well I'll graduate now in December. So I desperately need help. Could anyone help me on this one?
sir, where am I gonna import this class? Class "Illuminate\Database\Eloquent\Factories\Product" not found (View: C:\xampp\htdocs\ecom-2 esources\views\frontend\orders\view.blade.php)
Just check if you have given the right column names and conditions in the query builder. You can also try dd() to check what data you have in your variable.
21:34
in the order view page it only shows single product not two. I did the relationship and it is working fine. any solutions??
I have searched the whole series but haven't found anything. Can you clarify the placeorder functions sir? In short, is this series complete?
Sir my belongsTo relationship is not working its saying App\Models\belongsTo\Product not found
Thank you so much sir
hello can you help the total_price to store and display the price
Hi, sir! Can this project register and login for multiple user ?
Yes
I have an error 404 not found problem when I press to see my orders view. Would you help me ?
You must have made a spelling mistake while calling the url.. just copy the url from the web.php and paste it in the a tag.
@@SharmaCoder
the view-order that is not working sir. I've reviewed the code more than 5 times and I didn't find anything wrong sir 😭😭😭
Did you solve it??
I just noticed one small part is missing from the video. I have written the corrections in the description.
@@SharmaCoder thanks... am following you on these tutorials
how i directly redirct to the order view page after placing order
Thanks sir
why you dont make any kind of foreign relation in database
How add grand total amount in word?
Indian ruppe INR
Hello sir, {{ $item->products->name }} some time this code works sometime not .please give the solution sir.
In the product view page only a single ordered product is shown rather than all the ordered products of the same user ...
I have also used the hasMany relationship in the model and use foreach loop in the view page...kindly guide me now what to do to show all the products of the same user
Same problem
Hi, How do you declare total_price in CheckoutController? I believe that’s not declare like this $order->total_price = $request->input(‘total_price’)
Are you sure you've commented on the right video?
@@SharmaCoder because last video sir you have missed to add the total price into db. I was thought this video have guide to insert for the total price :) so proceed to checkout must display the total price of all the items and how the total price can be insert into db? I need help sir please 🙏
Oh i remember.
Just check out this video and also the video description
ruclips.net/video/UwLCR_IbxY8/видео.html
And to answer your previous question of taking the total price by $request->input(total_price).
If you do it this way, you are taking the value from the frontend. User can inspect and change the value to a lesser amount or even 0. So when you take the total_price by $request->input(total_price), then you will get the value from the frontend (which might be changed anytime by the user).
So everything has to be processed in the backend code. Frontend is only to display data to users.
I hope your doubt is cleared.
@@SharmaCoder oh thank you sir for your explanation🙏🙏 You are so kind😭
I have a 404 error problem | NOT FOUND. when trying to load the view-orders page. Can someone help me ?
Show me your code..
the tag and the Route..
Check the video description.
@csrf
@@nament2839 thank you ahahhaha
help me sir please, how can i fix this? Class "Illuminate\Database\Eloquent\Factories\Product" not found (View: C:\xampp\htdocs\ecom-2
esources\views\frontend\orders\view.blade.php)
public function products(){
return $this->belongsTo(product::Class,'prod_id','id');
}
Try this code on orderItem.php in Model Instaed on this
public function products():BelongsTo{
return $this->belongsTo(product::Class,'prod_id','id');
}
Hello guys. How are you? Someone who took this course, could you make it available through git-hub, in another way you prefer or send it to me?
I'm completing this course and I'm having difficulties in some parts. Through this course I'm finishing my course conclusion work, if all goes well I'll graduate now in December. So I desperately need help. Could anyone help me on this one?
sir, where am I gonna import this class? Class "Illuminate\Database\Eloquent\Factories\Product" not found (View: C:\xampp\htdocs\ecom-2
esources\views\frontend\orders\view.blade.php)
Hello sir I've got this error (Attempt to read property "orderitems" on null) in view-order yet my order_table has a record init.
Just check if you have given the right column names and conditions in the query builder.
You can also try dd() to check what data you have in your variable.
Hi dear please help me, failed to load the resources of view-order, 404 | Not Found, how to solve it problem
Check the description for corrections.. i had missed to show few things in the video.
@@SharmaCoder alright then thank you
Please need a help
how did you declare total_price in database migrations
$table-> string ('total_price');
Yes $table->string('total_price'); ..and just add that field in your database table manually incase you have already migrated the table.
@@SharmaCoder default value is it null or not because I can't recover the total price
Always display 0
It will not be nullable.. bcz when ever the order is placed there will obviously be some amount. So we are not keeping it as nullable
@@SharmaCoder thank you so much sir it works
where is the relationship between orderItem and product
hi
orderItem.php
public function products()
{
return $this->belongsTo(Prouduct::class,'prod_id','id');
}
Sir could you plz tell me how many videos are left to finish this project???
Please Help me