Banner Logo

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

Vendor cannot change order status + High-Performance Order Storage compatibility

MultivendorX

Resolved
Viewing 45 reply threads
  • Author
    Posts
    • #148196
      l.gan
      Participant

      Hello

      1. The function “Allow vendor to change order status” is enabled, but in fact the vendor cannot change the order status. Could you check it from your side.

      2. Will there be compatibility with High-Performance Order Storage (HPOS) new Woocommerce function soon? While it is beta, but as far as I understand it will soon become a daily feature.

    • #148211

      Hi i.gan, our replies are inline :

      1. The function “Allow vendor to change order status” is enabled, but in fact the vendor cannot change the order status. Could you check it from your side.

      >> Hi, as you can see this is working fine on our end : https://jhn4wdmbd4.vmaker.com/record/idAoIEnGlqf2ameF

      Can you please check whether the settings is configured properly via MultiVendorX >> Settings >> Orders

      2. Will there be compatibility with High-Performance Order Storage (HPOS) new Woocommerce function soon? While it is beta, but as far as I understand it will soon become a daily feature.

      >> I am afraid we haven’t tested this on our end.So please do test this in your end, if you do face any issue let us know. We will assit you accordingly.

    • #148215
      l.gan
      Participant

      Hello

      Thanks for the reply

      1. yes i checked it was my mistake, your plugin works fine.

      2. I haven’t tried to enable this feature yet, but I mean woocommerce will create a new table for orders. And it will somehow depend on the suborders. I have a test site, I will try to test and let you know. But for now, you can see a warning from the woocommerce plugin that MultivendorX is incompatible with the new feature.
      _____

      Please help I have a few more questions:

      3. I created a new order status “wc-delivery” Delivered using Nuggethon’s Custom Order Statuses for WooCommerce plugin.

      This status is partially displayed in the vendor panel.
      Please see the photo, I marked the order areas with numbers.

      How to add the number 3 in the field – Bulk actions – Change the status “Delivered”?

      4. How to remove the number 4 from the field – filter by order status: remove “Draft”, “Failed”, “Pending payment”?

      5. In the order, it is possible to change the status of the order.
      My new order status “Delivered” is added there – everything is ok.

      But please tell me how to remove the statuses from there: Pending payment, Draft, Failed?

    • #148219
      Justin Harrison
      Participant

      Re: HPOS compatibility

      Your response @NerdySupport makes it seem like you do not even know what HPOS is which is concerning since your plugin directly integrates with and relies on WooCoommerce. HPOS is how WooCommerce will store orders in the database in the future. If you have not already started to plan to adjust your code to work with it, you are behind the curve. Simply enabling HPOS in WooCommerce to see if there are “issues” should not be the goal. The goal should be to update MultivendorX so that it takes advantage of the new HPOS system when available because it will greatly improve database performance. The plan is to roll out HPOS as the default method of data storage in WooCommerce 8.0 which is expected to be released in August 2023. I would love to enable HPOS now, but there’s really no point because MultivendorxX won’t take advantage of the benefits as it is not compatible. Hopefully by August 2023 when WooCommerce rolls this out in 8.0 and compatibility is required, MultivendorX will be up to date.

    • #148295

      @Justin Harrison, from our support team’s perspective, we haven’t tested this.

      However our developers are aware of this, but we are yet to work on this. Becasue this flow is still under development and we will wait until WooCommerce will release proper documentation.

      Once we will release support, we will let you know.

    • #148299
      Justin Harrison
      Participant

      Good to hear your developers are aware of it. How would I be able to contact your development team to have discussions with them about this since that is not the support team’s area? WooCommerce has released proper documentation and are asking developers to make their plugins compatible with HPOS.

    • #148302
      l.gan
      Participant

      Can you please tell me if there is an answer to my questions 3-5?

    • #148312

      I.gan, our replies are inline :

      3. I created a new order status “wc-delivery” Delivered using Nuggethon’s Custom Order Statuses for WooCommerce plugin.
      This status is partially displayed in the vendor panel.
      Please see the photo, I marked the order areas with numbers.
      How to add the number 3 in the field – Bulk actions – Change the status “Delivered”?
      5. In the order, it is possible to change the status of the order.
      My new order status “Delivered” is added there – everything is ok.
      >> There is no ready-made code for this, as this is a third-party plugin’s support.

      So basically you have to add your own code using our hook/filter. Then add support of these fields.

      4. How to remove the number 4 from the field – filter by order status: remove “Draft”, “Failed”, “Pending payment”?

      >> Add this code in the function.php of the theme :

      //hide order status from vendor dashboard
      add_filter('mvx_vendor_order_statuses','hide_status');
      function hide_status($status) {
      	unset($status['wc-pending'']); //remove on-hold
      	unset($status['wc-failed']); //remove failed
      	unset($status['wc-checkout-draft']); //remove draft
      	return $status;
      }
      Copy
      • #148335
        l.gan
        Participant

        Moumita thanks, can I ask you for hooks (if any) to resolve issues with a third party plugin for the Bulk Action field on the orders page?

      • #148336
        l.gan
        Participant

        I found the first hook to add status to bulk actions to change order status.
        part 1 works.

        But part 2 does not work, the status of the selected orders does not change to “Delivery”. I am new to php, can you help me? Am I using the right hook?

        /*1*// Add a bulk action to Orders bulk actions dropdown
        add_filter(‘mvx_bulk_actions_vendor_order_list’, ‘mvx_status_orders_bulk_actions’);

        function mvx_status_orders_bulk_actions($bulk_actions) {
        $bulk_actions[‘delivery’] = __(‘Change on Delivery”‘);
        return $bulk_actions;
        }

        /*2*/// Process the bulk action from selected orders
        add_filter(‘mvx_orders_list_do_handle_bulk_actions’, ‘mvx_status_bulk_action_edit_shop_order’, 10, 3);

        function mvx_status_bulk_action_edit_shop_order($bulk_action, $ids, $requestData, $vendor_all_orders) {
        if ($action === ‘delivery’) {

        foreach ($post_ids as $post_id) {
        $order = wc_get_order($post_id);
        $order->update_status(‘delivery’);
        }
        }
        return $redirect_to;
        }

    • #148314

      @Justin Harrison, our team already checked the doc, but this is still in the development phase and they are still working on this.

      So, till now there are a few docs that will actually help us to convert the order table into their format. Like them, our team is also doing R&D on this.

    • #148363

      @Justin Harrison, can you please create a staging site and share the temporary admin, FTP access?

      Also, please do share the code that you are using to make an order as delivered from the order details page.

    • #148376
      Justin Harrison
      Participant

      @NerdySupportExpert, I am not the one asking or communicating about the delivered order status. That is @l.gan.

    • #148389

      Sorry My mistake, I.gan, can you please create a staging site and share the temporary admin, FTP access?

      Also, please do share the code that you are using to make an order as delivered from the order details page.

      • #148407
        l.gan
        Participant

        Moumita, please check your spam, I sent you a chat message yesterday but for some reason I didn’t see anything after sending.

        Everything is there

    • #148380
      l.gan
      Participant
      This reply has been marked as private.
    • #148381
      l.gan
      Participant
      This reply has been marked as private.
    • #148428
      This reply has been marked as private.
      • #148437
        l.gan
        Participant
        This reply has been marked as private.
    • #148474

      Thanks for the access, our team will check and get back to you.

      However as this is third party plugin support hence it might take some time.

    • #148593
      promita
      Moderator

      Hi @l.gan, thanks for your access. I have added the code in your code-snippets.
      Here is the code that I have added already.

      
      //Add a bulk action to Orders bulk actions dropdown
      add_filter('mvx_bulk_actions_vendor_order_list', 'mvx_add_bulk_options_vendor_order_list', 10, 2);
      function mvx_add_bulk_options_vendor_order_list( $list, $vendor ) {
      	$add_bulk = array(
      		'mark_delivery'   => __( 'Change status to delivery', 'multivendorx' ),
      		);
      	return array_merge( $list, $add_bulk );
      }
      
      Copy
      • #148614
        l.gan
        Participant

        Hello

        Thanks a lot for your help.

        1. Can you please tell me how can I send emails when the suborder status changes to /MultiVendorX/emails/vendor-notify-shipped.php?

        a. Now I have created a file in the child theme../wp-content/themes/woodmart-child/woocommerce/emails/delivery.php

        b. I copied the delivery.php file from the content of the dc-woocommerce-multi-vendor/templates/emails/plain/vendor-notify-shipped.php file

        But a notification letter that a part of the order (suborder) has been sent is not sent to the client.

        Please tell me how can I do this?

        2.And is it possible to trigger an action:

        If the order is sent a track number through the button (see photo), then its status automatically changes to my custom status “Delivered”?

        Thank you so much for your support

    • #148684

      @l.gan, our team will help you out.

      However, it will take some time, as the team is on leave due to holidays.

    • #148725

      Hi,
      our replies are below
      1. Can you please tell me how can I send emails when the suborder status changes to /MultiVendorX/emails/vendor-notify-shipped.php?
      >> For this you have to add good amount of custom code using below hook

      woocommerce_order_status_changed
      Copy

      2.And is it possible to trigger an action:
      If the order is sent a track number through the button (see photo), then its status automatically changes to my custom status “Delivered”?
      >> for this add blow hook and add your custom hook

      do_action('mvx_vendors_vendor_ship', $order_id, $this->term_id);
      Copy

      Regards,

    • #148806
      l.gan
      Participant

      1. Please give me some time to study this question and hook.

      2. Could you take a look at the code below, what do I need to fix and how do I add an action? I used your answer from the link below.
      https://multivendorx.com/support-forum/topic/update-order-status-after-make-as-shipped/#post-70426

      do_action(‘mvx_vendors_vendor_ship’, ‘callback_wcmp_vendors_vendor_ship’, 99, 2);
      function callback_wcmp_vendors_vendor_ship($order_id, $this->term_id){
      $mails = WC()->mailer()->emails[‘WC_Email_Notify_Shipped’];
      if (!empty($mails)) {

      global $MVX;
      $suborder_details = get_mvx_suborders($order_id);
      foreach ($suborder_details as $key => $value) {
      $suborder_fetch = array(
      ‘ID’ => $value->get_id(),
      ‘post_status’ => ‘wc-delivery’,
      );

      ???

      wp_update_post( $suborder_fetch );
      }

      }
      }

    • #148844

      Hi,
      Add below code to your function.php of the current active theme

      add_action('mvx_vendors_vendor_ship', 'callback_mvx_vendors_vendor_ship', 99, 2);
      function callback_mvx_vendors_vendor_ship($order_id, $term_id) {
          if ( ! $order_id )
              return;
          // Get an instance of the WC_Product object
          $order = wc_get_order( $order_id ); 
          $order->update_status( 'delivery' ); // here your order status name without "wc-"
      }
      Copy

      Regards,

    • #149050
      l.gan
      Participant
      This reply has been marked as private.
    • #149068
      This reply has been marked as private.
    • #149086

      Can I use plugin like Email Log so we can check the log and disable them as per that.

      • #149151
        l.gan
        Participant

        Hello

        Yes, you can install any plugins you need for debugging.

    • #149192
      This reply has been marked as private.
    • #149232
      l.gan
      Participant

      Hello

      Thanks for your work and time

      Unfortunately, at the time of your testing, the action of sending a letter was disabled when the status changed to “Delivery”.

      Please look at the photo.

      May I ask you to check this action again, please?

    • #149292

      Igan, it will be really helpful for us if you can share a video of the flow so we can assist you accordingly.

    • #149301
      l.gan
      Participant
      This reply has been marked as private.
    • #149426

      @l.gan, as far as we understood that delivery plugin is sending two mail one for main orders and the other for suborders.

      So, can you please ask this delivery plugin author whether they have any checking that will let us fetch the order number when this plugin is triggering the mail.

    • #149544
      l.gan
      Participant

      I contacted the plugin developer with this question, including an email in contacts, but to my regret – I have not received an answer yet…

      _____
      Tell me more please. By law in my country, I have to show the details of the company that sells the product on every page of their product.

      Is there a way to insert a custom field into the dashboard so that vendors fill it with their details. And how do I display it on the product page with a check – does this product really belong to the supplier, to show the correct field?.

    • #149565

      @l.gan,. can you share a screenshot mentioning what fields you need and where? Also, please do explain the flow in details so we can assist you accordingly.

    • #149579
      l.gan
      Participant
      This reply has been marked as private.
    • #149600

      @l.gan, you need to override shop-front.php template file and add those fields.

      To know more on how to override this temple, please follow this thread https://github.com/multivendorx/MultiVendorX/blob/main/templates/vendor-dashboard/shop-front.php

    • #149606
      l.gan
      Participant
      This reply has been marked as private.
    • #149649

      @l.gan, please share a staging site’s access where you have these code added so we can check.

      While sharing the access don’t forget to mark the response as private.

    • #149651
      l.gan
      Participant
      This reply has been marked as private.
    • #149714
      This reply has been marked as private.
    • #149734
      promita
      Moderator

      @l.gan, can you please confirm exactly where do you want to display the extra field?

      I have checked the storefront page the custom field is there.
      So, please do explain what further modification are you looking for so we can assist you accordingly.

      • #149743
        l.gan
        Participant

        Promita thank you for your reply. Please see:

        Yes, there is an input field for a custom field. But if I try to enter something there. For example the text “Name”, and save the changes – this text as a value for this vendor – it is not saved.

        It seems to me that I have a bug/problem in the code of the function.php file…

        __
        I need to display the value of a field on a single product page. woocommerce_before_add_to_cart_form.

        For example, if I enter Calvin Klein’s government registration data for a Calvin Klein supplier, it should not appear on the Nike single product page.

        And if I enter the registration data of the Nike company – they should not be displayed on the page of products from other vendors.

    • #149801
      This reply has been marked as private.
    • #149882
      promita
      Moderator

      Hi l.gan, you saved the data in post meta but you need to save this in user meta. You also need to use ‘mvx_save_custom_store’ hook for this.

      • #149888
        l.gan
        Participant
        This reply has been marked as private.
    • #149931
      This reply has been marked as private.
      • #150068
        l.gan
        Participant

        Thank you for your help, I’ll be waiting

    • #150074
      This reply has been marked as private.
      • #150076
        l.gan
        Participant
        This reply has been marked as private.
    • #150094
      promita
      Moderator
      This reply has been marked as private.
      • #150101
        l.gan
        Participant
        This reply has been marked as private.
    • #150117
      This reply has been marked as private.
    • #168433
      promita
      Moderator

      Hi l.gan, Yes this is the correct code to display the field in the storefront.

    • #174481
      l.gan
      Participant

      Many thanks to everyone
      Please mark the ticket as resolved.

      Amazing support!

Viewing 45 reply threads

The topic ‘Vendor cannot change order status + High-Performance Order Storage compatibility’ is closed to new replies.