Unable to redirect seller to dashboard

This topic contains 10 reply and 3 voices, and was last updated by Nayem 8 years, 9 months ago
Viewing 10 Posts - 1 through 10 (of 10 total)
Author Posts
July 5, 2015 at 8:55 pm 54353
Nayem Hi team, We are using dokan multi vendor plugin on our website and have some issue with the seller login redirect to the dashboard, I saw some thread where we need to add some piece of code in the theme function file, i did added it but it's not working and for now using the peter's login redirect plugin. Provide me the link to share you the login details for a check and fix it. Thanks
July 6, 2015 at 10:14 am 54388
Nayem Nayem

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 🙂

July 6, 2015 at 11:37 am 54396
Nayem Nayem This reply has been marked as private.
July 6, 2015 at 12:03 pm 54400
meer irfan meer irfan

Now, if i deactivate the peter’s login plugin, will it work rite.

July 6, 2015 at 12:25 pm 54402
Nayem Nayem

Yes, it will work fine. You have to use WooCommerce account page to login then it will redirect. Here it is- http://www.shoppingadviser.in/my-account/.

Thanks.

July 6, 2015 at 4:13 pm 54451
meer irfan meer irfan

Thanks, It’s redirecting only when we login with http://www.shoppingadviser.in/my-account/ but not from the homepage login dropdown, any fix for that??

Also once we login and in dashboard http://www.shoppingadviser.in/dashboard/settings/store/# unable to upload banner and profile photo.

Regards,

July 7, 2015 at 11:06 am 54524
Nayem Nayem

Hello,

1. You have two login form there and the code I have provided will work with WooCommerce login/reg form. Now if you want to redirect from the other login form then you have to work with the code. Though it is not our feature but I have provided you code snippets.

add_filter( 'woocommerce_login_redirect', 'ckc_login_redirect', 10, 2 );

function ckc_login_redirect( $redirect_url, $user ) {
    

    if( $user->roles[0] == 'seller' ) {
        return dokan_get_navigation_url('/dashboard');   
    }

return $redirect_url;
}

2. Is there any error?

July 7, 2015 at 11:30 am 54534
meer irfan meer irfan

Hi,

1) Will try with the code.

2) There is no error, just when we click on upload photo, it adds a # to the url.

Thanks

July 7, 2015 at 11:55 am 54539
Nayem Nayem

Please disable all of you plugin and switch to a default theme and then check. If the problem remain then let me know.

Thanks.

July 10, 2015 at 10:02 pm 55091
chris orza chris orza This reply has been marked as private.
July 11, 2015 at 12:22 pm 55147
Nayem Nayem

You can use this code in your theme’s function.php-

add_filter( ‘woocommerce_login_redirect’, ‘ckc_login_redirect’, 10, 2 );

function ckc_login_redirect( $redirect_url, $user ) {
    // Change this to the url to Updates page

    if( $user->roles[0] == 'seller' ) {
        return dokan_get_navigation_url(‘dashboard’);   
    }

return $redirect_url;
}

Thanks.

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