Banner Logo

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

Problem on Wcmp Orders and sub-orders

WCMp Core

Resolved
Viewing 26 reply threads
  • Author
    Posts
    • #123623
      ecclesiastexavier98
      Participant

      Hello Team, we are using SUMO Reward Point to reward our customers when the main order is finished, BUT we have a serious problem with the sub-orders, the sub-orders attribute of the rewards What we don’t want

      https://www.loom.com/share/2cfc5abc282442c086804026e15f8e7c

    • #123624
      ecclesiastexavier98
      Participant

      We wish to have only one order and no sub-order this creates a problem with our SUMO Reward Point reward system

    • #123638

      Hi @ecclesiastexavier, thanks for getting in touch with us.

      It seems like a plugin conflict issue. However, in order to fix this, we need help from the SUMO plugin author.

      Kindly ask them how can we exclude their point system from any order. Also, we need to have access of their plugin.

    • #123641
      ecclesiastexavier98
      Participant

      The problem is not a plugin conflict, we only have main orders and no sub-orders.

    • #123654

      In order to fix this, we need help from the SUMO plugin author. Because we have to exclude the reward points from sub order.
      So, please ask them how can we exclude their point system from any order. Also, we need to have access to their plugin.

    • #123656
      ecclesiastexavier98
      Participant
      This reply has been marked as private.
    • #123685

      hi checking a third plugin coding and finding how they add reward points is quite time taking. That is why please do ask the plugin author regarding how they add reward points in an order. So we can apply the same concept for the sub order too and exclude that

    • #123695
      ecclesiastexavier98
      Participant

      Ok, I understand you here is our request
      We want the admin and seller to have only one joint order and NO sub-orders

      Other module as is Dokan, WFCM offers the function a single command for the admin and the seller

    • #123709

      Let me help you out with our flow. Sub order is an integral part of WC Marketplace allowing vendors to manage their respective orders. When customer completes the checkout, there will be different sub orders for every vendor. Each vendor can see the small summary of their order. All our vendor end data is calculated and fetched from sub order. i.e. vendor commission, vendor report, banking overview, payment history etc
      Admin can also view the suborder from their order menu. Beside each parent order section, the admin can also see the suborder section.
      Please refer the link to fetch more details regarding it’s functionality- https://multivendorx.com/knowledgebase/wcmp-split-order-module/
      so sub orders can’t be removed. But you can hide this or display parent order number instaed of sub order.
      let us know where do you want to see these changes, so we can help you out accordingly.

    • #123715
      ecclesiastexavier98
      Participant

      I understand but how do I hide the sub-order ?

    • #123716
      ecclesiastexavier98
      Participant

      In my opinion you must create a section for the admin does not wish to show the sub-orders

    • #123717

      can you please share a screenshot with us where do you want to hide your sub orders ??? so that we can help you out better

    • #123730
      ecclesiastexavier98
      Participant

      We want there to be MORE sub-orders but only one order for admin and sellers

    • #123739

      @ecclesiastexavier98, I am sorry but can you please explain this with some scrrenshots.

    • #123746
      ecclesiastexavier98
      Participant

      Here is the catch, we don’t want sub-orders for our sellers but only main orders

    • #123825

      Hi,
      Please add this code in the function.php of the current active theme :

      add_filter( 'manage_edit-shop_order_columns','wcmp_remove_suborder_column');
      function wcmp_remove_suborder_column($columns){
          // to remove just use unset
          unset($columns['wcmp_suborder']); // remove suborder column
      
          return $columns;    
      }
      Copy

      Regards,

    • #124018
      ecclesiastexavier98
      Participant

      The problem still persists:

      – I put the code in the site’s function.php file
      – The sub-commands section is no longer displayed in the admin
      – But it displays everything at the seller

      What we want is that he have a single order from admin and seller and no sub-order

    • #124070

      @ecclesiastexavier98, so you want to show the main order number instead of the suborder number. That is why we have requested earlier to let us know where do you need these changes.
      Can you please check once again and let us know where do you want this modification and give us a final list. This way our team can work on this at a go.

    • #124110
      ecclesiastexavier98
      Participant

      We want the main order and the sub-order at the seller to have the same ID, only one order number for the admin and the seller
      Watch on the capture

    • #124112
      ecclesiastexavier98
      Participant

      What we want is for the admin and the seller to have only one order number,
      We are not used to the subcommand and it creates bugs with our rewards system on completed orders

    • #124133

      @ecclesiastexavier98, In understand that you want only 1 order but as said earlier we can’t remove sub orders. To know more on our sub order, please do check our documentation first – https://multivendorx.com/knowledgebase/wcmp-split-order-module/
      It is the main core of WCMp, vendor order-related data.

      That is why you can hide this from admin end and customer end. But the whole vendor dashboard order, data, the report is based on this sub-order number and we display that there.

    • #124149
      ecclesiastexavier98
      Participant

      I understand you correctly from the beginning, in this case we will need a code to syncronize the main commands and the subcommands.
      We want that:

      When the admin modify the status of the main order for example like COMPLETE it changes the status of sub-order at the seller like COMPLETE also

    • #124179
      ecclesiastexavier98
      Participant

      Bonjour l’equipe j’ai resolu les bugs avec les codes suivant : The main commands and sub-commands under synchronize well

      // Auto complete sub orders
      add_action( ‘woocommerce_order_status_completed’, ‘wcmp_order_status_completed’ ); function wcmp_order_status_completed( $order_id ) { global $WCMp; $suborder_details = get_wcmp_suborders($order_id); foreach ($suborder_details as $key => $value) { $suborder_fetch = array( ‘ID’ => $value->get_id(), ‘post_status’ => ‘wc-completed’, ); wp_update_post( $suborder_fetch ); } }

      //Auto complete sub orders to cancelled
      add_action( ‘woocommerce_order_status_cancelled’, ‘wcmp_suborder_status_change_to_cancel’ ); function wcmp_suborder_status_change_to_cancel( $order_id ) { global $WCMp; $suborder_details = get_wcmp_suborders($order_id); foreach ($suborder_details as $key => $value) { $suborder_fetch = array( ‘ID’ => $value->get_id(), ‘post_status’ => ‘wc-cancelled’, ); wp_update_post( $suborder_fetch ); } }

      //Auto complete sub orders to processing
      add_action( ‘woocommerce_order_status_processing’, ‘wcmp_suborder_status_change_to_processing’ ); function wcmp_suborder_status_change_to_processing( $order_id ) { global $WCMp; $suborder_details = get_wcmp_suborders($order_id); foreach ($suborder_details as $key => $value) { $suborder_fetch = array( ‘ID’ => $value->get_id(), ‘post_status’ => ‘wc-processing’, ); wp_update_post( $suborder_fetch ); } }

    • #124180
      ecclesiastexavier98
      Participant

      But there is another bug with the seller’s commission:

      – Normally when an order is placed on the site it immediately creates a commission for the seller

      – When the order is canceled its should automatically remove the commission from the system, it does not work

    • #124200

      Hi, our team is working in this code i.e. “When the admin modify the status of the main order for example like COMPLETE it changes the status of sub-order at the seller like COMPLETE also”

      Kindly provide them some time.

    • #124265

      Hi,

      Sync parent order status ‘completed’ with sub order status

      Please add this code in the function.php of the current active theme :

      add_action('woocommerce_order_status_changed', 'wcmp_parent_order_to_vendor_order_status_synchronization', 999, 3);
      function wcmp_parent_order_to_vendor_order_status_synchronization( $order_id, $old_status, $new_status ){
          $parent_order_id = wp_get_post_parent_id($order_id);
          if($parent_order_id){
              // get sub-order of this parent order
              $suborders = get_wcmp_suborders( $parent_order_id );
              $sub_order_status = 0;
              $suborders_count = count($suborders);
              if($suborders){
                  foreach ($suborders as $order) {
                      if( $order->has_status('completed') ) {
                         $sub_order_status++;
                      }
                  }
              }
              //Chnage the parent order status 'completed' if all sub orders are complete.
              if( $sub_order_status == $suborders_count ){
                  $order = wc_get_order( $parent_order_id );
                  $order->update_status( 'completed' );
              }
          }
      }
      Copy

      Regards,

    • #127674

      We haven’t heard back from you for a while. We hope this issue is fixed, so we are closing this now.
      If you need any further help, please do open another thread.

Viewing 26 reply threads

The topic ‘Problem on Wcmp Orders and sub-orders’ is closed to new replies.