Forum Replies Created
- AuthorPosts
- fabrice-0553Participant
The problem lays in the following file: wc-frontend-manager/controllers/orders/wcfm-controller-wcfmmarketplace-orders.php
It is due to an unconsistency that sometime occurs between the “item_id” in wp_wcfm_marketplace_orders table and the “order_item_id” in the wp_woocommerce_order_items table.
When, for some orders, this inconsistency exists, an exception occurs in the (strange) “try catch” instruction beginning at line 264.
The exception “Invalid order item” is thrown by /woocommerce/includes/data-stores/abstract-wc-order-item-type-data-store.php at line 135.The exception is catched and the display of the problematic order is then simply dropped (!!) by the instruction “unset( $wcfm_orders_json_arr[$index] );” at line 299.
I see two ways to solve this issue:
- Manage the display of “// Purchased” items like it is done in the admin view “wc-frontend-manager/controllers/orders/wcfm-controller-orders.php” without calling woocommerce function.
- Prevent the inconsticency between the tables to occur at order recording in the database and correct it based on the woocommerce table when detected.
If you want to see your order and exception description, you can replace lines 299 & 300 of wcfm-controller-wcfmmarketplace-orders.php by these:
299 //unset( $wcfm_orders_json_arr[$index] ); 300 $order_item_details .= $e->getFile().' -> Line '. $e->getLine() .' -> '. $e->getMessage(); // FO 301 //continue;
Please see attached picture for the result of this code.
Attachments:
You must be logged in to view attached files.fabrice-0553ParticipantHello, it just happened again today for order #1054 of store #4 and i noticed an interesting clue for debugging:
– in the “admin” view of /store-manager/orderslist/ filtered for store #4 i can see the 25 last orders for that shop #4 including order #1054
– in the “seller #4” view of /store-manager/orderslist/ i don’t see order #1054 but ONLY 24 orders are displayed despite the fact that:
– both views indicate “Display of orders 1 to 25 on 61 elements” (or something like that as it’s displayed in french)
-> That means the missing order is counted as one of the 25 but it is not displayed, as only 24 items appear in the seller’s view list.
I hope this is understandable and helps.fabrice-0553ParticipantOr maybe like this ?
Attachments:
You must be logged in to view attached files.fabrice-0553ParticipantA screenshot like this ?
Attachments:
You must be logged in to view attached files. - AuthorPosts