VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: SteP[IT] on January 14, 2015, 09:54:38 AM

Title: [solved] Module VM Products no more working after 3.0.2 -> 3.0.3 upgrade
Post by: SteP[IT] on January 14, 2015, 09:54:38 AM
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?
Title: Re: Module VM Products no more working after 3.0.2 -> 3.0.3 upgrade
Post by: SteP[IT] on January 14, 2015, 11:27:46 AM
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
Title: Re: Module VM Products no more working after 3.0.2 -> 3.0.3 upgrade
Post by: Milbo on January 14, 2015, 13:40:47 PM
add the line before
if (!class_exists('CurrencyDisplay'))
         require(VMPATH_ADMIN . DS . 'helpers' . DS . 'currencydisplay.php');
Title: Re: Module VM Products no more working after 3.0.2 -> 3.0.3 upgrade
Post by: SteP[IT] on January 14, 2015, 15:06:33 PM
Thank you Milbo, very fast & effective as always :)
Title: Re: [solved] Module VM Products no more working after 3.0.2 -> 3.0.3 upgrade
Post by: zuotoski on January 20, 2015, 21:41:11 PM
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.
Title: Re: [solved] Module VM Products no more working after 3.0.2 -> 3.0.3 upgrade
Post by: Milbo on January 23, 2015, 19:15:48 PM
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');
Title: Re: Module VM Products no more working after 3.0.2 -> 3.0.3 upgrade
Post by: KHM on February 05, 2015, 12:29:19 PM
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
Title: Re: [solved] Module VM Products no more working after 3.0.2 -> 3.0.3 upgrade
Post by: GJC Web Design on February 05, 2015, 14:01:46 PM
just transfer the  VM3 modules/mod_virtuemart_product/default.php to
/<path-to-template-directory>/html/mod_virtuemart_product/default.php
Title: Re: [solved] Module VM Products no more working after 3.0.2 -> 3.0.3 upgrade
Post by: KHM on February 05, 2015, 14:46:08 PM
Thanks a million! Problem solved! :)
Title: Re: [solved] Module VM Products no more working after 3.0.2 -> 3.0.3 upgrade
Post by: dstockman on April 18, 2016, 02:59:17 AM
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.