- May 10, 2017 at 6:56 pm #13043
Paul Ogle Jr.Participant
Hi, So I searched the documentation to see if I could find an answer to this, but couldn’t find an answer.. So my problem/question is, If I do a search for a product in woo-commerce, the search bar returns 48 items and you scroll through the first ones and then decide to click on something like “more results…(48)” at the bottom…. It seems to append a random number of additional items to your existing scroll list. One time it might add 5 new items and then 12 new items and then 4 new items, etc.. Why doesn’t it add 10 each time .. or better yet, it should allow you to scroll through all of the remaining items by dragging the scroll bar on the right downward. is that possible?
PaulMay 11, 2017 at 11:12 am #13054
There is no simple answer, but it’s mostly to have better performance and save as much server resources as possible.
At the initial search the plugin returns the first set of results, and a number of possible eligible results. This number however may not be final, because not all of the items are processed at the first iteration, as it would create a huge performance issue. This is because the plugin offers all types of filters, exclusions and other conditions to exclude/include certain items from the search results list. Some of these conditions are rather executed after the query process is finished. This can however affect the number of final results, but since it requires post-processing, it cannot be determined unless all of the items are processed – causing lots of unneccessary server work, which is exactly what I try to prevent.
The only solution would be to repeat the search process until the correct numer of items are returned, but that again puts an unneccessary huge workload on the database server.
I’m trying my best to improve this logic in every release, but unfortunately in some cases it’s still not accurate enough. If you want, you can leave FTP access here, and I can try to investigate where the calculation gets incorrect. I’m more than happy to debug it.
Unlimited scrolling will be implemented in one of the upcoming releases for sure, as it has been requested a few times before.Best,
If you like my products, don't forget to rate them on codecanyon :)
You must be logged in to reply to this topic.