BuddyBoss Home – Web Support Forums Themes OneSocial theme The heart button/function

Viewing 6 posts - 1 through 6 (of 6 total)
  • Question

    #67784
    @omarobaid

    Hi there,

    Is there a way to make the heart “Favourite” button display for logged out users too? I have changed the CSS so that it displays without the hover for now for logged in users.

    So when logged out users click on it, it would ask them to login or register. As no one knows that they can like products unless they register.

    Also, would it be possible to make it so that when they click on it, the login/register pops up rather than redirect to the “My Account” page?

    Finally, would it be possible to have a like counter for this heart button? It would be more interactive to see that some people liked a product and how popular it is etc?

    Answers

    #68461
    @vapvarun

    Hi @omarobaid, It will need to modify those template files which contain fav button and wrap this one with conditional logic to link it back to login/register page when user is not logged in.
    You can use your developers to make those edits, I can help to guide which tempalte files need to be modified.
    Regards
    Varun Dubey

    #68467
    @omarobaid

    Sure, please let me know the templates that need to be amended.

    Also, as I am the developer here. Could you guide me (or show me a simple code) that I can use to achieve this?

    These are the main things I am looking for:

    – The heart (favourite) button display at all time (logged in or logged out)
    – If the user is logged out and click on it, it pops up the log/register form.
    – Add a counter of how many likes the product got.

    Finally, I would like to add the words “Add to favourite” next to the heart button on a single product page. How can I do this?

    #68548
    @vapvarun

    Hi @omarobaid
    you can remove these to actions and add yours
    it’s defined inside
    /buddyboss-marketplace/includes/main-class.php

    
    add_action('woocommerce_after_shop_loop_item', array( $this, 'bm_product_to_favorites' ), 9 );
    add_action('woocommerce_after_add_to_cart_form', array( $this, 'bm_product_to_favorites' ) );
    

    bm_product_to_favorites is also defined inside same file, you can use this as reference to define your own function.

    Regards
    Varun Dubey

    #69271
    @conscious-crafties

    I would have thought this would be built in functionality for non logged in users.

    It’s functionality that every shop owner would like to see because:
    1. Customers see a benefit to creating an account on our sites
    2. Encourages customers to favourite items to then add to basket

    Please can this be added to the list of things to add in future please rather than each of us developing ourselves?

    I previously disabled my wishlist plug in as I hadn’t realised the heart did not appear for logged out users till I saw this thread!

    Thank you,

    Karen

    #69593
    @anve

    Hi @conscious-crafties,

    Thanks for the suggestion , we’ll add this in our suggestion list .

    Regards
    Anve

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this question.