How to remove tabs with reviews, and other features of reviews.

MultivendorX

Resolved
Viewing 10 reply threads
  • Author
    Posts
    • #193874
      l.gan
      Participant

      Hi guys, sorry to bother you.

      I have a little problem with comments.
      I use Woodmart. Since there is incompatibility with the woodmart theme and your plugin (I don’t know when there will be compatibility), I have to use the code to return the old vendor page.
      add_filter(‘mvx_load_default_vendor_store’, ‘__return_true’);

      1. Thus, the tab with store review comments goes to the bottom of the vendor’s store page. Please see it on the video. Tell me how to remove this tab completely (But to keep the ability to display the average rating in the header of the vendor’s store).
      I tried to remove all the code from the mvx-vendor-review-form.php file in the child theme, it’s a “crutch”, but maybe you have a better solution?

      2. Based on point 1 – how can I remove the link to reviews on the order page?

      3. How can I remove the Reviews tab from their vendor dashboard?

      —In fact, I enabled comments in the settings of the Multivendor plugin, because I need the average rating of the seller’s products. If you have a way to display the seller’s average rating (including on the vendor’s shop page, in the “More offers” tab of products) based on all reviews on his products, not including all reviews – please share the code.

      Can you please tell me if the network plans to make it possible for the vendor to respond to customer reviews on the single product page? (not on the vendor page?)
      For example, in the theme I use there is a setting where you can respond as a store manager with a list of all comments.

      https://drive.google.com/file/d/1i5mD1-VwZsBWlRZBSycUXbik5aAF7cWO/view?usp=sharing

    • #193913

      Hi @l.gan Our replies are inline with your queries-

      1. Thus, the tab with store review comments goes to the bottom of the vendor’s store page. Please see it on the video. Tell me how to remove this tab completely (But to keep the ability to display the average rating in the header of the vendor’s store).
      I tried to remove all the code from the mvx-vendor-review-form.php file in the child theme, it’s a “crutch”, but maybe you have a better solution?
      >> Add the below code in the functions.php file of your active theme to remove the review tab from –

       add_filter( 'mvx_store_tabs', 'remove_tabs', 10, 1 ); 
      function remove_tabs( $tabs ) {  
         unset($tabs[1]);     
      return $tabs; }
       
      Copy

      2. Based on point 1 – how can I remove the link to reviews on the order page?
      >> To remove the leave feedback option from the order page you need to override the template file.
      Follow this path to remove the option by overriding yourtheme/MultiVendorX/review/review-link.php.

      3. How can I remove the Reviews tab from their vendor dashboard?
      >> Add the below code in the functions.php file of your active theme –

       
      add_filter( 'mvx_before_dashboard_widget', 'remove_mvx_dashboard_widget', 10, 1 ); 
      function remove_mvx_dashboard_widget( $vendor_dashboard_widget ) {   
      unset($vendor_dashboard_widget['normal']['mvx_customer_reviews']);
           return $vendor_dashboard_widget; 
      }
       
      Copy

      Also for the reply to the customer’s review from the review section of the single product page, we will forward this to the product enhancement team and they will take further decisions.

    • #193922
      l.gan
      Participant

      Sangita, thank you very much for your help.

      Could I ask you more, please tell me how can I show the average rating of the vendor and the number of his comments (please see the photo, I circled it) on the product page? I need exactly the average rating of one vendor (who sells the product), not the product rating.

      i tried echo wc_get_rating_html([‘rating_data’][‘avg_rating’] ); but it did not help.

    • #194028
      promita
      Keymaster

      Hi @l.gan, you can get the average rating of the vendor using this code.

      
      $store_id = get_current_user_id();
      $vendor_term_id = get_user_meta( $store_id, '_vendor_term_id', true );
      $rating_val_array = mvx_get_vendor_review_info($vendor_term_id);
      $rating = $rating_val_array['avg_rating'];
      
      Copy
    • #194039
      l.gan
      Participant
      This reply has been marked as private.
    • #194049

      @l.gan, where do you want to show the review?

    • #194051
      l.gan
      Participant

      Moumita hello,
      thanks for your answer and help!

      I would like to display this under the “buy” button.
      Vendor Rating: Exactly as per vendor page (photo above post thread)

    • #194085

      our team will provide you with the code. Kindly give them some time.

    • #194126

      Add the below code in the functions.php file of your current active theme –

      
      
      add_action( 'woocommerce_after_add_to_cart_button', 'add_content_after_addtocart_button_func' );
      
      function add_content_after_addtocart_button_func() {
          $product_id = get_the_ID();
          $store_id = isset(get_mvx_product_vendors(absint($product_id))->id) ? get_mvx_product_vendors(absint($product_id))->id  : 0;
          if($store_id){
              $vendor_term_id = get_user_meta( $store_id, '_vendor_term_id', true );
              $rating_val_array = mvx_get_vendor_review_info($vendor_term_id);
              $rating = $rating_val_array['avg_rating'];
              $count = intval($rating_val_array['total_rating']);
              $review_text = $count > 1 ? __('Reviews', 'multivendorx') : __('Review', 'multivendorx');
              ?>  
              <div>
              <?php if ($count > 0) { 
                  echo '<div class="star-rating"><span style="width:'.( ( $rating / 5 ) * 100 ) . '%"><strong itemprop="ratingValue" class="rating">'.$rating.'</strong> '.__( 'out of 5', 'woocommerce' ).'</span></div>';
                  echo esc_html(sprintf(' %s %s', $count, $review_text));
              } else {
                  echo __(' No Review Yet ', 'multivendorx');
              } ?>
              </div>
              <?php
          }
          
      }
      
      Copy
      • #194177
        l.gan
        Participant

        Thanks guys!

        Best support !

    • #194178

      You are welcome. Happy to help.
      It would be really great if you can give us 5/5 review here: https://wordpress.org/support/plugin/dc-woocommerce-multi-vendor/reviews/#new-post
      This would motivate the team further to do their job more efficiently.

    • #195937

      Its been a while and we have not heard back from you. We are closing this thread. If you need help or face issue in future please create a new thread.

Viewing 10 reply threads

The topic ‘How to remove tabs with reviews, and other features of reviews.’ is closed to new replies.