how to customize front end for Vendor

WCMp Core

Resolved
Viewing 39 reply threads
  • Author
    Posts
    • #140820
      iamonthemarketer
      Participant

      Hello and thank to everyone who will take the time to provide answers to this post.

      Is it possible for the site admin to choose what item he needs to activate for vendor in Front end?

      I would like to disable the StoreFront see picture

      also disable management of order from vendor dashboard

      – > from my test I see that Vendor needs to approve order

      In my website, I just need to provide access to sales reports to vendor for products that are assign to them. they can upload product for approval but that’s all.

      So on the dashboard they should be able to see sales for all products they have and they should be able to check as woocommerce will display sales reports for one product.

      I also need to know how to display sales reports in woocommerce default currency.

      Right now the order menu from dashboard show the default currency from woocommerce but not the sale report page.

      I also made a test with a sale for the vendor in screenshot but the sale do not show for the vendor in his dashboard.

      I am the one who is going to promote the website and take care of interactions or issue cx will face.

    • #140842

      Hi, thanks for getting in touch with us.

      Our replies are inline :

      – I would like to disable the StoreFront see the picture

      >> For this add this code in the function.php of your theme :

      add_filter('wcmp_vendor_dashboard_header_right_panel_nav', 'wcmp_vendor_dashboard_header_right_panel_nav');
      function wcmp_vendor_dashboard_header_right_panel_nav($right_nav){
         if(isset($right_nav['storefront'])){
             unset($right_nav['storefront']);
         }
         return $right_nav;
      }
      Copy

      – So on the dashboard, they should be able to see sales for all products they have and they should be able to check as woocommerce will display sales reports for one product.

      >> We do let vendors see all the sales in their order tab.
      Now may I know what are you referring to as woocommerce will display sales reports for one product. some scrrenshot will be very much helpful.

      – In my website, I just need to provide access to sales reports to vendor for products that are assign to them. they can upload product for approval but that’s all.

      >> Let us know which fields do you want to remove so we can assit you accordingly.

      – I also need to know how to display sales reports in woocommerce default currency.

      >> As you can see we display the report in the woocommerce currency: https://watch.screencastify.com/v/oYsdedc8oLLubtyQGx7q

      So, may I know which currency are you using, so we can check the same on our end.

      Right now the order menu from the dashboard shows the default currency from woocommerce but not the sale report page.

      – I also made a test with a sale for the vendor in the screenshot but the sale do not show for the vendor in his dashboard.

      >> We display data in the report for pending and completed orders only.

    • #140849
      iamonthemarketer
      Participant

      Thank you for your reply.

      So I will send screenshot with the idea I have for the vendor dashboard.

      with the fist screenshot I need to hide menu in the red rectangle. screenshot 1 (dashboard)

      and the first page vendor need to see will be the page of sale reports -> screenshot 2 (home for vendor), but you will see that now it display $ instead of CFA (default woocommerce currency).

      And in the sales reports submenu banking screenshot 3 it still show currency in $. On this page there is link for order can I disabled it since orders are not going to be in the dashboard menu.

      regarding this comment
      ####
      – So on the dashboard, they should be able to see sales for all products they have and they should be able to check as woocommerce will display sales reports for one product.

      >> We do let vendors see all the sales in their order tab.

      see pictures attached.
      screnshoot 4.

      I hope this will give you a better understanding of my ideas.

      Thank you.

    • #140852
      iamonthemarketer
      Participant

      Just realized I forgot some screenshots.

    • #140859

      Hi @iamonthemarketer, can you please update the older code with this new code :

      add_filter('wcmp_vendor_dashboard_header_right_panel_nav', 'wcmp_vendor_dashboard_header_right_panel_nav');
      function wcmp_vendor_dashboard_header_right_panel_nav($right_nav){
             unset($right_nav['storefront']);
             unset($panel_nav ['wp-admin']);
             return $right_nav;
      }
      Copy
      add_filter('wcmp_vendor_dashboard_nav', 'callback_wcmp_vendor_dashboard_nav', 99);
      function callback_wcmp_vendor_dashboard_nav($vendor_nav){
         unset($vendor_nav['dashboard']); // for payments
         unset($vendor_nav['vendor-orders']); // for Stats / Reports
         unset($vendor_nav['vendor-tools']); // for Stats / Reports
         return $vendor_nav;
      }
      Copy
      add_filter( 'wcmp_vendor_dashboard_header_nav', 'filter_wcmp_vendor_dashboard_header_nav', 10, 1 );
      function filter_wcmp_vendor_dashboard_header_nav( $header_nav ) {
      	unset($header_nav['shop-link']); //remove Vendor Shop Link
      	unset($header_nav['orders']); //remove Add Product Link
      	return $header_nav;
      }
      Copy

      Now our dashboard page is the default landing page for vendors, hence you need to set a default landing page too. May I know which page do you want to set as the default landing page? We will provide the code as per that.

      For the currency issue, can you please share the scrrenshot of the WooCommerce >> settings page so we can check on our end also.

    • #140898
      iamonthemarketer
      Participant

      Hello Thank you again for you response,

      I was able to add the function in the theme child function files.

      After some test I have the following request.

      I will like to remove the page that let vendor add products, as this one as too many field for them and I prefer to care of it.

      I would like to know if I create a form for vendor to upload product if that can be added to their dashboard.

      If that will required a lot of work for you them I will create a page for them to do that.

      For the currency the dashboard still display currency in $.

      I will also add screenshot:

      For the dasboard homepage we can keep the current page but I want to hide the section “Your Store report – last 7 days” see screenshot 1
      I also want to hide the section for customer question on the same page see screenshot2

      on the section product manager we keep only all products and remove add product see screenshot 3, I also want to hide the delete product see screenshot 3.

    • #140902
      iamonthemarketer
      Participant

      one more thing I forgot to add here is I do not want vendor to approve order as they just need to see the sales that were made for product assign to them.

    • #140942

      Hi,
      Kindly add below code to your function.php of the active current theme.

      I will like to remove the page that let vendor add products, as this one as too many field for them and I prefer to care of it.

      add_filter('wcmp_vendor_dashboard_nav', 'callback_wcmp_vendor_dashboard_nav', 99);
      function callback_wcmp_vendor_dashboard_nav($vendor_nav){
      unset($vendor_nav['vendor-products']['submenu']['add-product']);
      return $vendor_nav;
      }
      Copy

      I would like to know if I create a form for vendor to upload product if that can be added to their dashboard.

      >> For this you have to add custom code. Kindly let us know what do you want. So, we will share some hook and filter accordingly.

      For the currency issue, can you please share the scrrenshot of the WooCommerce >> settings page so we can check on our end also.

      kindly add below code to the function.php as per your screenshot.

      add_action('init', 'wcmp_custom_changes');
      function wcmp_custom_changes(){
      	global $WCMp;
      	remove_action('wcmp_dashboard_setup', array($WCMp->vendor_dashboard, 'wcmp_dashboard_setup'), 5);
      	add_action('wcmp_dashboard_setup', 'wcmp_dashboard_setup', 5);
      }
      
      function wcmp_dashboard_setup() {
      	global $WCMp;
          $vendor = get_wcmp_vendor(get_current_user_id());
          $WCMp->vendor_dashboard->wcmp_add_dashboard_widget('wcmp_vendor_stats_reports', '', array($WCMp->vendor_dashboard, 'wcmp_vendor_stats_reports'), 'full');
          $trans_details_widget_args = array();
          if (apply_filters('wcmp_vendor_dashboard_menu_vendor_withdrawal_capability', false)) {
              $trans_details_widget_args['action'] = array('title' => __('Withdrawal', 'dc-woocommerce-multi-vendor'), 'link' => esc_url(wcmp_get_vendor_dashboard_endpoint_url(get_wcmp_vendor_settings('wcmp_vendor_withdrawal_endpoint', 'vendor', 'general', 'vendor-withdrawal'))));
          }
          $WCMp->vendor_dashboard->wcmp_add_dashboard_widget('wcmp_vendor_transaction_details', __('Transaction Details', 'dc-woocommerce-multi-vendor'), array($WCMp->vendor_dashboard, 'wcmp_vendor_transaction_details'), 'side', array(), $trans_details_widget_args);
          $visitor_map_filter_attr = apply_filters('wcmp_vendor_visitors_map_filter_attr', array(
              '7' => __('Last 7 days', 'dc-woocommerce-multi-vendor'),
              '30' => __('Last 30 days', 'dc-woocommerce-multi-vendor'),
          ));
          $visitor_map_filter = '<div class="widget-action-area pull-right">
              <select id="wcmp_visitor_stats_date_filter" class="form-control">';
          if ($visitor_map_filter_attr) {
              foreach ($visitor_map_filter_attr as $key => $value) {
                  $visitor_map_filter .= '<option value="' . $key . '">' . $value . '</option>';
              }
          }
          $visitor_map_filter .= '</select>
          </div>';
          if(!apply_filters('wcmp_is_disable_store_visitors_stats', false))
              $WCMp->vendor_dashboard->wcmp_add_dashboard_widget('wcmp_vendor_visitors_map', __('Visitors Map', 'dc-woocommerce-multi-vendor'), array($WCMp->vendor_dashboard, 'wcmp_vendor_visitors_map'), 'normal', '', array('action' => array('html' => $visitor_map_filter)));
          if ($vendor->is_shipping_enable()):
              $WCMp->vendor_dashboard->wcmp_add_dashboard_widget('wcmp_vendor_pending_shipping', __('Pending Shipping', 'dc-woocommerce-multi-vendor'), array($WCMp->vendor_dashboard, 'wcmp_vendor_pending_shipping'));
          endif;
          if (current_user_can('edit_products')) {
              $WCMp->vendor_dashboard->wcmp_add_dashboard_widget('wcmp_vendor_product_stats', __('Product Stats', 'dc-woocommerce-multi-vendor'), array($WCMp->vendor_dashboard, 'wcmp_vendor_product_stats'), 'side', '');
              $WCMp->vendor_dashboard->wcmp_add_dashboard_widget('wcmp_vendor_product_sales_report', __('Product Sales Report', 'dc-woocommerce-multi-vendor'), array($WCMp->vendor_dashboard, 'wcmp_vendor_product_sales_report'));
          }
          if (get_wcmp_vendor_settings('is_sellerreview', 'general') == 'Enable') {
              $WCMp->vendor_dashboard->wcmp_add_dashboard_widget('wcmp_customer_reviews', __('Reviews', 'dc-woocommerce-multi-vendor'), array($WCMp->vendor_dashboard, 'wcmp_customer_review'));
          }
          // Vendor followeres list
          if ( get_wcmp_vendor_settings('store_follow_enabled', 'general') && get_wcmp_vendor_settings('store_follow_enabled', 'general') == 'Enable' ) {
              $WCMp->vendor_dashboard->wcmp_add_dashboard_widget('wcmp_vendor_follower', __('Followers', 'dc-woocommerce-multi-vendor'), array($WCMp->vendor_dashboard, 'wcmp_vendor_followers'));
          }
          $WCMp->vendor_dashboard->wcmp_add_dashboard_widget('wcmp_vendor_products_cust_qna', __('Customer Questions', 'dc-woocommerce-multi-vendor'), array($WCMp->vendor_dashboard, 'wcmp_vendor_products_cust_qna'), 'side', '', array('action' => array('title' => __('Show All Q&As', 'dc-woocommerce-multi-vendor'), 'link' => esc_url(wcmp_get_vendor_dashboard_endpoint_url(get_wcmp_vendor_settings('wcmp_vendor_products_qnas_endpoint', 'vendor', 'general', 'products-qna'))))));
      }
      Copy
      add_filter( 'wcmp_vendor_dashboard_header_nav', 'filter_wcmp_vendor_dashboard_header_nav', 10, 1 );
      function filter_wcmp_vendor_dashboard_header_nav( $header_nav ) {
          
          unset($header_nav['add-product']); //remove Add Product Link
          return $header_nav;
      }
      
      add_filter( 'before_wcmp_dashboard_widget', 'filter_before_wcmp_dashboard_widget', 10, 1 );
      function filter_before_wcmp_dashboard_widget( $vendor_dashboard_widget ) {
              unset($vendor_dashboard_widget['side']['wcmp_vendor_products_cust_qna']);  //remove Customer Questions widget
              
          return $vendor_dashboard_widget;
      }
      Copy

      >> one more thing I forgot to add here is I do not want vendor to approve order as they just need to see the sales that were made for product assign to them.

      >> Please explain to us what kind of modification are you looking for for this topic.

      Regards,

    • #140981
      iamonthemarketer
      Participant

      So when an order is made on he website with the plugin original configuration vendors needs to approve orders before the show as complete otherwise it only shows pending in the woocommerce orders details.(see screenshot : order is pending in admin dashboard and vendor )

      I would like to know if it is possible to set up a zoom meeting with one of you to make sure I explain any questions you might have regard the customization I want to do.

      And another thing I notice is that reports email sent to vendor includes orders details as file attached, I would like to have it removed and only keep the report.

      And in the banking overview in the menu Stats / Reports is it normal to have 2 currencies? (See screenshot)

    • #140994

      @iamonthemarketer, let us know when you will be available tomorrow between 11 am IST to 5 pm IST?

    • #141094
      iamonthemarketer
      Participant

      Hello I was offline for some days.

      Can we reschedule it ?

      what day of the week are you available? also I am in MST time zone

    • #141118

      Sure @iamonthemarketer, how about tomorrow (10.08.22) at 9 pm IST

    • #141126
      iamonthemarketer
      Participant

      can we make it around 7:30Pm for you?
      this will be 8am for me on 10.08.2022

    • #141129
    • #141150
      This reply has been marked as private.
    • #141151
      This reply has been marked as private.
    • #141195
      iamonthemarketer
      Participant

      Hello,

      after additional test I see that orders are not showing as sales for vendor until they are mark as completed by site admin.

      Is there a way to set the status as completed by default for all orders for vendors? or just use they from admin dashboard?
      I also want to remove attached files sent to vendors (sales reports). When I was looking in emails sent from woocommerce I found the template for Vendor orders stats report.

      can you confirm if by removing the following line from that php files

      <?php if($attachments && count($attachments) > 0 && $report_data[‘order_data’] && count($report_data[‘order_data’]) > 0 ){ ?>
      <p><?php echo esc_html__( ‘Please find your report attachment’, ‘dc-woocommerce-multi-vendor’ ); ?></p>
      <?php }else{ ?>
      <p><?php echo esc_html__( ‘There is no stats report available.’, ‘dc-woocommerce-multi-vendor’ ); ?></p>
      <?php } ?>

      this will remove attached files?

    • #141201

      @iamonthemarketer, can you please create a staging site and share a temporary admin, FTP access so we can check?
      While sharing the access, don’t forget to mark the response as private.

    • #141202

      @iamonthemarketer, can you please create a staging site and share a temporary admin, FTP access so we can check?
      While sharing the access, don’t forget to mark the response as private.

    • #141222
      iamonthemarketer
      Participant

      ok. sounds good

    • #141268

      @iamonthemarketer, we are still waiting for the access.

    • #141289
      iamonthemarketer
      Participant
      This reply has been marked as private.
    • #141347
      This reply has been marked as private.
    • #141367
      iamonthemarketer
      Participant
      This reply has been marked as private.
    • #141393
      This reply has been marked as private.
    • #141418
      iamonthemarketer
      Participant

      Hello,

      with the admin password are you able to see what I am talking about?

    • #141462

      Hi,
      To remove vendor order report email attachment kindly add below code to your function.php and test

      add_filter( 'wcmp_vendor_orders_stats_report_email_attachments', 'custom_wcmp_attachemnt_null'); 
      function custom_wcmp_attachemnt_null ( $attachments ){
          return $attachments = '';
      
      }
      Copy

      Regards,

    • #141486

      Regarding the order sync, let me assit you with the flow :

      – When an order is created on the woocommerce end, we create the corresponding sub-order.
      – Now, we check the initial order status of the order from woocommerce’s main order and set same order status for suborders too
      – After that, each vendor/admin needs to change order status for each sub-order
      – Therefore, apart from initial order status, if you change status of an order, this will not affect the sub order’s status
      Now, you need to add some custom code to sync the parent order status with the sub orders:

      // Auto complete sub orders	
      add_action( 'woocommerce_order_status_completed', 'wcmp_order_status_completed' );	
      function wcmp_order_status_completed( $order_id ) 
      {	 
      global $WCMp;	 
      $suborder_details = get_wcmp_suborders($order_id);	 
      foreach ($suborder_details as $key => $value) {	     
      $suborder_fetch = array('ID'=> $value->get_id(),'post_status'=>'wc-completed',);	     
      wp_update_post( $suborder_fetch );	 
      }	
      }
      Copy
    • #141525
      iamonthemarketer
      Participant

      thank you again I will add that in the function and see how it works for orders.

      I noticed when making more test that customer details are still available to vendors via orders.

      is it possible to hide the download csv ? as it still send vendor customer details.see picture 1

      And Also can we disable link to order detail? see picture 2

    • #141580

      Hi, add this css via wWCMp >> Settings >> Vendor >> Frontend >> Custom css :

      form#wcmp_order_list_form .wcmp-action-container input.btn.btn-default {
          display: none;
      }
      Copy

      Our dev team will share the other code.

    • #141606

      In order to remove the link, you have to do a custom code. For this please do use our filter, and use this to add your own code :

      apply_filters( 'wcmp_ledger_data_store_before_create_data', $data );
      Copy
    • #141611
      iamonthemarketer
      Participant

      apply_filters( ‘wcmp_ledger_data_store_before_create_data’, $data );
      do I add this in the function file ?

    • #141622

      @iamonthemarketer, this is our filter name. You need to use this filter to add your code, which will remove the link.

    • #142113
      iamonthemarketer
      Participant

      Hello,

      I added the code to remove the report attachemnt but email still send the attachment and I set reports to be sent daily but it only send weekly.

    • #142125

      @iamonthemarketer, please share the code so we can check.

    • #142151
      iamonthemarketer
      Participant

      add_filter( ‘wcmp_vendor_orders_stats_report_email_attachments’, ‘custom_wcmp_attachemnt_null’);
      function custom_wcmp_attachemnt_null ( $attachments ){
      return $attachments = ”;

      }
      this code was suggested to remove reports attachment from email sent to vendor.

      I added the code but it is not working.

      I was not able to hide the download csv on the overview page.

    • #142173

      @iamonthemarketer, our team will check and get back to you.
      Kindly provide them some time.

    • #142207

      Hi,

      Kindly add below code to your function.php of the active theme to remove download csv on the overview page.

      add_filter('can_wcmp_vendor_export_orders_csv', '__return_false');
      Copy

      Regards,

    • #142437
      iamonthemarketer
      Participant

      thank you again for the codde so shsould I just use this one and remove the last one or they are to be used together?

      previous code is the following
      add_filter( ‘wcmp_vendor_orders_stats_report_email_attachments’, ‘custom_wcmp_attachemnt_null’);
      function custom_wcmp_attachemnt_null ( $attachments ){
      return $attachments = ”;

      }

      Also I would like to know how to send email daily as it only send email weekly

    • #142467

      Yes, just use the last code we have shared.

Viewing 39 reply threads

The topic ‘how to customize front end for Vendor’ is closed to new replies.