![]() |
Keeping the users loged in and keep anonimous users cart content
Problem:
How to keep users logged in and anonymous users to keep cart and wishlist contents. In auth.php find the line PHP Code:
and replace it with... PHP Code:
in config.php find the line PHP Code:
PHP Code:
in modules\Users_online\registered_user.php find the line PHP Code:
PHP Code:
This should keep the user session id for 6 months and everyone who has been logged in will be remembered during that period. What is even more important, anonymous users cart will stay remain. Important: Please try it on a test server before you implement it! |
Re: Keeping the users loged in and keep anonimous users cart content
virtual,
How would I test it? 6 months is a long time :) |
Re: Keeping the users loged in and keep anonimous users cart content
Quote:
:-) Yes, it is. I'm using it currently on line on www.smee.hr and it seams it works. You can try it there. Try to put some products in a cart, close the browser and open it again. I think it works, but you never know where can be a bug. |
Re: Keeping the users loged in and keep anonimous users cart content
If you use different browser if won't keep the info there. Not sure if this can qualify as a bug.
|
Re: Keeping the users loged in and keep anonimous users cart content
Well, so far so good.
I'll return in a couple of days and see if my cart has still products in it. By the way, nice site :) |
Re: Keeping the users loged in and keep anonimous users cart content
I don't think it's a bug. Each browser creates its own cookies, doesn't it?
|
Re: Keeping the users loged in and keep anonimous users cart content
Quote:
That's right. You can't do anything here. |
Re: Keeping the users loged in and keep anonimous users cart content
Nevr mind then. I was thinking the browsers share the cookies, same format and read them from one location. Everyday learn something new.
|
Re: Keeping the users loged in and keep anonimous users cart content
I have returned to http://www.smee.hr after several hours and, unfortunately, my cart is empty.
I'll give it another try. Also, this line: Quote:
sets the session length for 2 months, not 6. Is that what you wanted? |
Re: Keeping the users loged in and keep anonimous users cart content
Once again, after 2:30 hours, I returned to your store, virtual@croatia, but the cart is empty again.
|
All times are GMT -8. The time now is 03:30 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.