This topic has 6 replies, 3 voices, and was last updated 7 years by Radu.

  • Author
  • #167903
     Craftily
    Participant

    I’ve watched and think I can follow this video about how to add member details to the list view.

    https://archived.seventhqueen.com/kleo/article/add-extra-profile-fields-show-certain-profile-fields-member-directory

    However I’d like to add a button that links to the member’s store if they have one (I am using WC Vendors).  I see that the User Switching app adds a button (‘switch to’) so realise it’s possible, just can’t figure out how.

    A related question – is it possible to change the member css based on a profile field such as ‘vendor’?  Would love for vendors to be a different colour (eg black as in the video), normal members white.

    Thanks

    #167968
     Laura
    Moderator

    Hello, will assign the ticket to a higher support level who can help and advise you in your query.
    Thanks! ?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #168090
     Radu
    Moderator

    Hi,

    You can take a look here: https://archived.seventhqueen.com/forums/topic/add-member-type-class-in-member-dyrectory#post-167832

    It’s something similar that allows you to target specific CSS for certain member types.

    Can you please provide an example shop of a certain user? The shop URL exists on some BuddyPress profile field to can pull that in members directory? Also, you can ask the WC vendors about a function that generates the shop URL by member id.

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #168136
     Craftily
    Participant

    Thanks, I’ll look into this. Nice way to change border colours on the avatars, I like that.

    The type is specified as ‘vendor’ and is currently used to pull in a button on the profile header as below. I just need to do this on the member block too, and maybe change the text ‘Private Message’ to just ‘Message’ or ‘PM’ to fit it in.

    Attachments:
    You must be logged in to view attached files.
    #168426
     Radu
    Moderator

    Hi,

    Canoot see any profile cuz it’s displayed maintenance page,
    Provide admin credentials to can take closer look

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #168603
     Craftily
    Participant

    Hi Radu

    Anna at WC Vendors helped out with some code for this – here it is in case it’s useful for anyone else:

    COPY CODE
    /* visit store on kleo bp members page */
    add_action('bp_directory_members_actions', 'wcv_vendor_store_members_page');
    function wcv_vendor_store_members_page() {
    		$vendor_id 	= bp_get_member_user_id();
    		$shop_name 	= WCV_Vendors::is_vendor( $vendor_id );
    		$store_url  	= WCV_Vendors::get_vendor_shop_page( $vendor_id );
            $sold_by 	= '<div class="generic-button" id="post-mention"><a href="'.$store_url.'" class="send-message">Visit My Store</a></div>';
    		if (class_exists('WCV_Vendors') && class_exists('WCVendors_Pro') && WCV_Vendors::is_vendor( $vendor_id ) ) {
    		echo $sold_by;
    		}
                  
    }

    (raw gist in case hte above code doesn’t display properly)

    Here’s how it looks:

    Cheers

    #168748
     Radu
    Moderator

    Hi,

    That’s great

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?