- This topic has 6 replies, 4 voices, and was last updated 3 years, 6 months ago by
James.
-
AuthorPosts
-
-
November 1, 2022 at 9:22 PM #145712
James
ParticipantHello,
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. -
November 2, 2022 at 11:13 AM #145739
NerdySupportExpert Moumita
KeymasterNot 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.
-
November 11, 2022 at 2:09 AM #146087
James
ParticipantHello,
Perfect !
You can close this thread 😉Best Regards.
James. -
November 11, 2022 at 1:00 PM #146108
Sangita Support Squad
KeymasterThanks 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. -
November 24, 2022 at 1:14 AM #146668
James
ParticipantThis reply has been marked as private. -
November 24, 2022 at 4:04 PM #146703
promita
KeymasterHi 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;
}
Let us know if you have any further query.
-
November 24, 2022 at 5:24 PM #146709
James
ParticipantHello,
Perfect thanks 🙂
Now you can close the thread.
Best regards.
James.
-
-
AuthorPosts
- The topic ‘Code for Customer adresses and product detail in the vendor dashboard’ is closed to new replies.




