Running VM 2.0.14 and Joomla 1.5.26 on Rochenhost.
When we first set up Virtuemart 2 on our site, I was very happy that eStore products showed up in the Joomla Search bar results. However, somewhere along the way, search results stopped appearing, and instead, I get the classic white PHP error page with the following error:
QuoteFatal error: Using $this when not in object context in /home/<removed>/public_html/plugins/search/virtuemart.php on line 177
I've tried replacing the files from a fresh 2.0.14 VM install to no avail. Any clue how to resolve this?
All search results on the VM forums say to increase the PHP memory limit, but that's not the problem.
Hi,
Yes there is a $this->loadLanguage (); that is supported on joomla 2.5, please try to replace this line with:
$this->Jlang = JFactory::getLanguage();
and post back your results
Regards
That did it! Thanks!
Note for others who may come across this: The line bytelord refers to appears twice in the file. Replace both instances.
I also noted that the PLG_SEARCH_VIRTUEMART_PRODUCTS language entry didn't exist, so I added a line to public_html/language/en-GB/en-GB.com_search.ini that read:
PLG_SEARCH_VIRTUEMART_PRODUCTS=eStore
An if maybe will be better .... if joomla version 1.5 then ... else ...
Regards
Yes, I did use an if statement - just trying to keep the instructions basic, as most Joomla users aren't PHP developers. :)
Thanks again!
Greetings,
having a same problem, but this is not working on J 1.5
"replace this line with: $this->Jlang = JFactory::getLanguage();"
any suggestions how to fix this on J1.5 and VM 2.0.18a?
Thanks in advance.
Joomla 1.5 is no longer supported. http://virtuemart.net/news/list-all-news/426-end-of-life-for-virtuemart-11-heidelpay-now-in-virtuemart-2012
"We decided to declare now the end of life for VirtueMart 1.1, and that the version 2 of VirtueMart is not any longer maintaining joomla 1.5 compatibility." 4 October 2012