Author Topic: VM Search Error  (Read 806 times)


  • Beginner
  • *
  • Posts: 12
VM Search Error
« on: April 21, 2017, 16:08:19 pm »
Hello everyone,

I have an issue with our site which I was hoping someone might be able to help me fix.

We have the VM search box on the site and it works fine if you type in a phrase that partly matches a product. If however you type in something random or the name of a product that does not exist in the shop, the page reloads with no product results and the error:

Notice: Undefined property: VirtuemartViewCategory::$search in public_html/templates/axxen/html/com_virtuemart/category/default.php on line 356

Does anyone know how I might be able to fix this?

Kind regards


GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 7705
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: VM Search Error
« Reply #1 on: April 21, 2017, 23:30:21 pm »
it is in your template  category over ride

test without it.. if fixed compare and fix your code.. 

it will need something like

if(isset($search)) {

blah blah

GJC Web Design
VirtueMart and Joomla Developers - php developers
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
Contact for any VirtueMart or Joomla development & customisation


  • Beginner
  • *
  • Posts: 12
Re: VM Search Error
« Reply #2 on: May 01, 2017, 13:12:55 pm »

Thank you for your help.

I found the problem. I had to change:

} elseif ($this->search !== NULL) {

on line 356 to

} elseif ($this->searchcustom !== NULL) {

All working now.

Thanks again!