Forum Replies Created
-
AuthorPosts
-
November 24, 2022 at 4:04 PM in reply to: Code for Customer adresses and product detail in the vendor dashboard #146703promitaKeymaster
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; }
CopyLet us know if you have any further query.
promitaKeymasterHi luanne, In order to remove customer questions submenu from the vendor dashboard, you can add this code in functions.php of your child theme :
//Delete customer questions submenu from Vendor Dashboard add_filter('mvx_vendor_dashboard_nav', 'callback_mvx_vendor_dashboard_nav', 99); function callback_mvx_vendor_dashboard_nav($vendor_nav){ unset($vendor_nav['store-settings']['submenu']['products-qna']); return $vendor_nav; }
CopyLet us know if you have any further query.
promitaKeymasterHi Klaus Thomas Russ, In order to hide those order status add this code in functions.php of your child theme :
//hide order status from vendor dashboard add_filter('mvx_vendor_order_statuses','hide_status'); function hide_status($status) { unset($status['wc-on-hold']); //remove on-hold unset($status['wc-failed']); //remove failed unset($status['wc-checkout-draft']); //remove draft return $status; }
CopyLet us know if you have any further query.
November 21, 2022 at 5:38 PM in reply to: Orders table, earnings, commissions and shipping cost #146510promitaKeymaster@ig, In order to change the order of the columns, you can override the vendor-orders.php file to your theme and change line no- 17-24 of this code:
$orders_list_table_headers = apply_filters('wcmp_datatable_order_list_table_headers', array( 'select_order' => array('label' => '', 'class' => 'text-center'), 'order_id' => array('label' => __( 'Order ID', 'dc-woocommerce-multi-vendor' )), 'order_date' => array('label' => __( 'Date', 'dc-woocommerce-multi-vendor' )), 'commission' => array('label' => __( 'Commission', 'dc-woocommerce-multi-vendor' )), 'shipping_charge' => array('label' => __( 'Shipping', 'dc-woocommerce-multi-vendor' )), 'vendor_earning'=> array('label' => __( 'Earnings', 'dc-woocommerce-multi-vendor' )), 'order_status' => array('label' => __( 'Status', 'dc-woocommerce-multi-vendor' )), 'action' => array('label' => __( 'Action', 'dc-woocommerce-multi-vendor' )), ), get_current_user_id());
Copyand add this code in functions.php of your child theme :
/* display value in additional column in vendor order table */ add_filter('wcmp_datatable_order_list_row_data', 'display_value_in_order_table_vendor', 10, 2); function display_value_in_order_table_vendor($vendor_rows, $order) { $commission_id = get_post_meta($order->get_id(), '_commission_id', true); $commission_amount = get_post_meta( $commission_id, '_commission_amount', true ); $vendor_rows['shipping_charge'] = $order->get_shipping_total(); $vendor_rows['commission'] = $commission_amount; return $vendor_rows; }
CopyLet us know if you have any further query.
November 18, 2022 at 5:55 PM in reply to: Orders table, earnings, commissions and shipping cost #146391promitaKeymasterHi Ivan Gacesa, In WC-marketplace 3.9.3, add this code in functions.php of your child theme :
/* add additional column in vendor order table */ add_filter('wcmp_datatable_order_list_table_headers', 'add_column_in_order_table_vendor', 10, 2); function add_column_in_order_table_vendor($orders_list_table_headers, $current_user_id) { $orders_list_table_headers['commission'] = array('label' => __( 'Commission', 'multivendorx' )); $orders_list_table_headers['shipping_charge'] = array('label' => __( 'Shipping', 'multivendorx' )); return $orders_list_table_headers; } /* display value in additional column in vendor order table */ add_filter('wcmp_datatable_order_list_row_data', 'display_value_in_order_table_vendor', 10, 2); function display_value_in_order_table_vendor($vendor_rows, $order) { $commission_id = get_post_meta($order->get_id(), '_commission_id', true); $commission_amount = get_post_meta( $commission_id, '_commission_amount', true ); $vendor_rows['shipping_charge'] = $order->get_shipping_total(); $vendor_rows['commission'] = $commission_amount; return $vendor_rows; }
CopyLet us know if you have any further query.
promitaKeymasterHi Klaus Thomas Russ, In order to hide this features from vendor dashboard, you can add this code in functions.php of your child theme :
add_filter( 'mvx_before_dashboard_widget', 'new_before_mvx_dashboard_widget', 10, 1 ); function new_before_mvx_dashboard_widget( $vendor_dashboard_widget ) { unset($vendor_dashboard_widget['side']['mvx_vendor_product_stats']); //remove Product Stats widget unset($vendor_dashboard_widget['full']['mvx_vendor_stats_reports']); //remove Stats report widget unset($vendor_dashboard_widget['normal']['mvx_vendor_visitors_map']); //remove visitors map return $vendor_dashboard_widget; }
CopyLet us know if you have any further query.
November 16, 2022 at 6:03 PM in reply to: Orders table, earnings, commissions and shipping cost #146277promitaKeymasterHi Ivan Gacesa, In order to add commission and shipping columns to the Orders table on the vendor dashboard, add this code in functions.php of your child theme :
/* add additional column in vendor order table */ add_filter('mvx_datatable_order_list_table_headers', 'add_column_in_order_table_vendor', 10, 2); function add_column_in_order_table_vendor($orders_list_table_headers, $current_user_id) { $orders_list_table_headers['commission'] = array('label' => __( 'Commission', 'multivendorx' )); $orders_list_table_headers['shipping_charge'] = array('label' => __( 'Shipping', 'multivendorx' )); return $orders_list_table_headers; } /* display value in additional column in vendor order table */ add_filter('mvx_datatable_order_list_row', 'display_value_in_order_table_vendor', 10, 2); function display_value_in_order_table_vendor($vendor_rows, $order) { $commission_id = get_post_meta($order->get_id(), '_commission_id', true); $commission_amount = get_post_meta( $commission_id, '_commission_amount', true ); $vendor_rows['shipping_charge'] = $order->get_shipping_total(); $vendor_rows['commission'] = $commission_amount; return $vendor_rows; }
CopyLet us know if you have any further query.
-
AuthorPosts