OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

Forums Forums OroCommerce How to customize product search to search additional field in product database ?

This topic contains 3 replies, has 2 voices, and was last updated by  ypetrov 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
  • #32059

    jeetendra_gawas1
    Participant

    Hi,

    I am working on a search feature where in I have to search product based on custom attribute added in product table. I have checked the code and found that the product search works based on website search and frontend search grid. I tried to append the query condtion in product repository query builder but it does not work. Can anyone provide pointers ?

    Thanks,

    Jeetendra Gawas

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

    ypetrov
    Participant

    Hello, Jeetendra Gawas
    To add new column to index, you should tart from:
    1) described new column at website_search.yml
    2) data should be added to index on re-indexation, create listener to do it, example

    More detail can be found at documentation

    Hope this information will help you. If not please provide more information what part doesn’t works, applying filter, save data to index or..

    #32061

    jeetendra_gawas1
    Participant

    Hi Ypetrov,

    Thanks for your reply. I will try the steps mentioned above to make my search thing work. Actually what I am trying to do is, I have added a new field in product table named vendor which is a string and it will store the vendor name in db. When i search from front end on product listing i want to be able to search by this new field as well. Right now the default search works based on sku,porduct title, and description fields. I want to force the search to match new field.

    Thanks,

    Jeetendra Gawas

    #32062

    ypetrov
    Participant

    so you should include this field to ‘all_text’

    just take a look at product listener

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

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

Back to top