Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
2969 Vizualizări

I am trying to allow for being able to search products on the website by being able to use multiple additional fields such as search based on district and state. 


I have added and created a model that is in charge of the address and added the address fields to the product. The search is currently based on the name and description and category. 


I am using the webkul marketplace addon. I am trying to get understand what steps to take in order to enable being able to search using custom fields

Imagine profil
Abandonează
Cel mai bun răspuns

Hi Andrew


you can either use the standard search of odoo website and extend

  @http.route('/website/snippet/autocomplete', type='json', auth='public', website=True)
def autocomplete(self, search_type=None, term=None, order=None, limit=5, max_nb_chars=999, options=None):

        """

        Returns list of results according to the term and options
....

    and the view website.search_text_with_highlight


or craete a module that has a snippet to be used in the website (header or somewhere else,,)

where you can controll more, but you need a JS, controller, view etc


This is an example of search in Blogs, categories, product, etc, and for each model, example product the search includes: name, barcode, INCI, and other custom fields




Hope this helps

Imagine profil
Abandonează
Cel mai bun răspuns

Interesting if someone knows

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
3
apr. 25
1880
0
oct. 23
1389
1
sept. 22
2038
0
iun. 16
3020
1
iun. 25
192