ssossossosso

Forums

Covering OroCommerce topics, B2B eCommerce trends, community updates and company announcements.

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

  • Creator
    Topic
  • #6405
    mlozynskyy
    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
  • #6410
    msulima
    msulima
    Oro Core

    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.

    #6411
    mlozynskyy
    mlozynskyy
    Participant

    @msulima Thank You
    It works.

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

    #6412
    mlozynskyy
    mlozynskyy
    Participant

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

    • This reply was modified 2 months, 2 weeks ago by mlozynskyy mlozynskyy.
Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.