Banner Logo

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

Import custom fields in order

WCMp Advanced Frontend Manager

Resolved
Viewing 13 reply threads
  • Author
    Posts
    • #141741
      bhaa.said-6808
      Participant

      Hi,
      How can I import additional custom fields in the order for the vendors ?
      https://snipboard.io/2hvgie.jpg

      For example I want to add the shipping class of each item as well as other custom fields.

      Thank you

    • #141742
      bhaa.said-6808
      Participant

      Also please let me know how can I manually assign an order to a particular vendor

      Thank you

    • #141760

      Are you referring to this part (see this attachment). Then in order to add additional fields, you have to do custom code. Do you have any developer who can create this for you, then we will share coding guide.

      Regarding assigning a vendor to order, please note, that a vendor can only be added if you add a product that belongs to a vendor. Then click on Regenaate suborder : https://prnt.sc/vEulwNWoqtYD

    • #141782
      bhaa.said-6808
      Participant

      Thank you for your reply !

      Another question please : Is there any hook I can use to add some custom code in the area just above the orders ? like you can see on the picture :

      https://snipboard.io/nRugAO.jpg

      Thank you

    • #141800

      Hi,
      To add custom code in above order table, Override dc-woocommerce-multi-vendor/templates/vendor-dashboard/vendor-orders.php template by copying it to yourtheme/dc-product-vendor/vendor-dashboard/vendor-orders.php

      Regards,

    • #141933
      bhaa.said-6808
      Participant

      Thank you, Just like the filter by status feature in the vendor dashboard, is there a custom code I can add to be able to filter order per any other taxonomy ?

      Thank you

    • #141958

      Hi,
      For this you have to add custom code on your site. We don’t have any readymade code.
      Let me know if you need hook and filter for this.

      Regards,

    • #142017
      bhaa.said-6808
      Participant

      Yes,
      Kindly provide a hook and filter for this.
      Thanks a lot

    • #142060
      bhaa.said-6808
      Participant

      Hello, any updates on this ?

    • #142065

      Hi,
      As per your requirement you have to add good amount of custom code on your end.

      Override dc-woocommerce-multi-vendor/templates/vendor-dashboard/vendor-orders.php template by copying it to yourtheme/dc-product-vendor/vendor-dashboard/vendor-orders.php to add the field and send to the ajax function on load.

      use below hook to add functionality

      do_action(‘before_wcmp_orders_list_query_bind’, $filterActionData, $requestData, $vendor_all_orders);

      Let us know if you need any other help.

      Regards,

    • #142240
      bhaa.said-6808
      Participant

      Hello,

      Thank you very much, that worked well. There are 3 last edits I need to make before I am done.

      First I would like to add more statuses in the bulk actions in Order Page (You sent me the code to remove statuses but not to add some)

      Second, I would like to remove some statuses from the status filter in the order page.

      And lastly, I would like to setup the shipping to appear in the suborder, but in the same time I want to make sure that if an order has several suborders, the shipping gets counted only once in one of the suborders.

      Thank you very much.

    • #142250

      Hi, our replies are inline :

      – First I would like to add more statuses in the bulk actions in Order Page (You sent me the code to remove statuses but not to add some)
      >> In order to add more status, you have to do custom code. Do you have any developers, so we can assist them with this.

      – Second, I would like to remove some statuses from the status filter in the order page.
      >> let us know which fields do you want to remove so we can assist you accordingly.

      – And lastly, I would like to setup the shipping to appear in the suborder, but in the same time I want to make sure that if an order has several suborders, the shipping gets counted only once in one of the suborders.

      >> Can you please share a screenshot to explain the flow so we can assist you accordingly.

    • #142282
      bhaa.said-6808
      Participant

      Hi,

      1) yes we have a developer, we already have the custom code to remove some statuses from the filter, please provide the custom code to add some statuses in the bulk action.

      2) In the order page, the vendor can filter the orders per status. I would like to edit the status filter to prevent some statuses from appearing. Kindly provide some code to edit this. For example, removing the pending payments from the filter.

      3) If a client makes an order from several vendors, I want the shipping to be counted only once, in one of the sub-orders and the other won’t have any shipping fees. Is there any custom code for this ? In other words, I want shipping to be counted only once per order, in case there are several suborders.

      Thank you very much.

    • #142336

      Hi,
      our replies are below

      1) yes we have a developer, we already have the custom code to remove some statuses from the filter, please provide the custom code to add some statuses in the bulk action.

      >> kindly add below code and add custom code.

      add_filter( 'wcmp_bulk_actions_vendor_order_list', 'wcmp_add_custom_bulk_action');
      
      function wcmp_add_custom_bulk_action($bulk_action){
          $bulk_action['custom_status'] = __( 'Change Custom Status', 'dc-woocommerce-multi-vendor' );
      return $bulk_action;
      }
      
      add_action('wcmp_orders_list_do_handle_bulk_actions', 'wcmp_custom_bulk_action_function', 10, 4);
      function wcmp_custom_bulk_action_function($bulk_action, $ids, $requestData, $vendor_all_orders){
          if ($bulk_action == 'custom_status') {
              //your custom code here
          }
      }
      Copy

      2) In the order page, the vendor can filter the orders per status. I would like to edit the status filter to prevent some statuses from appearing. Kindly provide some code to edit this. For example, removing the pending payments from the filter.

      >> Using below filter you can remove status.

      apply_filters( 'wcmp_vendor_dashboard_order_filter_status_arr', array_merge( 
      array( 'all' => __('All', 'dc-woocommerce-multi-vendor'),
      'request_refund' => __('Request Refund', 'dc-woocommerce-multi-vendor') ), 
      wc_get_order_statuses()
      ) );
      Copy
Viewing 13 reply threads

The topic ‘Import custom fields in order’ is closed to new replies.