• Resolved DeepBlue

    (@deepblue5)


    Hi

    I saw there is an integration with Woocommerce which is great

    Is there a way to integrate with Dokan, so vendors can see their products directly in a profile tab ?

    Thank you

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter DeepBlue

    (@deepblue5)

    Hi

    Yes, i know the UM woocommerce extension :

    https://ultimatemember.com/extensions/woocommerce/

    it shows the purchases on a UM tab to clients

    but what i would like is to show their products to product vendors in a tab

    how would that could be done ?

    Thank you ??

    @deepblue5

    Do you have a “Dokan” shortcode for: “so vendors can see their products directly in a profile tab” ?

    You can read about how to add extra tabs to user profiles in this guide:

    https://docs.ultimatemember.com/article/69-how-do-i-add-my-extra-tabs-to-user-profiles

    The function um_profile_content_mycustomtab_default( $args ) should render the “Dokan” shortcode.

    • This reply was modified 1 year, 11 months ago by missveronica.
    Thread Starter DeepBlue

    (@deepblue5)

    Hi

    Thank you i will have a look if there is a dokan shortcode ??

    @deepblue5

    I searched for a “Dokan” shortcode but found a “Dokan” function being said to work for your product list.

    You can try this code snippet, install into your active theme’s functions.php file
    or use the “Code Snippets” Plugin:

    add_filter( 'um_profile_tabs', 'um_dokan_tab_add_tab', 1000 );
    add_action( 'um_profile_content_dokan_tab_default', 'um_profile_content_dokan_tab', 10, 1 );
    
    function um_dokan_tab_add_tab( $tabs ) {
    
    	$tabs[ 'dokan_tab' ] = array(
                                'name'   => 'Products',
                                'icon'   => 'um-faicon-list',
                                'custom' => true
    	);
    
    	UM()->options()->options[ 'profile_tab_' . 'dokan_tab' ] = true;
    
    	return $tabs;
    }
    
    function um_profile_content_dokan_tab( $args ) {
    
        echo '<div class="um">';
        
        if( function_exists( 'dokan_get_more_products_from_seller' )) {
    
            echo esc_html( 'Products from this vendor:' );
            dokan_get_more_products_from_seller( um_profile_id(), $posts_per_page = 10 );
    
        } else {
            echo esc_html( 'DOKAN function not found.' );
        }
    
        echo '</div>';
    }
    Thread Starter DeepBlue

    (@deepblue5)

    Hi Veronica

    Thanks a lot

    but then how do i show a vendor’s product in a tab ? (using extra tabs) i need a shortcode right ?

    thanks ??

    Plugin Support andrewshu

    (@andrewshu)

    Hi @deepblue5

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread if any other questions come up and we’d be happy to help. ??

    Regards

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Dokan integration’ is closed to new replies.