Home Forums Theme Support Dokan Duplicating Dashboard Design

This topic is: resolved

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

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #41770

    Fred
    Member
    Post count: 63

    I know Dokan uses Bootstrap libraries and I was wondering how would I be able to create another page that has same design and menus of Dashboard page (of course will be named differently) with either help of Visual Composer and/or Bootstrap libraries.
    Any help will greatly be appreciated.

    Thanks.

    #41788

    towhid
    Participant
    Post count: 4505

    Hello Fred,

    If you want to insert a new URL or page to your Dokan frontend dashboard, here some is the link that will help you:
    http://docs.wedevs.com/adding-removing-url-dokan-dashboard/

    Please let me know the result when done.

    Thank you πŸ™‚

    #41791

    Fred
    Member
    Post count: 63

    Thanks Towhid! …can you please tell me which file/folder needs to be updated?

    #41793

    towhid
    Participant
    Post count: 4505

    Hello,

    Please open plugins/wedevs-dokan-plugin/includes/template-tags.php and put your code this file and see the result.

    Thank you πŸ™‚

    #41802

    Fred
    Member
    Post count: 63

    Towhid,
    If I wanted to have a new Dashaboard page and wanted to name it o-dashboard, can you please tell me how can I replicate the design?

    Thanks.

    #41923

    towhid
    Participant
    Post count: 4505

    Can you please followup my instruction and see how it sees:

    Step 1: Step 1: Please create a page named “mypage.php” under plugins/wedevs-dokan-plugin/templates/

    Step 2: Please open plugins/wedevs-dokan-plugin/includes/template-tags.php and put this code

    function prefix_dokan_add_seller_nav( $urls ) {
        
        $urls['help'] = array(
            'title' => __( 'My Tab', 'dokan'),
            'icon'  => '<i class="fa fa-users"></i>',
            'url'   => dokan_get_navigation_url( 'mypage' )
        );
    
        return $urls;
    }
    
    add_filter( 'dokan_get_dashboard_nav', 'prefix_dokan_add_seller_nav' ); 
    
    function load_mypage_template( $query_var ) {
        if( isset( $query_var['mypage'] ) ) {
            dokan_get_template_part( 'mypage' );
            return;
        }
    }
    
    add_action( 'dokan_load_custom_template', 'load_mypage_template'); 

    Step 3: Please open yourtheme/functions.php and paste this code

    function load_mypage_rewrite( $query_var ) {
    
        $query_var['mypage'] = 'mypage';
        return $query_var;
    }
    
    add_filter( 'dokan_query_var_filter', 'load_mypage_rewrite',20 ); 

    After then you will see a menu named β€œMy Page” with same design of other dashboard page.

    Try this instruction and let me know the result.

    Thank you πŸ™‚

    #41963

    Fred
    Member
    Post count: 63

    Hi Towhid,
    I tried the steps you described, but I get:

    Oops! That page can’t be found.

    It looks like nothing was found at this location. Maybe try one of the links below or a search?

    I see the “My tab” under Seller Dashboard menu in the header and it's posting to: domain.com/dashboard/mypage but nothing gets displayed.

    Shouldn't there be anything in mypage.php file? …you just said to create that page but nothing that goes in it.

    Thanks for all your help πŸ™‚

    #41965

    Fred
    Member
    Post count: 63

    I placed contents of dashboard.php into mypage.page I still get the same results. Thanks.

    #42012

    Fred
    Member
    Post count: 63

    Hi Towhid,
    do you have any further suggestions to get this solved? Thanks again.

    #42021

    towhid
    Participant
    Post count: 4505

    Hello Fred,

    Make sure you have set your permalinks as post name and product. Please navigate to Settings->Permalinks and Set your permalinks as Post name and Product. Please check and let me know.

    Apparently paste this code into mypage.php and see the result. This is code just an example for testing purpose. You can put any code into there.

    <div class="dokan-dashboard-wrap">
        <?php dokan_get_template( 'dashboard-nav.php', array( 'active_menu' => 'mypage' ) ); ?>
    
        <div class="dokan-dashboard-content dokan-settings-content">
            <article class="dokan-settings-area">
                <header class="dokan-dashboard-header">
                    <h1 class="entry-title">
                        <?php _e( 'My Page', 'dokan' );?>
                    </h1>
                </header><!-- .dokan-dashboard-header -->
            </article>
        </div><!-- .dokan-dashboard-content -->
    </div><!-- .dokan-dashboard-wrap -->

    Please check and let me know the result.

    Thank you πŸ™‚

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

The topic ‘Duplicating Dashboard Design’ is closed to new replies.