OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

Forums Forums OroCommerce Add custom Button above Products datagrid buttons container

This topic contains 3 replies, has 2 voices, and was last updated by  mlozynskyy 6 years, 7 months ago.

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

  • Creator
    Topic
  • #32055

    mlozynskyy
    Participant

    Hello,
    How can I add custom button above products grid
    orocommerce/vendor/oro/commerce/src/Oro/Bundle/ProductBundle/Resources/views/Product/index.html.twig

    block navButtons

    How can I override this block?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #32056

    msulima
    Moderator

    Hello, mlozynskyy.

    You can use functionality of placeholders. Add new configuration for placeholder to ‘Resources/config/oro/placeholders.yml’ of you bundle. You can use placeholder named ‘index_navButtons_before’.

    Example configuration of placeholders.yml:

    Of cource you should implement twig template for your button.
    This placeholder will be rendered in template https://github.com/oroinc/platform/blob/master/src/Oro/Bundle/UIBundle/Resources/views/actions/index.html.twig#L26.

    As alternative solution you can use functionality of ActionBundle. You need to implement operation with your requirements and in configuration use needed route. Examples you can find in ‘Resources/config/oro/actions.yml’ in bundles of OroPlatform, OroCommerce and OroCRM.


    #32057

    mlozynskyy
    Participant

    @msulima Thank You
    It works.

    But I cant filter pages for showing my button:
    it is my code:

    #32058

    mlozynskyy
    Participant

    I have written a custom filter and use it in placeholder file:

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

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

Back to top