Reputation: 213
I'm trying to extend the search results in shopware with additional entites. That means, if the user searches for some products, I want to add additional products to the results, that ARE NOT in the shopware db, but queried via external API.
My first try was subscribing to the ProductSearchResultEvent
and simply adding entities to getResult
. That partly worked, the entities are shown in the search result but they are not counted ("You have 1 results", but two entries in the result list :D).
Is there generally a way to do that? The external results should be always shown after the internal results. Next step will be showing the details, because the ID is not known :D
Upvotes: 0
Views: 40
Reputation: 231
I think it's not just a simple way of handling displays like pagination and product details, including displaying images, indexing, etc., but also how the checkout process cart requires products from DB.
So I suggest, if it is possible, that you design a sync schedule from external data to shop db, with sync API
Upvotes: 0