Author Topic: [solved] Module VM Products no more working after 3.0.2 -> 3.0.3 upgrade  (Read 6279 times)

SteP[IT]

  • Jr. Member
  • **
  • Posts: 199
  • Independent Websites Builder
    • MMC Edizioni - Italian Publisher (First Class PaperBooks)
  • VirtueMart Version: 3.4.3
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:

Code: [Select]
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]

  • Jr. Member
  • **
  • Posts: 199
  • Independent Websites Builder
    • MMC Edizioni - Italian Publisher (First Class PaperBooks)
  • VirtueMart Version: 3.4.3
Re: Module VM Products no more working after 3.0.2 -> 3.0.3 upgrade
« Reply #1 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
J 3.9.2 - VM 3.4.3

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

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10273
  • VM3.9 Eagle Owl
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Module VM Products no more working after 3.0.2 -> 3.0.3 upgrade
« Reply #2 on: January 14, 2015, 13:40:47 pm »
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]

  • Jr. Member
  • **
  • Posts: 199
  • Independent Websites Builder
    • MMC Edizioni - Italian Publisher (First Class PaperBooks)
  • VirtueMart Version: 3.4.3
Re: Module VM Products no more working after 3.0.2 -> 3.0.3 upgrade
« Reply #3 on: January 14, 2015, 15:06:33 pm »
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

  • Beginner
  • *
  • Posts: 8
Re: [solved] Module VM Products no more working after 3.0.2 -> 3.0.3 upgrade
« Reply #4 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:

   
Code: [Select]
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10273
  • VM3.9 Eagle Owl
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: [solved] Module VM Products no more working after 3.0.2 -> 3.0.3 upgrade
« Reply #5 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');
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

  • Beginner
  • *
  • Posts: 12
Re: Module VM Products no more working after 3.0.2 -> 3.0.3 upgrade
« Reply #6 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:
Quote
Fatal 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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10451
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: [solved] Module VM Products no more working after 3.0.2 -> 3.0.3 upgrade
« Reply #7 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
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

KHM

  • Beginner
  • *
  • Posts: 12
Re: [solved] Module VM Products no more working after 3.0.2 -> 3.0.3 upgrade
« Reply #8 on: February 05, 2015, 14:46:08 pm »
Thanks a million! Problem solved! :)

dstockman

  • Beginner
  • *
  • Posts: 6
    • dstockman.com
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.