• Hi,

    Is it possible to hide Add to Wish List button for users that are not logged in? Or if not, to make it work for them. Now after being not logged and adding to Wish List, the list is empty. It would be great to hide this button if the user is not logged.

    Regards,
    Rafal

    • This topic was modified 7 years, 4 months ago by Rafx.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Hey!

    I’m pretty sure it’s an easy path to hack into the plugin and check if user exists before displaying the button.

    Although i’d advice against it, since it would mess up with the usability. You see, when the user is not logged in, the wishlist is stored within the session variable (compare, for instance, is always there for some reason). From what i’ve observed, the session is being reset daily, so everyday the wishlist will be cleaned for non-logged in users. Which is ok, since you can never know if they’re coming back, but having a wishlist in place is an extra tool to keep the users on the website longer.

    My 2 cents…

    Thread Starter Rafx

    (@rafx)

    Thank for the answer. This would be ok if adding to Wish List for not logged in users worked. But now if somebody is not logged and adds some items to Wish List, the Wish List is empty. Does not remember items for them. Maybe clicking on add to Wish List could redirect to Register or Login for if the user is a guest on the site. That would work better then.

    There might be 2 reasons for it happening:
    1) Session duration, therefore i suggest looking into this discussion: https://stackoverflow.com/questions/520237/how-do-i-expire-a-php-session-after-30-minutes
    2) Caching: if you have cache that creates static html pages, it may be the reason why the wishlist does not get populated.

    Thread Starter Rafx

    (@rafx)

    Thanks for the link. I don’t use caching yet.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hiding Add to Wish List button for not logged in users’ is closed to new replies.