Banner Logo

Be a part of the family: Connect, Receive Support,
Contribute, and Reap Abundant Rewards!

Add column to product overview table and insert code

WCMp Core

Resolved
Viewing 2 reply threads
  • Author
    Posts
    • #114125
      DIGICON GmbH
      Participant

      Hi,
      i want to insert a new column and insert code in it.

      add_filter('wcmp_vendor_dashboard_product_list_table_headers','wcmp_product_header' );
      
      function wcmp_product_header($products_table_headers){
          $products_table_headers['banner'] =  array('label' => __( 'Banner', 'dc-woocommerce-multi-vendor' ));
          return $products_table_headers;
      }
      Copy

      This is my first try and the column appears but the label is not shown. Also i have no idea how to get content into the columns row.

      I want to insert a special modal that opens and shows some information for each product.

      Similar to the order page you see here

    • #114198

      Hi,
      Here is the demo code. Use this in your current active themes functions.php file

      // For add extra header
      add_filter( 'wcmp_vendor_dashboard_product_list_table_headers', function($headers) {
          $headers['extra'] = __( 'Extra', 'dc-woocommerce-multi-vendor' );
          return $headers;
      } );
      // For add that headers content
      add_filter( 'wcmp_vendor_dashboard_product_list_table_row_data', function( $row, $product, $filterActionData, $requestData ) {
          $row['extra'] = $product->get_id();
          return $row;
      }, 10, 4 );
      Copy
    • #118177

      We have not received any update from you for a long. Hope this ticket is already been resolved.

      We are now closing this ticket. Kindly create a new one if you need any further help.

Viewing 2 reply threads

The topic ‘Add column to product overview table and insert code’ is closed to new replies.