Code for Customer adresses and product detail in the vendor dashboard

MultivendorX

Resolved
Viewing 6 reply threads
  • Author
    Posts
    • #145712
      James
      Participant

      Hello,

      I am wondering i still use this code :

      add_filter(‘wcmp_datatable_order_list_table_headers’, ‘test_callback’, 10, 2);
      function test_callback($orders_list_table_headers, $current_user_id) {
      $orders_list_table_headers[‘billing_name’] = array(‘label’ => __( ‘Noms et Adresses’, ‘dc-woocommerce-multi-vendor’ ));
      $orders_list_table_headers[‘products’] = array(‘label’ => __( ‘Articles’, ‘dc-woocommerce-multi-vendor’ ));
      return $orders_list_table_headers;
      }
      add_filter(‘wcmp_datatable_order_list_row_data’, ‘test_function’, 10, 2);
      function test_function($vendor_rows, $order) {
      $item_name = array();
      foreach ($order->get_items() as $item_key => $item_values) {
      $item_name[] = $item_values->get_name();
      }
      //print_r($item_name);
      $vendor_rows[‘billing_name’] = $order->get_billing_first_name() . ‘ ‘ . $order->get_billing_last_name() .'</br></br><b>Ship To:</b></br>’. $order->get_formatted_shipping_address();
      $vendor_rows[‘products’] = implode(” “, $item_name);
      return $vendor_rows;
      }

      maybe there is a different one for MVX i should use because the code refere to wcmp not mvx ?

      Best Regards.
      James.

    • #145739

      Not to worry James.As we have changed the plugin from WCMP to MVX you just need to replace wcmp with mvx in the code and the flow will work correctly.

    • #146087
      James
      Participant

      Hello,

      Perfect !
      You can close this thread 😉

      Best Regards.
      James.

    • #146108
      sangita
      Moderator

      Thanks for the update.
      We would love it if you shared your experience by giving us 5/5 review here : https://wordpress.org/support/plugin/dc-woocommerce-multi-vendor/reviews/#new-post
      Seeing glowing reviews from existing customers makes others more comfortable knowing they’ll get the support they need should an issue with our services arise.

    • #146668
      James
      Participant
      This reply has been marked as private.
    • #146703
      promita
      Moderator

      Hi James, use this code in your functions.php file.

      
      add_filter('mvx_datatable_order_list_table_headers', 'test_callback', 10, 2);
      function test_callback($orders_list_table_headers, $current_user_id) {
      	$orders_list_table_headers['billing_name'] = array('label' => __( 'Noms et Adresses', 'multivendorx' ));
      	$orders_list_table_headers['products'] = array('label' => __( 'Articles', 'multivendorx' ));
      	return $orders_list_table_headers;
      }
      add_filter('mvx_datatable_order_list_row', 'test_function', 10, 2);
      function test_function($vendor_rows, $order) {
      	$item_name = array();
      	foreach ($order->get_items() as $item_key => $item_values) {
      		$item_name[] = $item_values->get_name();
      	}
      	$vendor_rows['billing_name'] = $order->get_billing_first_name() . ' ' . $order->get_billing_last_name() .'</br></br><b>Ship To:</b></br>'. $order->get_formatted_shipping_address();
      	$vendor_rows['products'] = implode(" ", $item_name);
      	return $vendor_rows;
      }
      
      Copy

      Let us know if you have any further query.

    • #146709
      James
      Participant

      Hello,

      Perfect thanks 🙂

      Now you can close the thread.

      Best regards.
      James.

Viewing 6 reply threads

The topic ‘Code for Customer adresses and product detail in the vendor dashboard’ is closed to new replies.