Hi community,
I’m experiencing an odd behaviour with PreparePrices and FindPrice when doing searches. Mainly where the searchresults contains products with lots of variants. In this case it is a Rapido-based solution. (I have locally upgraded to latest 9.x with same behaviour).
What's happening is that when posting a search by writing in the searchbar, a request is sent and 7 products is returned by the query to populate the dropdown below the searchbar.
This triggers PreparePrices with a collection of 7 product which is correct. Those seven products are sent to BC and prices are retrieved and cached, by the book.
What happendes next is that FindPrice is triggered. First for those seven products and a price is retrieved from the cache, by the book. But FindPrice is also triggered for every other products that matches the search.
Example: There is a product named “Lido” which has 84 variants. So, when searching for “Lido” we get the seven results as configured. But also 77 additional individual request with FIndPrice to BC to retrieve prices that are not cached with PreparePrices. This of course takes forever.
I cannot find any misconfiguration.
In the request for the productsfeed the pagesize is set to 7 (pagesize=7). In the app the “Products per page” is set to “7”. The GetLoop(“Products”).Count returns 7. But still the “FindPrice” is triggered for the “whole” searchresult or for all the variants if some variants are in the searchresult.
At the moment I have a workaround where I skip FindPrice if the request is a search and the price is not cached.
Has someone else any similar experience? Any ideas about why is't behaving this way?
Regards / Aki