Next.js 13 Full Stack E-commerce App #8 | Handle Cart, Add/Delete Products from Cart

preview_player
Показать описание
Git Repo Link:

⚙️ Gadgets I use for Recording:

💻 Laptop - Macbook PRO M1 - 16/512

🎤 MIC - Samson Technologies Q2U USB/XLR Dynamic Microphone

🖱️Mouse - Logitech G402 Gaming Mouse Hyperion Fury USB, Black

⌨️ Keyboard - Logitech K380 Multi-Device Bluetooth Keyboard

🖥️ Monitor - UltraSharp 24-Inch Screen Led-Lit Monitor (U2419H)

In this video, we will learn how we can handle the cart of the front end. We will add our cart items to local storage and then also add all cart items in the state.

Do ask your question in the comments, and I do give replies to all comments.

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

I was following another tutorial for another ecommerce website, but they were using Next js pages router. As a challenge I still followed that tutorial. I was stuck at this stage for a long time because they just passed this information as props to the components but I couldn't passs props to the {children}. Redux was out of my scope and didn't use Context API before. Thanks🤗

MaazShaikh-jifq
Автор

My techBrother in Code, you are my personal hero. I love u <3

gabrieldiaz
Автор

Amazing Ghulam! I really like your methodology - thanks, man! 😃

TerryMitchell
Автор

Such an amazing content, you´re the best, it would be great if in another project you could make the cart off canvas instead of in another page, but still, what a wonderful course, thanks a lot

diegoavendanohernandez
Автор

When i try this make GlobleProvider and impoet in Layput showing Error: unsupported Server Component type: undefiend

AnisKhan-pqiq
Автор

How did the cart state got cartItems property ? where is it defined ?

eternaleffect
Автор

hello Sir
when i do this
<Header />
{children}
it works

but when i follow the video on do this
<GlobalProvider>
<Header />
{children}
</GlobalProvider>
it doesn't work maybe you have an idea why is that?
I'm at 3:51

neveriodev
Автор

Hello Abbas, I could not add the default product(no photo one) to the cart, as I know there is no URL for the photo. TypeError: Cannot read properties of undefined (reading 'url')
after clicking add item button item is added to the cart but when I went back to the home page and then clicked add item button for the same product again, the button was not able to add an item to the cart, only we can increase the same type of item inside a cart page, could you give some guidance to fix it?

Thanks

akhror-oshie
Автор

Sir i am using relax but why this eror is coming

mdbadhon
Автор

Why we made header as client component ..pls anybody reply

Gurpreetsingh-vvox