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, 3 months ago.

Viewing 8 posts - 16 through 23 (of 23 total)
  • Author
    Posts
  • #31988

    Roberto
    Member
    Post count: 59

    Custom code is in the “My-dokan” plugin, file “custom-dashboard.php”

    #32051

    Roberto
    Member
    Post count: 59

    news?

    #32083

    towhid
    Participant
    Post count: 4505

    Hello Roberto,

    I have checked that you had tried to create a child plugin. Dokan plugin action and filter basically first priorities on template then plugin. I have send you the four filters and actions you have to do your own or you can hire a developer. Please read this link to know about child plugin customization – https://iandunn.name/the-right-way-to-customize-a-wordpress-plugin/

    Hope you understand.

    Thank You ๐Ÿ™‚

    #32089

    Roberto
    Member
    Post count: 59

    The only problem is with the register queryvar in my code. Everything else works perfectly, cause the hooks and filters are working.

    The $this->queryvar ain't working, because i cannot understand how to modify it from a filter.

    All the rest of the code, put in a different plugin like i did or in the functions.php, works fine.
    So, i just added the registration of a new queryvar directly in the dokan code and left all the rest of the code in the other plugin.

    Do you have any suggestion?

    #32106

    Roberto
    Member
    Post count: 59
    function newsletter_add_dashboard_menu( $menus ) {
         
        $menus['newsletter'] = array(
                'title' => __( 'Newsletter', 'dokan'),
                'icon'  => '<i class="fa fa-envelope"></i>',
                'url' => dokan_get_navigation_url('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['newsletter'] ) ) {
    			dokan_get_template_part( 'newsletter' );
    		return;
    		}
    		if ( isset( $wp->query_vars['new-newsletter'] ) ) {
    			dokan_get_template_part( 'new-newsletter' );
    		return;
    		}
    
    }
    add_action( 'dokan_load_custom_template', 'newsletter_template' );

    This was added from a plugin.

    function load_query_var_variable() {
            $this->query_vars = apply_filters( 'dokan_query_var_filter', array(
                'products',
                'new-product',
                'orders',
                'coupons',
                'reports',
                'reviews',
                'withdraw',
                'settings',
                'account-migration',
    	    'newsletter',
    	    'new-newsletter'
            ) );
        }

    This was added to the DOKAN file because I don't know how to add it from outside.
    ANy suggestion would be appreciated.

    #32250

    towhid
    Participant
    Post count: 4505

    Hello Roberto,

    I am not able to login to site's files with the ftp details you provided. Please keep open all kinds of access then I can check to your site time to time. I am trying to make your menu to work with ‘query_vars' and its need time. Because all of our developer are very busy right now.

    Hope you understand me.

    Thank You ๐Ÿ™‚

    #35325

    Roberto
    Member
    Post count: 59

    Hello devs.

    I see in Dokan 1.4 you changed the load_query_var_variable to register_rule

    Still, the only way to add the query vars to that function is to manually write them into the file itself.

    can you please provide a hook for us to add new query vars without modifying dokan?

    #36676

    towhid
    Participant
    Post count: 4505

    Hello Roberto,

    I will forward this topic to our developer team. Hope they will add this hook in near future.

    Thank You ๐Ÿ™‚

Viewing 8 posts - 16 through 23 (of 23 total)

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