▶ Watch Django Wednesdays Ecommerce Playlist ✅ Subscribe To My KZbin Channel: bit.ly/3OBQJfN bit.ly/2IGzvOR ▶ See More At: ✅ Join My Facebook Group: Codemy.com bit.ly/2GFmOBz ▶ Learn to Code at Codemy.com ✅ Buy a Codemy T-Shirt! Take 50% off with coupon code: youtube50 bit.ly/2VC9WUN ▶ Get The Code bit.ly/47xAhWJ
@fantasyworld10879 ай бұрын
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.
@Codemycom9 ай бұрын
Thanks! I appreciate it!
@godbernazАй бұрын
im ready to #29, and I just started last week, im addicted to these series damn
@fantasyworld108710 ай бұрын
Waiting for Checkout and payment gateway.
@БогданСокольников-т1н9 ай бұрын
Two brilliant video's bro, waited for them!
@Codemycom9 ай бұрын
Glad you liked them!
@deleos374410 ай бұрын
Very clear explanation
@Codemycom10 ай бұрын
Thanks!
@alexallcool9 ай бұрын
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?
@Codemycom9 ай бұрын
No, I'm not a design guy...we're learning the functionality of the thing, not how to make it look pretty.
@namdarcs9 ай бұрын
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 !
@horror33789 ай бұрын
Good👍
@ІванТвердий-о3уАй бұрын
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
@SalamiEdwin6 ай бұрын
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?
@Codemycom6 ай бұрын
We deal with that later in the playlist
@SalamiEdwin6 ай бұрын
@@Codemycom Alright, thanks🙏
@joselucianocastro28364 ай бұрын
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
@Codemycom4 ай бұрын
No, an anonymous user can't log in. Logging in requires that you register. Your thing can't happen. If they aren't registered or logged in, then of course we don't want to save that to the database.
@joselucianocastro28364 ай бұрын
I haven't explained myself well, I'm sorry. What I mean is that a user adds 1 or more products to the cart, he logs into the system, and if within the system he does not add more products and then logs out, then we have a case in which, having added a product, he does not We have persisted in the database, of course the question was whether this operation would be logical? I have implemented this, an else to the if saved_cart: # Convert database string to python dicctionary if saved_cart: # Convert to dicctionary using JSON, para esto se importa libreria JSON #para que este json.loads() funciona se necesita tener este tipo de diccionario {"2":3, "5":1} converted_cart = json.loads(saved_cart) # Add the loaded cart dictionary to our session # Get the Cart cart = Cart(request) # Loop thru the cart and add items from the database {"3": 5, "1": 1} for key, value in converted_cart.items(): #aqui se llama al metodo add de la clase Cart, pasando el product.id y quantity # cart.add(product=key, product_qty=value) # pero a ultima hora decide hacer otro metodo en la clase Cart cart.db_add(product=key, product_qty=value) """ else: print("Me logo tengo productos siendo anonimo, este es el carro de la sesion", request.session.get('session_key')) # Get the Cart cart = request.session.get('session_key') # get the Current user Profile current_user = ProfileUser.objects.get(user=request.user) # Convert {'3':1, '2':3} to {"3":1, "2":3} carty = str(cart) carty = carty.replace("\'", "\"") print("carty es. ", carty) #Save the carty to the ProfileUser Model #current_user.update(old_cart=str(carty)) asi lo hace el current_user.old_cart = carty current_user.save() """
@joselucianocastro28364 ай бұрын
@@Codemycom I haven't explained myself well, I'm sorry. What I mean is, if a user adds one or more products to the cart, he logs into the system, within the system he does not add more products and immediately logs out, because we have a case in which, having added some product, he does not We have persisted it in the database, of course the question was whether this operation would be logical? I have implemented this, an else in case the old_cart field is empty: # Convert database string to python dicctionary if saved_cart: # Convert to dicctionary using JSON, para esto se importa libreria JSON #para que este json.loads() funciona se necesita tener este tipo de diccionario {"2":3, "5":1} converted_cart = json.loads(saved_cart) # Add the loaded cart dictionary to our session # Get the Cart cart = Cart(request) # Loop thru the cart and add items from the database {"3": 5, "1": 1} for key, value in converted_cart.items(): #aqui se llama al metodo add de la clase Cart, pasando el product.id y quantity # cart.add(product=key, product_qty=value) # pero a ultima hora decide hacer otro metodo en la clase Cart cart.db_add(product=key, product_qty=value) """ else: # Get the Cart cart = request.session.get('session_key') # get the Current user Profile current_user = ProfileUser.objects.get(user=request.user) # Convert {'3':1, '2':3} to {"3":1, "2":3} carty = str(cart) carty = carty.replace("\'", "\"") print("carty es. ", carty) #Save the carty to the ProfileUser Model #current_user.update(old_cart=str(carty)) current_user.old_cart = carty current_user.save() """
@joselucianocastro28364 ай бұрын
I haven't explained myself well, I'm sorry. What I mean is, if a user adds one or more products to the cart, he logs into the system, within the system he does not add more products and immediately logs out, because we have a case in which, having added some product, he does not We have persisted it in the database, of course the question was whether this operation would be logical? I have implemented this, an else in case the old_cart field is empty: if saved_cart: # Convert to dicctionary using JSON, para esto se importa libreria JSON #para que este json.loads() funciona se necesita tener este tipo de diccionario {"2":3, "5":1} converted_cart = json.loads(saved_cart) # Add the loaded cart dictionary to our session # Get the Cart cart = Cart(request) # Loop thru the cart and add items from the database {"3": 5, "1": 1} for key, value in converted_cart.items(): #aqui se llama al metodo add de la clase Cart, pasando el product.id y quantity # cart.add(product=key, product_qty=value) # pero a ultima hora decide hacer otro metodo en la clase Cart cart.db_add(product=key, product_qty=value) else: # Get the Cart cart = Cart(request).cart #cart = request.session.get('session_key') # get the Current user Profile current_user = ProfileUser.objects.get(user=request.user) # Convert {'3':1, '2':3} to {"3":1, "2":3} carty = str(cart) carty = carty.replace("\'", "\"") print("carty es. ", carty) #Save the carty to the ProfileUser Model #current_user.update(old_cart=str(carty)) asi lo hace el current_user.old_cart = carty current_user.save()
@SabbirHMukul10 ай бұрын
how many video do you publish to complete ecommerce Django projects?
@Codemycom10 ай бұрын
No clue, it'll go as long as I find interesting things to talk about.
@vahid-m8b10 ай бұрын
Do you have plans for online chat ؟For this course!
@Codemycom10 ай бұрын
No, that's not really a core function of an ecommerce site.
@vahid-m8b10 ай бұрын
@@Codemycom Thank you for your efforts, and i meant to talk between admin and buyers !
@Codemycom10 ай бұрын
yes I understood what you meant, my answer doesn't change@@vahid-m8b
@poslepepper10 ай бұрын
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.
@Codemycom10 ай бұрын
No, that wouldn't be appropriate for an ecommerce app. People's shopping information is private. I have other Django playlists where we do that sort of thing.
@poslepepper10 ай бұрын
Agree with you! I saw all the videos from the “Meeps”, can’t find it there too. Could you please send the link or tell in which playlists I can find it?
@Codemycom10 ай бұрын
I have a half dozen django playlists here, I have no clue, look around@@poslepepper
@nishantkhorwal707810 ай бұрын
Can we get a checkout and payment gateway fast pleaseee
@Codemycom10 ай бұрын
It'll come when it comes lol
@sma1gdz10 ай бұрын
💙💙💙💚💚💚
@Codemycom10 ай бұрын
🙂
@rxz783410 ай бұрын
Last.. 🙃
@Codemycom10 ай бұрын
huh?
@rxz783410 ай бұрын
Younglings always try to be "First", so i decided to be last...