ssossossosso

Forums

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

This topic contains 1 reply, has 2 voices, and was last updated by msulima msulima 1 week, 4 days ago.

  • Creator
    Topic
  • #7006

    jeetendra_gawas1
    Participant

    Hi ,

    I am working on a feature wherein i need to modify the front end product search to list products by vendor search. I tried modifying the ProductRepository class to filter results based on vendor but it does not seem to be working. Can anybody provide any solution or a way to modify the product search query before the grid is rendered in front end ?

    Thanks

    Jeetendra

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #7022
    msulima
    msulima
    Oro Core

    Hi,

    you should modify https://github.com/orocommerce/orocommerce/tree/master/src/Oro/Bundle/ProductBundle/Resources/config/oro/website_search.yml to provide correct mapping for search index and https://github.com/orocommerce/orocommerce/tree/master/src/Oro/Bundle/ProductBundle/EventListener/WebsiteSearchProductIndexerListener.php#L40 to provide data from entity to product index.
    After that you will have all needed data in search index.

    Then you should update grid configuration of grid ‘frontend-product-search-grid’ and add filter for related data, that you added to search index before.

    In you case you need something like:

    To update configuration of grid you can use grid listener, something like https://github.com/orocommerce/orocommerce/tree/master/src/Oro/Bundle/CatalogBundle/EventListener/DatagridListener.php with configuration for it with tag

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.