[solved] Module VM Products no more working after 3.0.2 -> 3.0.3 upgrade

Started by SteP[IT], January 14, 2015, 09:54:38 AM

Previous topic - Next topic

SteP[IT]

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?
J 3.9.2 - VM 3.4.3

MMC EDIZIONI - Italian High-Quality PaperBooks Publisher
Site: https://www.mmcedizioni.it

SteP[IT]

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
J 3.9.2 - VM 3.4.3

MMC EDIZIONI - Italian High-Quality PaperBooks Publisher
Site: https://www.mmcedizioni.it

Milbo

add the line before
if (!class_exists('CurrencyDisplay'))
         require(VMPATH_ADMIN . DS . 'helpers' . DS . 'currencydisplay.php');
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

SteP[IT]

Thank you Milbo, very fast & effective as always :)
J 3.9.2 - VM 3.4.3

MMC EDIZIONI - Italian High-Quality PaperBooks Publisher
Site: https://www.mmcedizioni.it

zuotoski

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.

Milbo

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');
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

KHM

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

GJC Web Design

just transfer the  VM3 modules/mod_virtuemart_product/default.php to
/<path-to-template-directory>/html/mod_virtuemart_product/default.php
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


dstockman

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.