Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Ultimate › Rearrange Dashboard Widgets
- This topic has 3 replies, 2 voices, and was last updated 4 years, 7 months ago by Sarmistha Chakraborty.
- AuthorPosts
- May 12, 2020 at 8:26 pm #130100ashley.youngukParticipant
Hi
How can I rearrange the dashboard widgets?
I would like Notifications, Inquiries, Store Stats and Latest Topics at the top just under the 4 boxes and I would like large graph at the bottom.
Thank you,
- May 13, 2020 at 1:20 pm #130339Sarmistha ChakrabortyMember
Hello,
For this you have to override wcfm-view-wcfmmarketplace-dashboard.php file in your theme (yourtheme/wcfm/dashboard/) from “\wp-content\plugins\wc-frontend-manager\views\dashboard”.
And need to rearrange HTML.From below code we have marked the 4 sections(Notifications, Inquiries, Store Stats and Latest Topics) –
<div class="wcfm_dashboard_wc_status"> <div class="wcfm_dashboard_wc_status_data"> <?php //Notification block ?> <?php do_action( 'after_wcfm_dashboard_product_stats' ); ?> <div class="wcfm_dashboard_more_stats"> <!-----store stats block----> <?php if( apply_filters( 'wcfm_is_dashboard_more_stats', true ) && ( apply_filters( 'wcfm_is_allow_reports', true ) || apply_filters( 'wcfm_is_allow_orders', true ) ) ) { ?> <div class="page_collapsible" id="wcfm_dashboard_wc_status"> <span class="wcfmfa fa-list fa-clock"></span> <span class="dashboard_widget_head"><?php _e('Store Stats', 'wc-frontend-manager'); ?></span> </div> <div class="wcfm-container"> <div id="wcfm_dashboard_wc_status_expander" class="wcfm-content"> <ul class="wc_status_list"> <?php if( apply_filters( 'wcfm_is_allow_reports', true ) ) { ?> <?php if ( ( $top_seller = $WCFM->library->get_top_seller() ) && $top_seller->qty ) { ?> <li class="best-seller-this-month"> <a href="<?php echo apply_filters( 'sales_by_product_report_url', get_wcfm_reports_url( ), $top_seller->product_id ); ?>"> <span class="wcfmfa fa-cube"></span> <?php printf( __( '%s top seller in last 7 days (sold %d)', 'wc-frontend-manager' ), '<strong>' . get_the_title( $top_seller->product_id ) . '</strong> - ', $top_seller->qty ); ?> </a> </li> <?php } ?> <?php } ?> <?php do_action( 'after_wcfm_dashboard_sales_reports' ); ?> <?php if( apply_filters( 'wcfm_is_allow_orders', true ) ) { ?> <li class="processing-orders"> <a href="<?php echo get_wcfm_orders_url( ); ?>"> <span class="wcfmfa fa-life-ring"></span> <?php printf( _n( "<strong>%s order</strong> - processing", "<strong>%s orders</strong> - processing", $processing_count, 'wc-frontend-manager' ), $processing_count ); ?> </a> </li> <?php if( apply_filters( 'wcfm_is_allow_shipping_tracking', true ) ) { ?> <li class="on-hold-orders"> <a href="<?php echo get_wcfm_orders_url( ); ?>"> <span class="wcfmfa fa-truck"></span> <?php printf( _n( "<strong>%s product</strong> - awaiting fulfillment", "<strong>%s products</strong> - awaiting fulfillment", $unfulfilled_products, 'wc-frontend-manager' ), $unfulfilled_products ); ?> </a> </li> <?php } ?> <?php } ?> <?php do_action( 'after_wcfm_dashboard_orders' ); ?> <?php if( apply_filters( 'wcfm_is_allow_reports', true ) ) { ?> <li class="low-in-stock"> <a href="<?php echo apply_filters( 'low_in_stock_report_url', get_wcfm_reports_url( ) ); ?>"> <span class="wcfmfa fa-sort-amount-down"></span> <?php printf( _n( "<strong>%s product</strong> - low in stock", "<strong>%s products</strong> - low in stock", $lowinstock_count, 'wc-frontend-manager' ), $lowinstock_count ); ?> </a> </li> <li class="out-of-stock"> <a href="<?php echo get_wcfm_reports_url( '', 'wcfm-reports-out-of-stock' ); ?>"> <span class="wcfmfa fa-times-circle"></span> <?php printf( _n( "<strong>%s product</strong> - out of stock", "<strong>%s products</strong> - out of stock", $outofstock_count, 'wc-frontend-manager' ), $outofstock_count ); ?> </a> </li> <?php } ?> <?php do_action( 'after_wcfm_dashboard_stock_reports' ); ?> </ul> </div> </div> <?php } ?> </div> </div> <div class="wcfm_dashboard_wc_status_graph"> <?php do_action('after_wcfm_dashboard_zone_analytics'); //Store Stats?> <!--Latest Topics--> <?php if( apply_filters( 'wcfm_is_allow_notice', true ) && apply_filters( 'wcfm_is_allow_dashboard_latest_topics', true ) ) { ?> <div class="wcfm_dashboard_latest_topics"> <div class="page_collapsible" id="wcfm_dashboard_latest_topics"><span class="wcfmfa fa-bullhorn"></span><span class="dashboard_widget_head"><?php _e('Latest Topics', 'wc-frontend-manager'); ?></span></div> <div class="wcfm-container"> <div id="wcfm_dashboard_latest_topics_expander" class="wcfm-content"> <?php $args = array( 'posts_per_page' => 5, 'offset' => 0, 'orderby' => 'date', 'order' => 'DESC', 'post_type' => 'wcfm_notice', 'post_parent' => 0, 'post_status' => array('draft', 'pending', 'publish'), 'suppress_filters' => 0 ); $args = apply_filters( 'wcfm_notice_args', $args ); $wcfm_notices_array = get_posts( $args ); $wcfm_dashboard_notice_content_length = (int) apply_filters( 'wcfm_is_allow_dashboard_notice_content_length', 80 ); if( !empty( $wcfm_notices_array ) ) { foreach($wcfm_notices_array as $wcfm_notices_single) { echo '<div class="wcfm_dashboard_latest_topic"><a href="' . get_wcfm_notice_view_url($wcfm_notices_single->ID) . '" class="wcfm_dashboard_item_title"><span class="wcfmfa fa-bullhorn"></span>' . substr( $wcfm_notices_single->post_title, 0, $wcfm_dashboard_notice_content_length ) . ' ...</a></div>'; } } else { _e( 'There is no topic yet!!', 'wc-frontend-manager' ); } ?> </div> </div> </div> <?php } ?> </div> </div>
Add this section above –
<div class="wcfm_dashboard_wc_reports_sales">
section.Thanks.
- May 13, 2020 at 9:35 pm #130533ashley.youngukParticipant
Sorry! I’m pretty good at editing PHP but I don’t understand what your saying.
Could you clearly mark out the sections I need to move by putting //START and //END?
- May 13, 2020 at 9:49 pm #130536Sarmistha ChakrabortyMemberThis reply has been marked as private.
- AuthorPosts
- You must be logged in to reply to this topic.