Home Forums Theme Support Dokan Dokan plugin issues (Dashboard & Store pages)

This topic is: resolved

This topic contains 22 replies, has 8 voices, and was last updated by  Brenda 4 years, 6 months ago.

Viewing 15 posts - 1 through 15 (of 23 total)
  • Author
    Posts
  • #27162

    Thomas
    Member
    Post count: 21

    Wedevs,
    Congratulations on the release of the new Dokan plugin. After following your installation instructions and activating the plugin, I am encountering some issues I hope you can help me resolve.

    I added the [dokan-dashboard] shortcode on the /dashboard page. The published page is producing a fatal error…

    I tested adding the [dokan-dashboard] shortcode to a new page. I was able to get the page to render without the error, but it is not appearing correctly and all of the links go to 404's.

    I am able to get the [dokan-stores] shortcode to work… https://www.brumberry.com/storefronts/

    However, the subsequent store pages are producing 404's. (i.e. )

    I see some other customers may be having similar issues. Please let me know if you have any suggestions on how to fix these.

    Thanks,
    Tom

    #27165

    Thomas
    Member
    Post count: 21

    I retried resetting the permalinks and it fixed the 404's for the store pages. The good news is the page is rendering, the bad news is the layout is messed up. Standard sidebar widgets are appearing above the store content, and the store content is stretched across the entire screen.

    https://www.brumberry.com/store/brumberry-store-demo/

    #27168

    morgan
    Member
    Post count: 3

    I am having the same problems with the store pages. I think it has to do with the sidebar “store” that is called in the template file but does not actually exist.

    #27170

    Mike
    Member
    Post count: 56

    Maybe a problem with your SSL?

    #27171

    Sk
    Moderator
    Post count: 371

    Hello,

    Thank you for the issue. It a bug.
    Please create a page “sidebar-store.php” in your theme like “wp-content/themes/your-theme/sidebar-store.php” and past following code there.

    [php]
    <?php
    $store_user = get_userdata( get_query_var( ‘author' ) );
    $store_info = get_user_meta( $store_user->ID, ‘dokan_profile_settings', true );
    $map_location = isset( $store_info[‘location'] ) ? esc_attr( $store_info[‘location'] ) : ”;
    ?>

    <div id="secondary" class="col-md-3 clearfix" role="complementary">
    <button type="button" class="navbar-toggle widget-area-toggle" data-toggle="collapse" data-target=".widget-area">
    <i class="fa fa-bars"></i>
    <span class="bar-title"><?php _e( ‘Toggle Sidebar', ‘dokan' ); ?></span>
    </button>

    <div class="widget-area collapse widget-collapse">

    <?php
    if ( ! dynamic_sidebar( ‘sidebar-store' ) ) {

    $args = array(
    ‘before_widget' => ‘<aside class="widget">',
    ‘after_widget' => ‘</aside>',
    ‘before_title' => ‘<h3 class="widget-title">',
    ‘after_title' => ‘</h3>',
    );

    if ( class_exists( ‘Dokan_Store_Location' ) ) {
    the_widget( ‘Dokan_Store_Category_Menu', array( ‘title' => __( ‘Store Category', ‘dokan' ) ), $args );
    the_widget( ‘Dokan_Store_Location', array( ‘title' => __( ‘Store Location', ‘dokan' ) ), $args );
    the_widget( ‘Dokan_Store_Contact_Form', array( ‘title' => __( ‘Contact Seller', ‘dokan' ) ), $args );
    }

    }
    ?>

    <?php do_action( ‘dokan_sidebar_store_after', $store_user, $store_info ); ?>
    </div>
    </div><!– #secondary .widget-area –>
    [/php]

    Thank you… 🙂

    #27191

    Thomas
    Member
    Post count: 21

    Ok, i added the file to my theme directory. I am now getting the following error…

    Parse error: syntax error, unexpected ‘{‘ in /home/tdrugan/public_html/wp-content/themes/organique/sidebar-store.php on line 16

    Here is a direct link: https://www.brumberry.com/store/brumberry-store-demo/

    Also, are you able to help with the fatal error detailed above that is happening on /dashboard? Thanks.

    #27201

    Tareq Hasan
    Keymaster
    Post count: 2831

    @tom, the fatal error is coming up from your theme. We have nothing to do with that, you should repair your theme.

    Sidebar: The plugin expects that your theme has a file called sidebar-store.php, if it's not found, it'll search for sidebar.php in your theme and will display the widgets. There are 3 new widgets in the plugin specifically for the store page: 1) Seller Store Category, 2) Map Location and 3) Contact Seller widget. You can drop the widgets on the sidebar and only it'll be visible on the store page, not other pages.

    If you don't like the layout of store page, you can override the store template like this:
    => Create a folder in your current activated theme called dokan and create a store.php and the plugin will pickup that theme to render the store page. Same goes to the review page.

    Dashboard: May be you haven't set the dashboard page in the plugin settings. Go to Dokan -> Settings -> Page tab and select the dashboard page. Styles will be back again I hope.

    #27227

    Thomas
    Member
    Post count: 21

    Ok, I was able to fix the dashboard fatal error within my theme files.

    I tried to add the Dokan widgets to both my sidebar and “shop filter store” sidebar. Neither are appearing on the store pages.

    I am still getting the default sidebar, and it is appearing above the store page content. Here is the link again…

    https://www.brumberry.com/store/brumberry-store-demo/

    Any ideas of what is happening here?

    #27247

    Tareq Hasan
    Keymaster
    Post count: 2831

    Wow, you don't have any sidebar in your theme? By the screenshot it looks it has, but it doesn't. Look in your theme directory if there is any sidebar.php file exists.

    #27249

    Thomas
    Member
    Post count: 21

    Hi Tareq,
    You happened to look at the page when I was testing something :). There are definitely sidebars on this theme.

    I am using this function on the store.php page…

    <?php get_sidebar( 'store' ); ?>

    This is the code on the sidebar-store.php page…

    <?php
    $store_user   = get_userdata( get_query_var( 'author' ) );
    $store_info   = get_user_meta( $store_user->ID, 'dokan_profile_settings', true );
    $map_location = isset( $store_info['location'] ) ? esc_attr( $store_info['location'] ) : '';
    ?>
     
    <div id="secondary" class="col-md-3 clearfix" role="complementary">
        <button type="button" class="navbar-toggle widget-area-toggle" data-toggle="collapse" data-target=".widget-area">
            <i class="fa fa-bars"></i>
            <span class="bar-title"><?php _e( 'Toggle Sidebar', 'dokan' ); ?></span>
        </button>
     
        <div class="widget-area collapse widget-collapse">
     
            <?php
            if ( ! dynamic_sidebar( 'sidebar-store' ) ) {
     
                $args = array(
                    'before_widget' => '<aside class="widget">',
                    'after_widget'  => '</aside>',
                    'before_title'  => '<h3 class="widget-title">',
                    'after_title'   => '</h3>',
                );
     
                if ( class_exists( 'Dokan_Store_Location' ) ) {
                    the_widget( 'Dokan_Store_Category_Menu', array( 'title' => __( 'Store Category', 'dokan' ) ), $args );
                    the_widget( 'Dokan_Store_Location', array( 'title' => __( 'Store Location', 'dokan' ) ), $args );
                    the_widget( 'Dokan_Store_Contact_Form', array( 'title' => __( 'Contact Seller', 'dokan' ) ), $args );
                }
     
            }
            ?>
     
            <?php do_action( 'dokan_sidebar_store_after', $store_user, $store_info ); ?>
        </div>
    </div><!-- #secondary .widget-area -->

    I am getting the following parse error when trying the above implementation….

    Parse error: syntax error, unexpected ‘{‘ in /home/tdrugan/public_html/wp-content/themes/organique/sidebar-store.php on line 16

    Here is the link to the test store page…

    https://www.brumberry.com/store/brumberry-store-demo/

    #27251

    Tareq Hasan
    Keymaster
    Post count: 2831

    You may want to copy the sidebar-store.php from the Dokan Theme and paste that in your current theme.

    #27256

    Thomas
    Member
    Post count: 21

    Tareq,

    Ok, we are making progress. I was able to get sidebar-store and the corresponding widgets to render by adding the Dokan 2.0 theme sidebar-store.php file to my theme directory.

    While it is functional, the sidebar is using the styling from my theme vs. the styling from the Dokan plugin. Is this expected? Or do the widgets come with styling like the rest of the assets? If so, how do I fix this?

    Thanks,
    Tom

    #27331

    Tor B
    Member
    Post count: 100

    When adding the code from Reply #27171 to sidebar-store.php, I get this:

    Parse error: syntax error, unexpected T_STRING in /var/www/html/wp-content/themes/themename/sidebar-store.php on line 10

    EDIT: Copying the file from the theme took care of the syntax error. The store content is still stretched across the entire screen, as in Reply #27165

    #27414

    Tareq Hasan
    Keymaster
    Post count: 2831

    As I explained before, it's impossible to support every other theme. Thats why you have to override the store.php from your theme.

    #29007

    Brenda
    Participant
    Post count: 170

    My theme, Virtue Premium, doesn't have a “store” page and this was causing problems. I read this thread and decided to do as suggested.

    I made a Virtue Premium Child theme.
    I copied the Dokan sidebar.store.php into the Virtue Premium Child Theme's directory.
    I made a Dokan directory in Virtue Premium Child Theme and copied store.php into that directory.

    Finally my individual stores are looking better. Not all is fixed (e.g. the location map isn't there yet) but it is a start good start since now my theme will be able to recognize that there is actually something called “store” to work with.

    I hope others will also try to implement this fix because it seems to work with non-wedevs themes.

    Brenda

Viewing 15 posts - 1 through 15 (of 23 total)

The topic ‘Dokan plugin issues (Dashboard & Store pages)’ is closed to new replies.