Blank page after review submit - Class 'shopfunctions' not found

Started by Tanase B., January 15, 2014, 13:08:39 PM

Previous topic - Next topic

Tanase B.

Hello,

After upgrading from .24c to the latest version of virtuemart the submit review doesn't work completly, though the review is being submited and saved, but the returning page is blank.
It is not template related (I tried with Joomla's default templates) & also not because of the php version (tried with both 5.4 and 5.3).
After enabling the error reporting function in Joomla! I get this:
"fatal error: class 'shopfunctions' not found in -directory-/components/com_virtuemart/helpers/shopfunctionsf.php line 463".

For the moment I solved it by commenting that line which looks like this:
"$vars['vendorAddress'] = shopFunctions::renderVendorAddress ($product->virtuemart_vendor_id);".

*With a fresh install of virtuemart on localhost the review system works fine.

Is this a bug occured after update or something else?
Thanks!

alatak

Hello
The correct fix is:
adding this line at the begin of the function
if(!class_exists('ShopFunctions')) require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'shopfunctions.php');