Home Forums Theme Support Dokan Individual Store Message?

This topic is: resolved

This topic contains 2 replies, has 2 voices, and was last updated by  Jason 4 years, 10 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #23289

    Jason
    Member
    Post count: 102

    Hi Support

    I know that through woocommerce one can place a store wide notice.

    Is there a way to do this for an individual store? The reason I ask is that a seller of ours is going on holiday for a wekk and would like a message that is only displayed on his store.

    Is this possible somehow?

    Many thanks

    Jason

    #23307

    Sekander Badsha
    Member
    Post count: 2067

    Hello Jeson,
    Please add the following lines anywhere in your themes functions.php
    [php]
    function dd_store_wise_notice( $store, $info ) {

    // comparing to seller ID or User ID
    if ( $store->ID == 1 ) {
    ?>
    <p class="dokan-info">Store 1 is temporarily close. Please come back later.</p>
    <?php
    }
    }

    add_action( ‘dokan_store_profile_frame_after', ‘dd_store_wise_notice', 10, 2 );
    [/php]

    Put the seller ID instead of 1 here $store->ID == 1. You can get the seller id from the user list. Just hover the mouse over the sellers name. and you'll see the id in the bottom of your page.

    Let me know if you feel any difficulties.

    #23310

    Jason
    Member
    Post count: 102

    Wow, good skills Sekander.

    Worked perfectly ๐Ÿ™‚

    Thanks

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

The topic ‘Individual Store Message?’ is closed to new replies.