Laravel 8 E-com Part-28 : Show Orders and order details in user dashboard | Display All Orders

Поделиться
HTML-код
  • Опубликовано: 5 ноя 2024

Комментарии • 50

  • @MohamedHassan-pj2cl
    @MohamedHassan-pj2cl 2 года назад +3

    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??

  • @minhangquang1144
    @minhangquang1144 2 года назад

    I have searched the whole series but haven't found anything. Can you clarify the placeorder functions sir? In short, is this series complete?

  • @m_artistry7696
    @m_artistry7696 2 года назад +1

    Sir my belongsTo relationship is not working its saying App\Models\belongsTo\Product not found

  • @nandopookey9195
    @nandopookey9195 Год назад

    Thank you so much sir

  • @RomuloDavidValerio
    @RomuloDavidValerio 10 месяцев назад

    hello can you help the total_price to store and display the price

  • @najsw
    @najsw Год назад +1

    Hi, sir! Can this project register and login for multiple user ?

  • @blendonfantonidasilva2228
    @blendonfantonidasilva2228 3 года назад +3

    I have an error 404 not found problem when I press to see my orders view. Would you help me ?

    • @SharmaCoder
      @SharmaCoder  3 года назад +1

      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.

    • @blendonfantonidasilva2228
      @blendonfantonidasilva2228 3 года назад +2

      @@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 😭😭😭

    • @SharmaCoder
      @SharmaCoder  2 года назад +3

      Did you solve it??
      I just noticed one small part is missing from the video. I have written the corrections in the description.

    • @DaudiNungwana
      @DaudiNungwana 2 года назад

      @@SharmaCoder thanks... am following you on these tutorials

  • @umranjabbar3853
    @umranjabbar3853 2 года назад

    how i directly redirct to the order view page after placing order

  • @hasanabdiali8915
    @hasanabdiali8915 3 года назад +1

    Thanks sir

  • @umranjabbar3853
    @umranjabbar3853 2 года назад

    why you dont make any kind of foreign relation in database

  • @easytechbangla1510
    @easytechbangla1510 2 года назад

    How add grand total amount in word?
    Indian ruppe INR

  • @bhupendrabalapure9480
    @bhupendrabalapure9480 2 года назад

    Hello sir, {{ $item->products->name }} some time this code works sometime not .please give the solution sir.

  • @Jannat-ul-Mawa
    @Jannat-ul-Mawa 2 года назад

    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

  • @kerynwong6079
    @kerynwong6079 2 года назад

    Hi, How do you declare total_price in CheckoutController? I believe that’s not declare like this $order->total_price = $request->input(‘total_price’)

    • @SharmaCoder
      @SharmaCoder  2 года назад

      Are you sure you've commented on the right video?

    • @kerynwong6079
      @kerynwong6079 2 года назад

      @@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 🙏

    • @SharmaCoder
      @SharmaCoder  2 года назад +1

      Oh i remember.
      Just check out this video and also the video description
      ruclips.net/video/UwLCR_IbxY8/видео.html

    • @SharmaCoder
      @SharmaCoder  2 года назад +2

      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.

    • @kerynwong6079
      @kerynwong6079 2 года назад +1

      @@SharmaCoder oh thank you sir for your explanation🙏🙏 You are so kind😭

  • @blendonsilva9345
    @blendonsilva9345 2 года назад +1

    I have a 404 error problem | NOT FOUND. when trying to load the view-orders page. Can someone help me ?

    • @SharmaCoder
      @SharmaCoder  2 года назад +1

      Show me your code..
      the tag and the Route..

    • @SharmaCoder
      @SharmaCoder  2 года назад +1

      Check the video description.

    • @nament2839
      @nament2839 Год назад +1

      @csrf

    • @najsw
      @najsw Год назад +1

      @@nament2839 thank you ahahhaha

  • @joshdevofficial
    @joshdevofficial 2 года назад

    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)

    • @deeputiwari5352
      @deeputiwari5352 2 года назад

      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');
      }

  • @rafaeldebarrossilva5842
    @rafaeldebarrossilva5842 2 года назад

    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?

  • @joshdevofficial
    @joshdevofficial 2 года назад

    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)

  • @geomelpatrickgako599
    @geomelpatrickgako599 2 года назад

    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.

    • @SharmaCoder
      @SharmaCoder  2 года назад

      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.

  • @jayanaeverything124
    @jayanaeverything124 2 года назад

    Hi dear please help me, failed to load the resources of view-order, 404 | Not Found, how to solve it problem

    • @SharmaCoder
      @SharmaCoder  2 года назад

      Check the description for corrections.. i had missed to show few things in the video.

    • @jayanaeverything124
      @jayanaeverything124 2 года назад

      @@SharmaCoder alright then thank you

  • @djarolaravel8341
    @djarolaravel8341 3 года назад

    Please need a help
    how did you declare total_price in database migrations
    $table-> string ('total_price');

    • @SharmaCoder
      @SharmaCoder  3 года назад +1

      Yes $table->string('total_price'); ..and just add that field in your database table manually incase you have already migrated the table.

    • @djarolaravel8341
      @djarolaravel8341 3 года назад

      @@SharmaCoder default value is it null or not because I can't recover the total price
      Always display 0

    • @SharmaCoder
      @SharmaCoder  3 года назад +1

      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

    • @djarolaravel8341
      @djarolaravel8341 3 года назад

      @@SharmaCoder thank you so much sir it works

  • @aymanabuharbid1708
    @aymanabuharbid1708 3 года назад

    where is the relationship between orderItem and product

    • @mohammadkiani7297
      @mohammadkiani7297 2 года назад

      hi
      orderItem.php
      public function products()
      {
      return $this->belongsTo(Prouduct::class,'prod_id','id');
      }

  • @almahmudalif7102
    @almahmudalif7102 3 года назад

    Sir could you plz tell me how many videos are left to finish this project???

  • @joshdevofficial
    @joshdevofficial 2 года назад

    Please Help me