• Priority: 0
  • Status: Closed
  • Theme: Alysum
  • Assigned To: Fred
  • Private: No
  • Open Date: 15.02.23, 06:15
  • Opened by: Benjamin Teo
  • Closed by: Anonymous Submitter
  • Closed on:
  • Reason: Not a bug

Ticket #24279 - PKElements - Search box drop down - load more

Hi, see attached image.

The search box works fine, when you type a search it will auto load the products, however there is a load more button, when you click it loads more inside the search box drop down.

However, I have 2000k products need to add a button that goes to the actual search page. What code can I use or link can I use for this? I can code my own button.

The search result page would be the same as pressing ENTER after typing in the search word, but people don’t know that they have to do this.

I thought this was a bug when I first used it.

Thank you.



Fred 15 Feb 2023, 18:16

You can change the search button action in the widget settings https://take.ms/azN9H

Benjamin Teo 16 Feb 2023, 00:13

Hi thanks I know about this option, but I want to do the following. (see attached image)

I will create a button next to load more. I will call this “Go To Search Page” When you click this button (same as clicking on search icon) it should take you to the search results page.
But I don’t have the code do this.


Fred 16 Feb 2023, 22:00

Ok, I see.
Open the file


Add your button to the line 35 like this

<a class="btn pk-load-more" role="button" href="LINK_TO_SEARCH_PAGE">SEARCH PAGE</a>
Benjamin Teo 17 Feb 2023, 00:59

Thanks I know where the file is, but how do I link that button to the keyword they typed in the search box?

Fred 17 Feb 2023, 19:08

You can try this way

<a href="{$link->getPageLink('search', true, null, ['s' => $smarty.get.s])}">Search Page</a>

but I’m not sure the search word will be catched because header search based on javascript

Benjamin Teo 19 Feb 2023, 22:29

Ok thanks for that it’s not really working but that’s ok I will just leave it for now

Fred 19 Feb 2023, 23:15

Yes, there is some dynamic way need to be found to apply