Home Forums Theme Support Dokan Deactivate products when deactivating seller

This topic is: resolved

This topic contains 10 replies, has 3 voices, and was last updated by  Tor B 4 years, 7 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #32681

    Tor B
    Member
    Post count: 100

    Is there a way I can deactivate products when deactivating a seller?

    #32698

    Sekander Badsha
    Member
    Post count: 2067

    Hello Tor,

    You can switch to the sellers account from wp-admin -> users and then you can change the post status as draft. Or you can use our Seller Vacation add-on http://wedevs.com/plugin/dokan/seller-vacation/ when you enable the vacation mode, all the products go offline instantly.

    #32699

    Tor B
    Member
    Post count: 100

    OK, thank you.

    #32734

    Tor B
    Member
    Post count: 100

    Activating the Seller Vacation plugin prevents the site front page from displaying… if I deactivate the plugin, the site displays fine again. Have done this several times with the same result.

    #32738

    Nayem
    Moderator
    Post count: 6480

    Hello Tor B,

    Please navigate to wp-content/plugin/dokan-seller-vacation and open dokan-seller-vacation.php file. In line number 139-154 replace that function to

    public function enqueue_scripts() {
            global $wp;
           
            if( isset( $wp->query_vars['settings'] ) ) {
                /**
                 * All styles goes here
                 */
                wp_enqueue_style( 'dokan-sv-styles', plugins_url( 'css/style.css', __FILE__ ), false, date( 'Ymd' ) );
                wp_enqueue_style( 'dokan-sv-jquery-ui-styles', plugins_url( 'css/jquery-ui-1.10.0.custom.css', __FILE__ ), false, date( 'Ymd' ) );
    
                /**
                 * All scripts goes here
                 */
                wp_enqueue_script( 'dokan-sv-scripts', plugins_url( 'js/script.js', __FILE__ ), array( 'jquery' ), false, true );
            }
        }

    Hope everything will work fine. Please check and let me know.
    Thank you ๐Ÿ™‚

    #32740

    Tor B
    Member
    Post count: 100

    It works in a mysterious way ๐Ÿ™‚

    #32741

    Tor B
    Member
    Post count: 100

    So, how does the seller vacation plugin really work? I have made a custom seller page, and it seems all products is displayed without any vacation notice…. so I guess this plugin does some changes to the original “seller page” which I do not use?

    #32743

    Nayem
    Moderator
    Post count: 6480

    Hello Tor B,

    You have to set your vacation notice from seller dashboard -> settings. In the dashboard setting page you will find the settings for seller vacation.

    Here is a screen shot of that – .

    If you have any question then please start a new topic. Because you have already mark this topic as resolved.

    Thank you ๐Ÿ™‚

    #32744

    Tor B
    Member
    Post count: 100

    I have done so, but no notice is given – the products are still displayed. My question is what file(s) is changed (if any) when activating the plugin, in case this has something to do with overriding the standard template in a child theme.

    #32748

    Nayem
    Moderator
    Post count: 6480

    Hello Tor B,

    The notice will appear on the store page. Here is a screenshot for the notice –

    Answer of your question – There are different rules for different plugin to override. So you have to confirm me which plugin you want to override in a child theme?. If you want to override Dokan plugin then you have to override this in a child theme. You have to make a folder in your child theme which must be named as “Dokan” and you have to copy the file which you want to customize and paste it to in your childtheme/dokan. Now you can do whatever you want with this file.

    Thank you ๐Ÿ™‚

    #32751

    Nayem
    Moderator
    Post count: 6480

    Hello Tor B,

    I am not sure but it can be caused for overriding.

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

Viewing 11 posts - 1 through 11 (of 11 total)

The topic ‘Deactivate products when deactivating seller’ is closed to new replies.