mvx_vendor_order_to_parent_order_status_synchronization issue/suggestion

MultivendorX

Tagged: 

Resolved
Viewing 6 reply threads
  • Author
    Posts
    • #194515
      Justin Harrison
      Participant

      Hi support, I have run into an issue where the mvx_vendor_order_to_parent_order_status_synchronization function works properly sometimes, but other times it doesn’t. I’ve found it comes from the fact that the comparison of $parent_order->get_total() and $suborder_totals returns false sometimes because of the different data types and precise value. $parent_order->get_total() returns a string while $suborder_totals is a float. Because of this, I’ve found the sync doesn’t always work when it. I would suggest something like wc_format_decimal() be used on each value (or at least to the $suborder_totals value) prior to comparing it on line 877 of class-mvx-order.php. It works properly for me every single time when I do that. This is just a suggestion. I can obviously fix this all via custom coded solutions, but maybe this would be helpful in a future update? Thanks for your time.

    • #194534

      @Justin Harrison Kindly mention the line number where we need to make change also it will be great if you can share the code before and the modified code you have used with us so that we can look into this and add the modification accordingly in our next update.

      Also it will be better if you share a working video of the flow.

    • #194536
      Justin Harrison
      Participant

      Hi Sangita, I am adding some screenshots here to provide documentation. I’m not sure why a video of flow is needed since there’s nothing related to flow going on. It’s simply just a data type issue in the code which should be very easily replicated on your end by just very quick debugging output. In my screenshots, you’ll find the original code then the code that I changed it to (I just removed the action altogether and re-added it with my own updated function so I wasn’t editing core MVX files). You’ll also find a few screenshots that show the debugging output from var_dump which shows the data type and value of each variable on two random suborders that I pulled up both without any code modification and then after my code modification.

    • #194582

      It will be better for us to test the issue on our end if you can kindly share the scenario when you are facing this issue.

    • #194684

      We have released an update of MultiVendorX. Kindly update the plugin to the latest version and check if you are still facing the issue or not.

    • #194734
      Justin Harrison
      Participant

      Yes, this fixes the issue. Thank you!

    • #194737
      This reply has been marked as private.
Viewing 6 reply threads

The topic ‘mvx_vendor_order_to_parent_order_status_synchronization issue/suggestion’ is closed to new replies.