Home Forums Plugins Add to Wishlist Support Add to Wishlist Button for users not logged in

Welcome to our community support forums! We're here to help - but if you have an urgent request for a Pro Plugin, you will get a prioritised response through our Premium Support page.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #6476
    Sharon
    Participant

    Hello,

    Do you have existing functionality where the “Add to Wishlist” button would appear when the user is not logged in so when they click on the button, they are forced to log in?

    Thanks,
    Sharon

    #6477
    ozoneboy
    Participant

    I’ve done this by positioning the wishlist manually and changing the code to:

    <?php if( is_user_logged_in() ) {
       	echo wpsc_the_wishlist();
    } else {
    	echo '<button type="button" class="button"><a href="http://yoursite.com/products/your-account/?wishlist=true">Add to Wishlist</a>';	} ?>

    Just make the url point to your wishlist page which should prompt them to login, or you could make it a fancy popup message etc.

    #6478
    Sharon
    Participant

    Thanks a lot, I will try this.

    #6479
    Michael Visser
    Keymaster

    Hi guys, please remember that the Add to Wishlist is hidden from non-logged in Users as the wishlist is linked to the registered users User ID. I recommend adding a link to the Register page where possible for non-logged in Users, hope this helps.

    #6480
    ozoneboy
    Participant

    Yes you’re right Michael but for me the wishlist is an important feature for my customers so I didn’t want to hide it. So for non-logged users I have the button linked to the account/wishlist page but it returns a message “You must be logged in to use your favourites list. Please use the tab at the top right of the page to login or register a new account.” It’s more user friendly to explain the situation than just send them to a register page.

    By the way, is adding the price to the wishlist still on your list of things to do?? I’ll buy you some beer if you do : )

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Support’ is closed to new topics and replies.