Home Forums Theme Support Dokan Seller dashboard in Seller Page

This topic is: not resolved

This topic contains 22 replies, has 2 voices, and was last updated by  towhid 4 years, 1 month ago.

Viewing 15 posts - 1 through 15 (of 23 total)
  • Author
    Posts
  • #31352

    Roberto
    Member
    Post count: 59

    Hello devs

    I posted here but got no answers so I'll try again. I wanna create a page with the seller dashboard menu on the left, and i found this

    function dokan_add_dashboard_menu( $menus ) {
        $page_id = 19;
         
        $menus['newsletter'] = array(
            'title' => __( 'Newsletter', 'dokan'),
            'icon' => '<i class="icon-envelope"></i>',
            'url' => get_permalink( $page_id )
        );
          
        return $menus;
    }
      
    add_filter( 'dokan_get_dashboard_nav', 'dokan_add_dashboard_menu' );

    where the page 19 has the shortcode in it (could be a blank page)
    But obviously there is a problem, cause the page doesn't have the left dashboard.

    So i was thinking of just creating a new php file in the templates theme called “new-newsletter.php”.
    But I can’t figure how to do it…’cause there is something with “query_vars” and so on in order to properly show and link the page.

    Would you be able to point out how to do it?
    Cheers.

    #31377

    towhid
    Participant
    Post count: 4505

    Hello Roberto,

    I have forward this topic to our developer team. Hope I will be right back to you with a correct solution. Please allow some times.

    Thank You 🙂

    #31655

    Roberto
    Member
    Post count: 59

    any news about this topic?
    Appreciate your help.

    Cheers

    #31708

    towhid
    Participant
    Post count: 4505

    Hello Roberto,

    Sorry for the late replay. Please try to find below 4 filters in the dokan plugin folder. Each filter has unique purpose. I have share these filter to you for get idea about that it meets your requirements or not. Hopefully with this filter you can customize,extend for show the menu in template area and link the menu.

    add_filter( 'dokan_query_var_filter', array( $this, 'register_news_qeryvar' ) );
    add_filter( 'dokan_get_dashboard_nav', array( $this, 'nav_menu' ) );
    add_filter( 'dokan_get_template_part', array( $this, 'include_news_page' ), 10, 3 );
    add_action( 'dokan_load_custom_template', array( $this, 'custom_templating' ) );

    Please let me know the result. We are here to help you.

    Thank You 🙂

    #31726

    Roberto
    Member
    Post count: 59
    <?php
    //urls
    function newsletter_add_dashboard_menu( $menus ) {
        $menus['newsletter'] = array(
                'title' => __( 'Newsletter', 'dokan'),
                'icon'  => '<i class="fa fa-envelope"></i>',
                'url' => dokan_get_navigation_url('new-newsletter')
        );
          
        return $menus;
    }
    add_filter( 'dokan_get_dashboard_nav', 'newsletter_add_dashboard_menu' );
    
    function register_newsletter_queryvar( $array ){
      	$array[] = 'newsletter';
    	return $array;
    }
    add_filter( 'dokan_query_var_filter', 'register_newsletter_queryvar' );
    
    //get template
    function newsletter_template(){
    		global $wp;
    		if ( isset( $wp->query_vars['new-newsletter'] ) ) {
    		dokan_get_template_part( 'new-newsletter' );
    		return;
    	}
    
    }
    add_action( 'dokan_load_custom_template', 'newsletter_template' );

    Having a file in /themes/mytheme/dokan/new-newsletter.php

    The dashboard on the left works fine… but the rest doesn't (i get a 404 not found)
    What am i doing wrong?

    I guess it has to do with add_filter( 'dokan_get_template_part', array( $this, 'include_news_page' ), 10, 3 ); but i don't understand where i need to use it.

    Cheers and many thanks

    #31805

    towhid
    Participant
    Post count: 4505

    Hello Roberto,

    In this link you did mistake.

    if ( isset( $wp->;query_vars[‘new-newsletter‘] ) )

    Please replace this line

    if ( isset( $wp->;query_vars[‘newsletter' ) )

    and let me know the result.

    Thank You 🙂

    #31813

    Roberto
    Member
    Post count: 59

    Nope. This is not the problem. I replaced all the occurrencies with “newsletter” changing also the file name to newsletter.php in order not to make a mess.
    Stil 404 not found

    #31827

    towhid
    Participant
    Post count: 4505

    Hello Roberto,

    Make sure that you have set you permalinks as “Post name” and “Product”. For getting permalinks setting you have to navigate to Settings->Permalinks.

    If it is not solve the problem then please provide your login details by using this form – http://wedevs.com/provide-login-details/. I will have a look what is going wrong.

    Thank you 🙂

    #31840

    Roberto
    Member
    Post count: 59

    Permalinks are ok. Not working :/

    I'm pretty sure it's something to do with the fact that wp can't find the file “newsletter.php” because of the filters/template whatever.

    I'll g

    #31890

    Roberto
    Member
    Post count: 59

    i just noticed my message wasnt complete.
    Anyway, did you notice something wrong?

    #31923

    towhid
    Participant
    Post count: 4505

    Hello Roberto,

    If your message was not complete you can send again. I will work according to your problem. I also need ftp login details.

    Thank you 🙂

    #31929

    Roberto
    Member
    Post count: 59

    I just wanted to say “I'll give you access through your form”

    I'll send you ftp details now.

    Cheers.

    #31957

    towhid
    Participant
    Post count: 4505

    Hello Roberto,

    Please send the ftp login details in this post and make it private.

    Thank You 🙂

    #31960

    Roberto
    Member
    Post count: 59
    This reply has been marked as private.
    #31981

    towhid
    Participant
    Post count: 4505

    Hello Roberto,

    I have successfully login to your site with ftp also the admin login. But can not able to locate your custom code file. Would you please send directory path of your custom code file. Then it will be easy to check and work.

    Thank You 🙂

Viewing 15 posts - 1 through 15 (of 23 total)

The topic ‘Seller dashboard in Seller Page’ is closed to new replies.