Dokan plugin issues (Dashboard & Store pages)

This topic contains 22 reply and 8 voices, and was last updated by Brenda 9 years, 5 months ago
Viewing 15 Posts - 1 through 15 (of 22 total)
Author Posts
September 22, 2014 at 7:26 am 27162
Brenda 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
September 22, 2014 at 7:47 am 27165
Thomas Thomas

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/

September 22, 2014 at 9:01 am 27168
morgan morgan

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.

September 22, 2014 at 10:57 am 27170
Mike Mike

Maybe a problem with your SSL?

September 22, 2014 at 11:48 am 27171
Sk Sk

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… 🙂

September 22, 2014 at 6:26 pm 27191
Thomas Thomas

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.

September 22, 2014 at 8:03 pm 27201
Tareq Hasan Tareq Hasan

@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.

September 22, 2014 at 9:51 pm 27227
Thomas Thomas

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?

September 23, 2014 at 1:02 am 27247
Tareq Hasan Tareq Hasan

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.

September 23, 2014 at 1:21 am 27249
Thomas Thomas

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/

September 23, 2014 at 1:25 am 27251
Tareq Hasan Tareq Hasan

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

September 23, 2014 at 1:52 am 27256
Thomas Thomas

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

September 24, 2014 at 12:16 am 27331
Tor B Tor B

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

September 24, 2014 at 3:53 pm 27414
Tareq Hasan Tareq Hasan

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

October 24, 2014 at 3:53 pm 29007
Brenda Brenda

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

October 25, 2014 at 2:52 am 29031
Brenda Brenda

Although I now have the vendors’ individual store pages showing up properly with the sidebar, the icons for their social links aren’t showing. What do I need to do so that will sow as well on their pages?

Finally, I’d like to include a free text field for them to describe themselves on their store page. How is this done?

Viewing 15 Posts - 1 through 15 (of 22 total)