• Resolved boloncampana

    (@boloncampana)


    Vendors can’t filter orders by status in MARKETPLACE_DOMAIN/store-manager/orderslist, because all orders are viewed as pending. This error happened to us in a WCFM Marketplace where BACS is the only payment method, but since the problem originates with the controller wcfm-orders, we write this here.

    After a lot of debugging, we found the problem: despite the fact that the filter has the name and id commission-status, and that the request sent to admin-ajax.php also names that parameter commission-status, the query sent to the database searches that variable in the column wcfm_marketplace_orders.withdraw_status. This a problem, because when vendors mark the order completed, the withdrawal status in the database doesn’t change (it stays as “pending” regardless of the status of the order).

    A quick fix for this issue was modifying the next files:

    • wc-frontend-manager/controllers/orders/wcfm-controller-wcfmmarketplace-orders.php
    • wc-frontend-manager/controllers/orders/wcfm-controller-wcfmmarketplace-itemized-orders.php
    • By replacing the string ” AND withdraw_status = ‘{$commission_status}'”; with the more consistent ” AND commission_status = ‘{$commission_status}'”; in both files.

      Sadly, these controller files cannot be overwritten like templates, so I ask you if you can incorporate this to your plugin. In case it’s not possible, I would want to know if it’s possible to force the withdraw_status to have the same value as order_status and commission_status.

      Greetings!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter boloncampana

    (@boloncampana)

    Since backquotes don’t display correctly wordpress forums, these are copies of the files already patched, uploaded to pastebin:

    Plugin Author WC Lovers

    (@wclovers)

    Again, if this patch goes against your design, we would like to know how to allow our vendor to change the withdraw_status of an order when they mark it as completed.

    – You have to setup “withdrawal” module accordingly. https://docs.wclovers.com/withdrawal/

    You may setup withdrawal by “order status” option.

    Thread Starter boloncampana

    (@boloncampana)

    Sorry for the delay. This didn’t solve our problem. Could it be because we are using manual bank transfer as the payment method?

    Plugin Author WC Lovers

    (@wclovers)

    Yes, as Bank Transfer is a manual process.

    After transfer money Admin has to mark those withdrawal requests “Approve”. Hence it will show as “Paid”

    We have a very similar problem and have quick-fixed it like boloncampana did on the wcfm controllers. But this is not how fixing those problems work. We would be very happy if you could find a way for vendors to have a working status filter. I think the best would be to fix it in the next release.

    If you need more information (boloncampana already gave many details, but maybe I could give some more) on the problem then please write.

    Cheers!

    Plugin Author WC Lovers

    (@wclovers)

    Vendor dashboard order list already both filters – order status filter and commission status filter – https://ibb.co/2g3xzPH

    These are come with WCFM Ultimate.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Fix proposal and bug report: Vendors can’t filter orders by order status’ is closed to new replies.