Well done guys!! So happy with UsersWP

This topic contains 8 replies, has 4 voices, and was last updated by  Patrik 4 years, 9 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #4763

    Tony
    Expired Member
    Post count: 147

    Hi Guys
    So I spent the weekend banging my head against the wall searching for something simple, so I could impress my boss with my developer prowess.

    We have to create user profiles that are customized, and I had to put the woocommerce products for the particular use on their new user page.

    I kept digging and only found the php snippets, but not being a php coder I said “OMG can’t there just be a shortcode for this!! since I’m putting it in DIVI.

    So after a few days of banging my head on the search engines, I thought — you know, I’ll ask the guys are UsersWP

    BUT GUESS WHAT!! You already have it as an add on.!

    So my question is, that has a shortcode right? To display their products that they created on their profile page.

    It’s a little known fact that products have an author field, so this works well.

    Mark

    #4764

    Alex Rollin
    Moderator
    Post count: 27815

    Once you install the addon you can revisit the settings for the addon, update those, then the settings for the profile to choose to display the tab.

    #4765

    Paolo
    Site Admin
    Post count: 31206

    So my question is, that has a shortcode right? To display their products that they created on their profile page.

    It is not a shortcode. There are options to show a tab in the profile with products created and another for orders made.

    Thanks

    #4766

    Tony
    Expired Member
    Post count: 147

    Can you create a shortcode for it for me as a feature request?

    Basically the woocommerce shortcodes work fine except that I can’t locate how to tell the standard woocommerce product shortcode to show the authors products.

    You have that piece.
    Can you shortcode it for me so I can use it in a divi element?

    That will make it easy fof us non php guys to use in the pagebuilder.

    #4767

    Paolo
    Site Admin
    Post count: 31206

    Showing a list of products on the Author page or show a list of products by author on a normal page are not the same thing.

    You should request this to WooCommerce support.

    Thanks

    #4768

    Paolo
    Site Admin
    Post count: 31206

    In a not so far future we will allow to design profile page with Builders like GeoDirectory, but we are not there yet…

    #4769

    Tony
    Expired Member
    Post count: 147

    ok I think that’s my expectation.

    Geodirectory is shortcode rich now and far easier to use. I was hoping the UsersWP was at that point, but that’s ok, I understand.

    I don’t need a fully robust plugin, I just need this one piece for the woocommerce products.

    If you could speed up this one little shortcode for me so I can use it, that would be great. I’ll have to find a workaround for now.

    If not, I understand, but will have to find a different solution.

    I think Divi allows php in a particular widget.

    #4770

    Tony
    Expired Member
    Post count: 147

    or, if there is a snippet of php fro that tab, can you give me that?

    #4772

    Patrik
    Moderator
    Post count: 1971

    Hi,

    You have custom requirements and we do not provide support for customization but you can hire a developer to do that easily.

    You can try the following code in your currently active theme’s functions.php file:

    add_shortcode('uwp_wc_products', 'uwp_wc_products_cb');
    function uwp_wc_products_cb(){
    
        if(!is_user_logged_in()){
            return;
        }
    
        $user = get_userdata(get_current_user_id());
        $output = '';
        if(function_exists('uwp_generic_tab_content')){
            ob_start();
            uwp_generic_tab_content($user, 'product', __('Products', 'uwp-wc'));
            $output = ob_get_clean();
        }
    
        return $output;
    }

    You can then use the “[uwp_wc_products]” shortcode for displaying current logged in user’s products.

    Regards,
    Patrik

Viewing 9 posts - 1 through 9 (of 9 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket