OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

Forums Forums OroCommerce How to filter orders by payment status for custom actions

This topic contains 3 replies, has 2 voices, and was last updated by  Mauro Chojrin 1 year, 3 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
  • #38458

    Mauro Chojrin


    This thread is related to https://forum.oroinc.com/orocommerce/topic/can-i-add-actions-to-orders-screen.

    I’d like to show this action only for orders not fully paid.

    I was looking at the attributes for the order in oro/commerce/src/Oro/Bundle/OrderBundle/Entity/Order.php but I can’t see any direct way to access the PaymentStatus.

    I see there’s a table storing the payment status (oro_payment_status) but I’m not sure how to use it in the action configuration.


Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
  • #38461
    Andrey Yatsenko
    Andrey Yatsenko

    To hide an action you can use “preconditions”.
    For example, you can check actions.yml at OrderBundle.
    You can fetch the payment status from the database the same way it is fetched at the datagrid by using “@find_entity” in “preactions”.


    Mauro Chojrin

    Hi Andrey:

    Thanks again :)

    I believe the link to actions.yml was broken, here’s the correct reference: https://github.com/oroinc/orocommerce/blob/master/src/Oro/Bundle/OrderBundle/Resources/config/oro/actions.yml.

    I’ve been doing some experiments with this but I can’t seem to work it out… the problem I have now is that I need to issue a query using an AND.

    This is the configuration I have so far:

    This isn’t actually for the filter but I think it’s the same issue (I’m trying to use this query to populate the popup where the user is supposed to enter the details of the new payment transaction).

    I tried different options but I believe I’m missing the correct syntax for the and…

    I am getting every payment transaction (instead of just the ones related to the order I’m editing…)



    Mauro Chojrin

    Ok, so I finally got this thing working. The answer I was looking for was here.

    My configuration now looks like this:

    Thanks for your help!

Viewing 3 replies - 1 through 3 (of 3 total)

The forum ‘OroCommerce’ is closed to new topics and replies.

You will be redirected to [title]. Would you like to continue?

Yes No