View Full Version : Getting number of products in search result
How do i get the number of products this search COULD produce ?
I understand im asking for the 1st 10 only... but how many other products can the search return in total?
$oProductDisplayListParams->sQuery="tooth brush";
$oProductDisplayListParams->iLimit= 10;
$oProductDisplayListParams->iOffset= 0;
include('includes/elements/product_display_list.php');
Thanks!
Dave
anyone have anything to say on this ? been a few days now!??
I also emailed tech support on this.... they said..post question here.....
:-(
My problem is that I don't fully understand the question. I have got a solution that will show the total number of products available in the category the user is in. It also shows the total number of products available through my api.
is this the kind of thing you're looking for?
Just set the limit higher.
>200
That way it should return all...
Sorry,..
I want to display...... "results 1-10 from 256" on screen
How do i find the 256 number in this case..
With the code i used above i can get products 1-10 no problem...
or i can change offset and get 11-20 etc etc
I could change the limit to 1000 and get 1000 results returned ..but i dont want 1000 results at a time.. 10 will do!.. but i need to know how many potential results there are from the search... and this is NOT how many products are in a "category".. its how many results are there from my search using a keyword.
so how do i know the total amount of results that this search could give me back?
Thanks
Dave
Hi Daves
Your search request will return an array of product objects - searchProductReturn along with a few other responses one of which is iTotalCount - the total number of products matching the specified criteria. This is the number you're looking for.