Laravel 5.2 PHP - Build a Shopping Cart - #9 Cart Views

preview_player
Показать описание
Tutorial on how to build a Shopping Cart using the Laravel PHP Framework (5.2).

Рекомендации по теме
Комментарии
Автор

This is astonishing, absolutely astonishing. Instructor speaks very well, good pace and very understandable. Code is well written and everything is explained well. You really do learn alot from this course.

toomass
Автор

I am using Laravel 7 and this still works! It's awesome. You are awesome. Thanks dude :)

edwinchp
Автор

It is great toutorial the explanation is very easy anf frequently understandable before this i was tens how to make cart and many thinks rolling in my mind but after watching your toutorial its clear now really it is best tutorial and you are best teacher thank-you much love from india 😃

MeAsh
Автор

i Love the way you have paced the tuts ...thank you soo much

yashonathreddy
Автор

You have mentioned wrong spelling of toggle, but still its working in your video, Whereas at my end, for the same code, it does not show drop down.
<div class="btn-group">
<button type="button" class="btn btn-primary btn-xs dropdown-toogle" data-toggle="dropdown">Action <span
<ul class="dropdown-menu">
<li><a href="#">Reduce by 1</a></li>
<li><a href="#">Reduce All</a></li>
</ul>
</div>

dhanashreedeshpande
Автор

Very high quality lessons. I would like to see more new videos in your performance

alessagelespi
Автор

You are great Developer and your explain is great

ashrafsaleh
Автор

Can you please include the tutorial for delete and update of particular product also?
Thanks in advance :)

bipensawden
Автор

sir, please complete this series as soon as possible. i'm waitting your next videos. pls pls

mdhemelrana
Автор

ty again, I'm building my father's shop page, and this is just exactly what I need. I'd like to know if you will implement some kind of search bar, to wait for your explanation in the next videos, or look for it somewhere else

Thank you again!

gonzalopolo
Автор

Thank you so much for make awesome tutorial.

thereportserverid
Автор

#awesome... many thanks for the tutorials... you are doing an amazing job mate... :-)

mehtabhabib
Автор

Awesome tutorials as always. Following your angular2 CLi tutorials also,
I have a query to ask you.
how to reduce /remove specific item from shopping cart?

i tried Session::forget('cart', ['items'=>$id])
but it deleted my whole cart.

can u please describe this functionality.?
I am fan of your level of describing each and every thing. :) (y) good work . Keep it up.

FaisalArif
Автор

When I click the items the quantity is not increment I followed you code line by line

Автор

I spent 5 hours on only single error. Looked at the whole code and re wrote everything. In the end I found that I was only missing ')' this bracket =D

amjadc
Автор

hey guys. if you guys have the same problem as me on increment quantity on the shopping cart, you could try to change the $oldCart and Session. somehow i dont know why or whats the reason of changing the codes make it work.

try to view my codes and try to apply it okay. BTW im using Laravel 5.4.
change in your ProductController.php

the // is the codes from the tutorial i comment it so that you can know which one that i change. Good luck!
public function getAddToCart(Request $request, $id){
$product = Product::find($id);
$cart = Session::has('cart') ? Session::get('cart') : null;
//$cart = new Cart($oldCart);
if(!$cart)
{
$cart = new Cart($cart);
}
//$product = $product->id;
$cart->add($product, $product->id);

Session::put('cart', $cart);
//$request->session()->put('cart', $cart);

return
}

shakinahazmansa
Автор

for the undefined variable products error
in
public function getCart(){
if(!Session::has('cart')){
return view('shop.shopping-cart');
}
$oldCart = Session::get('cart');
$cart = new Cart($oldCart);
return view('shop.shopping-cart', ['products' => $cart->items, 'totalPrice' => $cart->totalPrice]);
}


You may have missed the ! before Session in the if condition

pasanglama
Автор

Haha, I can get that feeling, each time the modified app directly and properly run, it likes I win the lottery

ethanwang
Автор

I see that when you press add to cart the page doesnt refresh, however when I do it, the page refreshes. Any clue how I can fix that and make it not refresh after I add something to the cart?

mrzink
Автор

If I have 100 items. I add the 99 item to the cart => the page of the shopping cart will be reloaded and it shows me again the firsts products and not the 99 product. How can I do so that after adding an item the page reloads and goes exactly where the 99 item was? Thanks a lot

maurirobayo