Login Cart Persistence - Django Wednesdays ECommerce 28

preview_player
Показать описание
In this video we'll finish building out our shopping cart persistence for our Ecommerce app with Django and Python.

In the last video we saved our cart to the database when a user is logged in.

In this video we'll retrieve the cart and re-add it to the cart session when the user logs back in.

#django #codemy #JohnElder

Timecodes

0:00​​ - Introduction
1:50 - On Login Get User Profile
3:08 - Retrieve Saved Cart
3:46 - String To Dictionary JSON
5:23 - Import Cart
7:05 - Loop Dict to Session
12:10 - Update Delete Function
13:56 - Change Update Function
15:05 - Conclusion
Рекомендации по теме
Комментарии
Автор

▶ Watch Django Wednesdays Ecommerce Playlist ✅ Subscribe To My YouTube Channel:
▶ See More At: ✅ Join My Facebook Group:
▶ Get The Code

Codemycom
Автор

Hey John, I have been following you for two years. Firstly I have learnt your blog playlist. Then I started learning ecommerce from other source and also developed a project but my thirst was not satisfied. When I found your ecommerce playlist I started learning it. It's also awesome as blog playlist. I am thankful to you. I am actually a college teacher. I started learning programming just for fun but now it's my hobby and coding gives me pleaser. I think your teaching method makes it easy for us. Thank you very much. Keep teaching us as always in your style.

fantasyworld
Автор

im ready to #29, and I just started last week, im addicted to these series damn

godbernaz
Автор

Waiting for Checkout and payment gateway.

fantasyworld
Автор

Two brilliant video's bro, waited for them!

БогданСокольников-тн
Автор

Hi @Codemycom and thank you so much for this detailed course! Will you make a video about how to customise/change CSS styles for this shopping project?

alexallcool
Автор

Hey John, Sorry just catching up here from a couple weeks off! I think I may have noticed a bug with the persistent shopping cart... With the code we have implemented thus far it appears when we update the quantity from the view cart function and than log out and log back in... the quantity is not saved, it only shows last quantity item selected from adding to the cart function.... I went back between tutorials 15 and 19 to see if I perhaps made a mistake but I cant see any.... Do we want the cart quantity to retain if the user logouts after updating from there? Let me know I can clarify further if required :) Thanks for all the hard work here !

namdarcs
Автор

Hi John,
Still in the past a bit (based on how many videos I still need to complete to get to your most recent video). I however made an observation about this video. When I logout and add things to the cart, the things I add show in the cart when I log back in. Is that how you planned it to be or are we missing something?

SalamiEdwin
Автор

Couldn't we just add everything that is in the cart when user logs out? Doesn't it saves as the hustle of doing it in every function? I am asking in case we do more functions later.

simosoikonomidis
Автор

Hello, first of all, thank you for this great project, I don't know if what I'm suggesting is logical, but right now at this point I don't see it contemplated, the situation is, an anonymous user who registers 1 or more products logs in. the system and does not buy more products and logs out, what I observe is that the cart is not persisted in the database, of course I do not know if this should be corrected or is it the normal behavior of ecommerce. Greetings

joselucianocastro
Автор

8:36 you could have written product = Product.objects.get(id=key) and pass the product and not create a whole new function that is the same as add

ІванТвердий-оу
Автор

how many video do you publish to complete ecommerce Django projects?

SabbirHMukul
Автор

Do you have plans for online chat ؟For this course!

vahid-mb
Автор

Hi!
Could you please show how to view others users profiles and same time be logged in for another user.
Like: Iam Bob and want to see Johns and Marks profile, with their stuff.

poslepepper
Автор

Can we get a checkout and payment gateway fast pleaseee

nishantkhorwal
visit shbcf.ru