The concept makes sense for a large company that does a lot of guests and user tracking. This device id allows to reconcile everything the user did as guest once he logged-in. Said differently, before the user logs-in (he's a guest) a device ID is created for his browser and all the actions he does are recorded (visit this and that)... then when he logs-in the device ID is associated with the user so the company knows how he behaved before logging-in and they can use that for marketing purposes and segmentation. If he uses another computer or mobile they also know it.
Thank u so much Dennis for this great tutorial. It’s much simpler than the one for your e-commerce website(guest user). This way doesn’t require too much coding and easy to understand as well. Keep it us Dennis. You’re awesome.
I know I was so mad at myself for not using this method in the original course! Oh well, I'll just use it in the next one and this way you get to see different methods ;)
Hey Dennis, I'm following you on your Python project and I'm waiting for u to continue with other features for the ecommerce website. You are doing a great work for the community! thank you and keep pushing!
Here's how i did it. --> stored my cart in the request.session variable and mapped out an url to /update_cart/. When you POST that url with the correct information (via JS fetchAPI) the session variables are updated. Also, I only create the order when is placed.
Great video man thank you! one question though, once a device ID gets stored in the database, does it just stay there forever? How do we manage this? because obviously someone can delete their cookies and when they came back, they would be assigned a new device ID
I want to request you a video series. Plz make videos on making blog app with django. It would be very helpful to me. And thank you for helping us. I really appreciate your work. Love your videos. Keep going
I think there are a lot of options to do this. you can use django sessions to store the data of the unauth cart and when the user signs up shift his cookie items in the auth cart. you can use js as well to do this. and use ajax to do it without the page reload. because when you do this without ajax, whenever you change the cartitrm quantity there are a lot of cached pages django stores due to which one need to go back the same times he ran that change quantity view.
Hi Dennis. After closing the browser, cookies assign a new ID instead of assigning the old one . I have set SESSION_EXPIRE_AT_BROWSER_CLOSE = False and SESSION_COOKIE_AGE = 1440 * 60 . Do you have an idea how to fix it?
Can someone pls tell me why my items are not showing up on my card, it simply says no items in cart. I did all the steps the same way Dennis did. The orders and everything are showing up on my admin page.
Hey! Does anyone have the same problem? My website doesn't work on Apple products. Cookies aren't initialized, although I have enabled them in my settings.
Curiosity question: how to handle multiple cart sessions from one device? If my device id is abc123, and I have multiple accounts with a website, if a user logs in or out, which cart do you show on logout? Last, one or the other, or none? I realize a user shouldn't have multiple accounts in most cases. Bit of an edge case I guess.
Bro ur's javascript dyanamic table sorting logic doesn't working fine with more than 10 object values plz gimme a suggestion how to sort array of objects
Hi dennis do you think its possible to have a field in models.py that is concatenate of previous two fields like Firstname = models.charfield Lastname = models.charfield Fullname = firstname + lastname I want a column of full name in my table that is filled when both names are fill null value can also be used if any field is not present
If you just want to return a full name you can concatenate using a model method. If you actually want to store the full name in the database as one field you can use signals to check for this and it will generate a full name if one is present :)
I was thinking about storing anonymous cart data in session. It's more secure then cookies but also automates deleting unneeded anonymous data. What do you think?
That could work. The reason I don't use that method is because it standard practice to store this data even when a user closes the website. You don't want to force the user to re-add items on their next visit.
please can you also add a readME on your project, on how to install the project locally. for those that can't run it locally here is a sample: - git clone 'link' - cd into folder - install virtualenv - start virtualenv - pip install requirements.txt - pip install pillow (it may fail to be installed as it did for my case) - makemigrations - migrate - runserver
One thing that might be an issue here: if a user visits in Incognito mode. There is no device cookie then as far as I understand. The whole flow just breaks for me.
Hi Dennis, thank you too much for the great effort you made. Is it possible to provide the source code of the full e-commerce project after module 5, but instead of using the original module 4 method for the guest user, use the new way you explained in this video using the concept of the device ID. Many thanks to you Dennis.
Hey Ivy,, I was requesting if you could make a vedio on logging in in the Ecommerce website,, I tried to used your video on Django crash course but whenever I tried to log in a new user, he is added in the users list but an error comes that there is no customer,, please help
I had this error at some point, it will only occur for a superuser, you will have to go to admin to customer class and add the user as a customer manually
This concept is really awesome!But,Brother I get NOT NULL constraint failed: store_customer.user_id when i add to cart,I request you to show how to incorporate this code to the previous when you get time.
Please how can i keep history in Django after each update, let's say i have items already in my database but each time i update those items, i want to see the history of the old one...please someone should help me...thanks......Nice video Dennis ..thanks man
Hey Dennis I've watched ur javascript array of objects sorting table,it works fine for 5-7 rows but not work for more than 7 rows. plz explain how does javascript comparator,comapres each value with another. That'll give us an idea to implement ours logic. Yours video: th-cam.com/video/Q9aYU1Ufkpk/w-d-xo.html
Hi.. I am aakash from india. I am junior python developer and I lerned from your TH-cam channel. And I want to make you to create video on "how to customise django Admin theme and dashboard view." which is by default in the system package. please help me if possible to do that for you .🙏🙏🙏👍👌👌👌👌👌👌👌
Don't forget to check out my Complete Django course! dub.sh/NvGboTI
The concept makes sense for a large company that does a lot of guests and user tracking.
This device id allows to reconcile everything the user did as guest once he logged-in.
Said differently, before the user logs-in (he's a guest) a device ID is created for his browser and all the actions he does are recorded (visit this and that)... then when he logs-in the device ID is associated with the user so the company knows how he behaved before logging-in and they can use that for marketing purposes and segmentation. If he uses another computer or mobile they also know it.
Thank u so much Dennis for this great tutorial. It’s much simpler than the one for your e-commerce website(guest user). This way doesn’t require too much coding and easy to understand as well. Keep it us Dennis. You’re awesome.
I know I was so mad at myself for not using this method in the original course! Oh well, I'll just use it in the next one and this way you get to see different methods ;)
Always improving, that's the way to success. Thanks Dennis!
Good to see you in action. Thanks for the update.
:)
Seriously bro......., that's a very good content you have provided to the youtube. Thanks a lot.
Hey Dennis, I'm following you on your Python project and I'm waiting for u to continue with other features for the ecommerce website. You are doing a great work for the community! thank you and keep pushing!
Bro you helped me unbelievably great, shake your hand with immense gratefulness !!!
Dennis plz make the add to cart functionality that add items without reloading may be with the "ajax call".
Here's how i did it. --> stored my cart in the request.session variable and mapped out an url to /update_cart/.
When you POST that url with the correct information (via JS fetchAPI) the session variables are updated. Also, I only create the order when is placed.
I did it with an ajax request and updated the DOM just like the way ajax is made for. :D
Dennis We are very grateful for your hardwork. Could you make a tutorial on how to use Git?
God bless you Dennis. Thank you for good playlist tutorial 🌝🔥
can we store all the cart details in the cookies instead of storing it on a server's database?
Great video man thank you! one question though, once a device ID gets stored in the database, does it just stay there forever? How do we manage this? because obviously someone can delete their cookies and when they came back, they would be assigned a new device ID
I want to request you a video series. Plz make videos on making blog app with django. It would be very helpful to me. And thank you for helping us. I really appreciate your work. Love your videos. Keep going
Unless I’m mistaken, the Django documentation has a blog tutorial on their website 🤙🏻
@@raymondsutton6348 ok.can you give me the link?
this actually helped me out so much
Good work my Teacher
I think there are a lot of options to do this. you can use django sessions to store the data of the unauth cart and when the user signs up shift his cookie items in the auth cart.
you can use js as well to do this. and use ajax to do it without the page reload. because when you do this without ajax, whenever you change the cartitrm quantity there are a lot of cached pages django stores due to which one need to go back the same times he ran that change quantity view.
Please continue ....do more videos on django
If you were to send details of the order to the seller in a PDF or excel spreadsheet, how can that be done? Any ideas please?
Hello Sir, i will be happy if you can defined how to add color and size to the cookies.
Hi Dennis. After closing the browser, cookies assign a new ID instead of assigning the old one . I have set SESSION_EXPIRE_AT_BROWSER_CLOSE = False and SESSION_COOKIE_AGE = 1440 * 60 . Do you have an idea how to fix it?
Nice! Just want to show your page some love and support! 😀
why did you make a 1-to-1 between customer and users instead of using the user model?
The video was very helpfull !! But Dennis Iam eagerly waiting for a unboxing video of silver play button !!😊😊
Me too
Haha thats gonna be crazy! I appreciate your constant support Nishant :)
@@DennisIvy And we all appreciate your constant tutorials, guides, tips and many more :)
Great video, thank you very much!
It's possible to implement this using Django sessions?
Can someone pls tell me why my items are not showing up on my card, it simply says no items in cart. I did all the steps the same way Dennis did. The orders and everything are showing up on my admin page.
im using same logic but my problem is that when i log in / logout the device cookie is still the same , any ideas?
Hey! Does anyone have the same problem? My website doesn't work on Apple products. Cookies aren't initialized, although I have enabled them in my settings.
Curiosity question: how to handle multiple cart sessions from one device? If my device id is abc123, and I have multiple accounts with a website, if a user logs in or out, which cart do you show on logout? Last, one or the other, or none? I realize a user shouldn't have multiple accounts in most cases. Bit of an edge case I guess.
Can i use sessions in a backend without doing js stuff?
Bro ur's javascript dyanamic table sorting logic doesn't working fine with more than 10 object values plz gimme a suggestion how to sort array of objects
how do you use the login button from your video for customer view?
What is the reason for doing the customer, created =??
Most Amazing Nice Feature.
Thank you so much...... Sir.
I was really exited to show this new method :)
Can we notify the users when new product come with web push notifications? If yes pls make video on that
How about if we use localstorage with javascript ?
So If the guest adding some products to the cart and then after he decides to register, after registration gonna have an empty cart?
Hello, what plugin do you use for localhost in sublime text? @Dennis Ivy
hey man, how would i make it so that it only shows the users orders in cart
Hi dennis do you think its possible to have a field in models.py that is concatenate of previous two fields like
Firstname = models.charfield
Lastname = models.charfield
Fullname = firstname + lastname
I want a column of full name in my table that is filled when both names are fill null value can also be used if any field is not present
If you just want to return a full name you can concatenate using a model method. If you actually want to store the full name in the database as one field you can use signals to check for this and it will generate a full name if one is present :)
@@DennisIvy thankyou so much
you are amazing Dennis
I was thinking about storing anonymous cart data in session. It's more secure then cookies but also automates deleting unneeded anonymous data. What do you think?
That could work. The reason I don't use that method is because it standard practice to store this data even when a user closes the website. You don't want to force the user to re-add items on their next visit.
@@DennisIvy Using your method an attacker could trash the database by constantly clearing device ID. Is there a method to prevent that?
thanks very good tutorial. can i do with vue.js?
Does't it viaolate the unique contraint of username as none field
please can you also add a readME on your project, on how to install the project locally.
for those that can't run it locally
here is a sample:
- git clone 'link'
- cd into folder
- install virtualenv
- start virtualenv
- pip install requirements.txt
- pip install pillow (it may fail to be installed as it did for my case)
- makemigrations
- migrate
- runserver
Can you show, how we can implement slider function for images in homepage?
He have it here: th-cam.com/video/Y36QpYcnbQY/w-d-xo.html
See if you can implement it in this project
@@Arbadjie I tried that, but it isn't looping through all products in homepage but works well in detail page.
One thing that might be an issue here: if a user visits in Incognito mode. There is no device cookie then as far as I understand. The whole flow just breaks for me.
Factoring into a method that returns the user makes sense to me, not to duplicate the same code in 2 "product" and "cart" views.
how we are going to delete this cookie when sign up ?
you the man, Dennis. Thank you!
Very cool, love your videos motivational and clear
I appreciate that!
@@DennisIvy can you implement our of stock products.. in cart
Hi Dennis, thank you too much for the great effort you made.
Is it possible to provide the source code of the full e-commerce project after module 5, but instead of using the original module 4 method for the guest user, use the new way you explained in this video using the concept of the device ID.
Many thanks to you Dennis.
Hey Ivy,, I was requesting if you could make a vedio on logging in in the Ecommerce website,, I tried to used your video on Django crash course but whenever I tried to log in a new user, he is added in the users list but an error comes that there is no customer,, please help
I had this error at some point, it will only occur for a superuser, you will have to go to admin to customer class and add the user as a customer manually
Bhai can you plz tell me how to save shanti website globally .So that all one use it.
Can you show to make store credit and discount code?
As Usual you did the best💞
This concept is really awesome!But,Brother I get NOT NULL constraint failed: store_customer.user_id when i add to cart,I request you to show how to incorporate this code to the previous when you get time.
Thank you so much! So useful
Please how can i keep history in Django after each update, let's say i have items already in my database but each time i update those items, i want to see the history of the old one...please someone should help me...thanks......Nice video Dennis ..thanks man
Check out Django-easy-audit
Can you plz make a series on chat app plz?
dennis ..make a videos on maps in django
thanks for what you do 💪👍
My pleasure!
Awesome as always
:)
use a context processor for that customer device thing. ;)
TYSM FOR THIS!!
bro please make video django practices and website tutorial and practice task
Niceeeeeeeeeee bro 🔥👍💪✊ Catch my royal like !
how to trace users ip,location, by using cookies
Great, thanks for it.
5:16
Just a reminder for me.
Thank You so much
yes, this is really interesting..
it would really help a brother up if out of 1,3k viewers at least half would click that like button,
Hey Dennis I've watched ur javascript array of objects sorting table,it works fine for 5-7 rows but not work for more than 7 rows.
plz explain how does javascript comparator,comapres each value with another.
That'll give us an idea to implement ours logic.
Yours video: th-cam.com/video/Q9aYU1Ufkpk/w-d-xo.html
Hi.. I am aakash from india. I am junior python developer and I lerned from your TH-cam channel. And I want to make you to create video on "how to customise django Admin theme and dashboard view." which is by default in the system package. please help me if possible to do that for you .🙏🙏🙏👍👌👌👌👌👌👌👌
thanks
💖 U Dennis
Much appreciated Teny :)
good
Денис Иванов смотрится хуже, чем Денис Плющ?)
Проще запомнить :)
still using var in 2020 +
ok
Sir waiting for zoom effect on slider
Please put subtitles for your words