MultivendorX
Tagged: status sync
-
AuthorPosts
-
-
July 19, 2023 at 9:50 AM #194515Justin HarrisonParticipant
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.
-
July 19, 2023 at 6:53 PM #194534Sangita Support SquadKeymaster
@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.
-
July 19, 2023 at 8:12 PM #194536Justin HarrisonParticipant
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.
-
July 20, 2023 at 6:33 PM #194582Sangita Support SquadKeymaster
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.
-
July 25, 2023 at 5:03 PM #194684Sangita Support SquadKeymaster
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.
-
July 27, 2023 at 9:10 PM #194734Justin HarrisonParticipant
Yes, this fixes the issue. Thank you!
-
July 27, 2023 at 9:39 PM #194737Sangita Support SquadKeymasterThis reply has been marked as private.
-
-
AuthorPosts
The topic ‘mvx_vendor_order_to_parent_order_status_synchronization issue/suggestion’ is closed to new replies.