Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add product as a guest #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add product as a guest #5

wants to merge 1 commit into from

Conversation

xabikip
Copy link

@xabikip xabikip commented Apr 1, 2015

I have written this code and it works fine. But if the user leaves the browser or going to another page the cart is lost. Can you think of how to fix this?

@hparfr
Copy link
Owner

hparfr commented Apr 1, 2015

Create a Guest object in each addProduct call is not a good idea.

I think it's better to write a separate function who creates or load a Guest.
Then you can use addToCurrentCart function.

@xabikip
Copy link
Author

xabikip commented Apr 1, 2015

Yes, that's a good idea, but i don't know how to load a Guest. You have any idea?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants