Increasing the number of results returned using predictive search (Debut theme)

topographia
New Member
4 0 0

Is it possible to increase the number of results returned in the drop down that appears below, or add a button/link that says "See all results"?

When I search a particular word, it displays 3 products, but when I press enter, it takes me to a page that shows all 19 products. I'm concerned a customer may think I don't have something if there's no indication they aren't seeing all relevant results in the dropdown. Thank you.

0 Likes
FCHR
Shopify Partner
78 7 8

hi 

 

function initSearchAccordingToViewport() {
      theme.SearchDrawer.close();
      theme.SearchHeader.unload();
      theme.SearchPage.unload();

      if (mediaQueryList.mobile.matches) {
        theme.SearchHeader.init({
          numberOfResults: 4,
          isTabletAndUp: false
        });

        if (isSearchPage()) {
          theme.SearchPage.init({ isTabletAndUp: false });
        }
      } else {
        // Tablet and up
        theme.SearchHeader.init({
          numberOfResults: 4, //gfr
          isTabletAndUp: true
        });

        if (isSearchPage()) {
          theme.SearchPage.init({ isTabletAndUp: true });
        }
      }
    }

 

 

- modify the number after "numberOfResults"

this will increase the number of results displayed

best regard,

If my solution help you : Like and Accept Solution.Need help, hire me : https://5euros.com/profil/fchr

Ma réponse a-t-elle été utile : Cliquez sur J’aime pour me le faire savoir !

J'ai répondu à votre question ? : Marquez-la comme Accepter comme solution

Besoin d'aide, engagez-moi : https://5euros.com/profil/fchr
0 Likes
topographia
New Member
4 0 0

Thank you, but unfortunately this didn't seem to work, although I changed the number after every "numberOfResults" I could find.

0 Likes