• Hello everybody,

    I’ve extended the Orders section in My account page to show the customers Company name (Empresa) and the Company CIF (a custom field), as you can see in the following image:

    Orders section

    I would like to add filters in the top of the table, to filter by Company name, Company CIF and Order Date.

    I’ve been looking for a plugin or an example to how to do it but I only found filters for the backend admin area, or a frontend filter that only filters by coupon codes.

    Anybody know the way to implement it, or a useful plugin?

    Thanks in advance,

    Cheers

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter raulinovum

    (@raulinovum)

    If I filter the orders in the orders.php manually doing something like this:

    if ( $order->billing_company == "bcompany2" ) :

    It simply filters the table, but it keeps the original pagination, showing only each register that matches with the company in every page, not putting all of them together and recalculating the pagination.

    There’s any place to do the filtering and make it all work properly?

    Thanks!

    P.S.: I’m using a new version of woocommerce, that one that’s not using the my-orders.php file but the orders.php.

    Thread Starter raulinovum

    (@raulinovum)

    I think the best way to do it is modifying the list of the orders passed to that page and then, I’m assuming that the pagination would work properly, but I cannot find the correct hook to modify it. I’ve tried the ‘woocommerce_my_account_my_orders_query’ but I don’t know if it’s the correct one or if I’m managing it properly.

    Thread Starter raulinovum

    (@raulinovum)

    Any idea to solve it?

    hi, did you get round to that? I’m looking for exactly the same thing…
    Thanks!

    Thread Starter raulinovum

    (@raulinovum)

    Hi,

    not really.
    In the end, I created a whole new section in My account page, called ‘Search orders’, and there, I built a table where I load all the orders, and then, I filter it through javascript.

    Cheers

    hi, thanks! Looks like i’ll have to do something similar then… couldn’t find any ready-to-use solution out there.

    Thread Starter raulinovum

    (@raulinovum)

    I couldn’t find any solution too, so I had to build it by myself ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Filter for the orders list in My account section (frontend)’ is closed to new replies.