Search code examples
shopwareshopware6

Where can I find a hook to customize the search via Shopware App?


I am prototyping a Shopware App right now, where I want to extend the search with our search API. We already have a working plugin in the store for that.

I found those two references for hooks:

Seems like there is no webhook for the search at all and just a script-hook for a finished search. In the plugin, we could just extend the ProductSearchRoute and be completely flexible.

Are search extension not planned right now?

Cheers, Tobias


Solution

  • I assume you want to alter the criteria for fetching the products. As of today this is not yet possible with non-self-hosted apps. You could use the app scripts to enrich or replace the contents of an already loaded page as you already mentioned. Obviously that comes with some drawbacks regarding performance. The capabilities of apps are being enhanced continuously though so there's chance search manipulation might become possible rather soon.