Author Topic: Number of search results?  (Read 901 times)

EvanGR

  • Jr. Member
  • **
  • Posts: 493
Number of search results?
« 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:
Code: [Select]
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

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 103
    • yourgeek.gr
  • VirtueMart Version: Always latest Stable
Re: Number of search results?
« Reply #1 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
Joomla templates and extensions development
https://www.yourgeek.gr

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1620
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: Number of search results?
« Reply #2 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 :)
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