VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: EvanGR on December 31, 2021, 13:13:31 PM

Title: Number of search results?
Post by: EvanGR on December 31, 2021, 13:13:31 PM
Hello,

In the search results page (category layout), how do I get the total number of the results/products found?
If I do something like: count($this->products)
I only get the number of products in the first page of results.

(The pagination shows the correct number of total results, but the pagination logic is in a different file and I don't know how it extracts that result.)

Thanks!
Title: Re: Number of search results?
Post by: Spiros Petrakis on January 19, 2022, 15:01:51 PM
If you are talking about the category view and not the products sublayout try this $this->vmPagination->total
Title: Re: Number of search results?
Post by: pinochico on January 19, 2022, 16:02:50 PM
Quote$this->vmPagination->total

This is not count of pages?

I think for count of products you need some other :)