News:

Support the VirtueMart project and become a member

Main Menu

VM Search Error

Started by wicketts, April 21, 2017, 16:08:19 PM

Previous topic - Next topic

wicketts

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


James

GJC Web Design

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 https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 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
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

wicketts

Hi GJC,

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!