News:

Support the VirtueMart project and become a member

Main Menu

Number of search results?

Started by EvanGR, December 31, 2021, 13:13:31 PM

Previous topic - Next topic

EvanGR

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!

Spiros Petrakis

If you are talking about the category view and not the products sublayout try this $this->vmPagination->total
Joomla templates and extensions development
https://www.yourgeek.gr

pinochico

Quote$this->vmPagination->total

This is not count of pages?

I think for count of products you need some other :)
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products