ssossossosso

Forums

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

This topic contains 2 replies, has 2 voices, and was last updated by  jeetendra_gawas1 1 month, 3 weeks 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 2 replies - 1 through 2 (of 2 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

    #7184

    jeetendra_gawas1
    Participant

    Hi msulima,

    Thanks for your reply. Actually I want to search in a different table called oro_vendor_product custom created by us and the search should return me all vendors that match the searched keyword and display the results in a datagrid structure(similar to how product search results are shown). What is the best approach to follow in this case?

    Regards,

    Jeetendra Gawas

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

You must be logged in to reply to this topic.