After upgrading from working 3.0.2 version to 3.0.3, the module VM Products doesn't work anymore when used in a non-virtuemart page. I have it placed on several pages, but when I load the module in a non-virtuemart page, it doesn't show the content, and gives this error message:
Fatal error: Class 'CurrencyDisplay' not found in /<site-path>/modules/mod_virtuemart_product/mod_virtuemart_product.php on line 82
There is a fast workaround?
Having no time to look for the changes that are causing this issue, I have simply commented out that line, but it seems to be a bug introduced by the 3.0.3 upgrade.
Waiting for the solution.
Regards
add the line before
if (!class_exists('CurrencyDisplay'))
require(VMPATH_ADMIN . DS . 'helpers' . DS . 'currencydisplay.php');
Thank you Milbo, very fast & effective as always :)
Hi!
I am having the same error, except that the template is another. The solution provided didn't work:
Fatal error: Class 'mod_virtuemart_product' not found in /<site-path>//templates/aeon/html/mod_virtuemart_product/single.php on line 233
Any other suggestion?
If you need any information regarding my specs, please read this: http://forum.virtuemart.net/index.php?topic=127408.0
Thanks.
You have an old layout override, the new system dont need the helper anylonger, but the fallback should be there.
Just add in the mod_virtuemart_product.php
if(!class_exists( 'mod_virtuemart_product' )) require('helper.php');
Hi
Came across this thread while in search for a solution to a problem with blank front page after upgrade from Joomla 2.5.28/VM2.6.14 to 3.3.6/VM3.0.4
I've followed the step described in this document; http://stackoverflow.com/questions/20738790/migrate-from-joomla-2-5-17-to-joomla-3-2-1-failed
All worked 100% and procedure done twice (to make sure I wasn't just lucky).
Post upgrade the site front page was blank with only one product showing. Turning error reporting to Maximum the following error was displayed:
QuoteFatal error: Class 'mod_virtuemart_product' not found in /<path-to-template-directory>/html/mod_virtuemart_product/default.php on line 107
But the class is in the file. Comparing with a previous version of the template it looks the same.
Everything else about the design appears to be working well. I did not understand exactly where to insert the previously mentioned change. If indeed that will solve the issue.
Appreciate any help to solve this.
Thanks a million
just transfer the VM3 modules/mod_virtuemart_product/default.php to
/<path-to-template-directory>/html/mod_virtuemart_product/default.php
Thanks a million! Problem solved! :)
I had a similar issue while using the virtuemart search module. The site is "only as catalogue" and does not "show prices".
The problem is then if searching for a non-existent term I get the error "Fatal error: Class 'CurrencyDisplay' not found ... components/com_virtuemart/views/category/view.html.php line 160", since the search module uses the category view for results. I do not know why it works okay if the term exists but it does.
So I wound up commenting out line 160 because otherwise it 500s, I think because the "if (!class_exists('CurrencyDisplay'))" in category/view.html.php only happens "if($this->show_prices)".
I hate making modifications not in overrides so I think you should consider instead in the future declaring that class without requiring that show prices be enabled.
I should note that I am using VirtueMart 3.0.16.