Home Forums Theme Support Dokan Seller Dashboard Menu

This topic is: not resolved

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

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

    Tondo
    Member
    Post count: 2

    Hi I use dokan 2.0.1 plugin in my site http://www.incraft-mall.com but using other theme – how I can show seller dashboard menu like you have in dokan theme? thanks

    #39989

    towhid
    Participant
    Post count: 4505

    Step 1: Open theme's functions.php file

    Step 2: Paste below code at the bottom of functions.php file.

    if ( !function_exists( ‘tw_header_user_menu' ) ) :

    
    /**
     * User top navigation menu
     *
     * @return void
     */
    function wedevs_header_user_menu() {
        ?>
        <ul class="nav navbar-nav navbar-right">
            <li>
                <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php printf( __( 'Cart %s', 'dokan' ), '<span class="dokan-cart-amount-top">(' . WC()->cart->get_cart_total() . ')</span>' ); ?> <b class="caret"></b></a>
    
                <ul class="dropdown-menu">
                    <li>
                        <div class="widget_shopping_cart_content"></div>
                    </li>
                </ul>
            </li>
    
            <?php if ( is_user_logged_in() ) { ?>
    
                <?php
                global $current_user;
    
                $user_id = $current_user->ID;
                if ( dokan_is_user_seller( $user_id ) ) {
                    ?>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php _e( 'Seller Dashboard', 'dokan' ); ?> <b class="caret"></b></a>
    
                        <ul class="dropdown-menu">
                            <li><a href="<?php echo dokan_get_store_url( $user_id ); ?>" target="_blank"><?php _e( 'Visit your store', 'dokan' ); ?> <i class="fa fa-external-link"></i></a></li>
                            <li class="divider"></li>
                            <?php
                            $nav_urls = dokan_get_dashboard_nav();
    
                            foreach ($nav_urls as $key => $item) {
                                printf( '<li><a href="%s">%s  %s</a></li>', $item['url'], $item['icon'], $item['title'] );
                            }
                            ?>
                        </ul>
                    </li>
                <?php } ?>
    
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo esc_html( $current_user->display_name ); ?> <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                        <li><a href="<?php echo dokan_get_page_url( 'my_orders' ); ?>"><?php _e( 'My Orders', 'dokan' ); ?></a></li>
                        <li><a href="<?php echo dokan_get_page_url( 'myaccount', 'woocommerce' ); ?>"><?php _e( 'My Account', 'dokan' ); ?></a></li>
                        <li><a href="<?php echo wc_customer_edit_account_url(); ?>"><?php _e( 'Edit Account', 'dokan' ); ?></a></li>
                        <li class="divider"></li>
                        <li><a href="<?php echo wc_get_endpoint_url( 'edit-address', 'billing', get_permalink( wc_get_page_id( 'myaccount' ) ) ); ?>"><?php _e( 'Billing Address', 'dokan' ); ?></a></li>
                        <li><a href="<?php echo wc_get_endpoint_url( 'edit-address', 'shipping', get_permalink( wc_get_page_id( 'myaccount' ) ) ); ?>"><?php _e( 'Shipping Address', 'dokan' ); ?></a></li>
                    </ul>
                </li>
    
                <li><?php wp_loginout( home_url() ); ?></li>
    
            <?php } else { ?>
                <li><a href="<?php echo dokan_get_page_url( 'myaccount', 'woocommerce' ); ?>"><?php _e( 'Log in', 'dokan' ); ?></a></li>
                <li><a href="<?php echo dokan_get_page_url( 'myaccount', 'woocommerce' ); ?>"><?php _e( 'Sign Up', 'dokan' ); ?></a></li>
            <?php } ?>
        </ul>
        <?php
    }
    
    endif;

    Step 3: Call this function wedevs_header_user_menu(); where you want to show the menu.

    Thank you ๐Ÿ™‚

    #40593

    Joseph
    Member
    Post count: 21

    Can you please provide the CSS to get the menu to look like your theme's? I have the menu in place, however the dropdowns do not work upon hover.

    #40595

    Joseph
    Member
    Post count: 21

    Here is the link to my site http://thisismylifestyle.com/

    #40630

    towhid
    Participant
    Post count: 4505

    Hello Joseph,

    You can download css from our dokan demo site. Here is the link of the demo site – http://demo.wedevs.com/dokan/.

    Thank you ๐Ÿ™‚

    #40746

    Joseph
    Member
    Post count: 21

    Thank you for your response. I was able to get the CSS, but the when I click on the menu, the cart dropdown and Seller's dropdown does not appear. Do I need a JS file?

    #40793

    towhid
    Participant
    Post count: 4505

    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 ๐Ÿ™‚

    #41274

    towhid
    Participant
    Post count: 4505

    Hello Joseph,

    Can you please check the site now and let me know the result. I have created a bootstrap.min.js file in /assets/js/ folder in the theme.

    Thank you ๐Ÿ™‚

    #41284

    Joseph
    Member
    Post count: 21

    Thank you so much. It is working now! ๐Ÿ™‚

    #41361

    towhid
    Participant
    Post count: 4505
    This reply has been marked as private.
Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘Seller Dashboard Menu’ is closed to new replies.