Display the order and sub-order number side by side in the commission

MultivendorX Pro

Resolved
Viewing 5 reply threads
  • Author
    Posts
    • #189339
      kevajo
      Participant

      1) Display the order and sub-order number side by side (200-201) in the commission table.

      Here is the old code on wcmp but it no longer works on MX:
      // displays under order and order in commission
      add_action(‘manage_pages_custom_column’,’new_wcmp_register_custom_columns’, 1, 2);
      function new_wcmp_register_custom_columns($column_name, $id){
      global $WCMp,$woocommerce;
      $sub_order_id = get_post_meta($id, ‘_commission_order_id’, true);
      $order = wc_get_order($sub_order_id);
      $parents_order_id = wp_get_post_parent_id($sub_order_id);
      switch ($column_name) {
      case ‘_commission_order_id’:
      $edit_url = ‘post.php?post=’ . $parents_order_id . ‘&action=edit’;
      echo ‘#’ . $parents_order_id . ‘ – ‘;
      break;
      }
      }

      2 )
      We also want to remove the Multivendor X ad on the side because it completely reduces the space in our different tabs.
      I remind you that we use the pro version, so this ad does not bring us anything.

      Thank you for helping us

    • #189348

      The team is looking into the matter . Kindly provide them some time.

    • #189349
      kevajo
      Participant

      okay

    • #189484

      Hi Kevajo, our replies are inline :
      1) Display the order and sub-order number side by side (200-201) in the commission table.
      >> Add this code in the function.php of the theme

      add_filter('mvx_commissions_table_columns_data', 'change', 10, 2);
      function change( $commission_list, $commission_value ){
          $suborder_id = get_post_meta($commission_value, '_commission_order_id', true);
          $parents_order_id = wp_get_post_parent_id($suborder_id);
          $suborder_edit_url = 'post.php?post=' . $suborder_id . '&action=edit';
          $parents_order_edit_url = 'post.php?post=' . $parents_order_id . '&action=edit';
      
          $commission_list['order_id'] = '<a href="' . esc_url($parents_order_edit_url) . '">#' . $parents_order_id . '</a>' . '-' . '<a href="' . esc_url($suborder_edit_url) . '">' . $suborder_id . '</a>';
          return $commission_list;
      }
      Copy

      2 )
      We also want to remove the Multivendor X ad on the side because it completely reduces the space in our different tabs.

      >> We will remove this in our next update.

    • #189486
      kevajo
      Participant

      thank you

    • #189489
      kevajo
      Participant

      You can close it works

Viewing 5 reply threads

The topic ‘Display the order and sub-order number side by side in the commission’ is closed to new replies.