This topic contains 9 reply and 3 voices, and was last updated by towhid 4 years, 7 months ago
Viewing 9 Posts - 1 through 9 (of 9 total)
Author Posts
March 25, 2015 at 10:33 am 39948
towhid Hi I use dokan 2.0.1 plugin in my site www.incraft-mall.com but using other theme - how I can show seller dashboard menu like you have in dokan theme? thanks
March 25, 2015 at 4:10 pm 39989
towhid towhid

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 &nbsp;%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 🙂

April 3, 2015 at 9:07 pm 40593
Joseph Joseph

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.

April 3, 2015 at 9:23 pm 40595
Joseph Joseph

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

April 4, 2015 at 12:46 pm 40630
towhid towhid

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 🙂

April 6, 2015 at 9:00 pm 40746
Joseph Joseph

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?

April 7, 2015 at 1:03 pm 40793
towhid towhid

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 🙂

April 13, 2015 at 6:40 pm 41274
towhid towhid

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 🙂

April 13, 2015 at 8:21 pm 41284
Joseph Joseph

Thank you so much. It is working now! 🙂

April 15, 2015 at 10:25 am 41361
towhid towhid This reply has been marked as private.
Viewing 9 Posts - 1 through 9 (of 9 total)