Author Topic: Error after updating to latest version [solved]  (Read 6301 times)

dogmansa

  • Beginner
  • *
  • Posts: 31
Error after updating to latest version [solved]
« on: November 25, 2020, 14:51:13 pm »
Hi

Am getting the following after updating VM

0 - Call to undefined method VirtueMartCart::getCardCategoryId()

User goes into the site and it looks OK. Soon as they click on a product category this happens. After that, no page on the front end is accessible.

Domain https://www.sqclothing.co.za

Versions

Joomla! 3.9.21

VirtueMart 3.8.6 10373

Would appreciate any help

Thanks

Jumbo!

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 882
  • Full-stack Web Developer
    • www.virtueplanet.com
  • VirtueMart Version: Always the latest
Re: Error after updating to latest version
« Reply #1 on: November 25, 2020, 14:55:26 pm »
It sounds like a problem of your template. Refer - https://forum.virtuemart.net/index.php?topic=145834.msg518290#msg518290

Open - templates/YOUR-TEMPLATE/html/mod_virtuemart_cart/default.php

Find and remove the following codes -

Code: [Select]
$category_id = $cart->getCardCategoryId($product->virtuemart_product_id);

dogmansa

  • Beginner
  • *
  • Posts: 31
Re: Error after updating to latest version
« Reply #2 on: November 25, 2020, 15:17:17 pm »
Wow... Thank you for your speedy response. I will certainly follow your instructions. Much appreciated!! :) :) :) :)

dogmansa

  • Beginner
  • *
  • Posts: 31
Re: Error after updating to latest version
« Reply #3 on: November 25, 2020, 15:29:27 pm »
Hi

Have looked but no mod_virtuemart_cart folder ... Can I perhaps do a search for getCardCategoryId to see where it's located?

Jumbo!

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 882
  • Full-stack Web Developer
    • www.virtueplanet.com
  • VirtueMart Version: Always the latest
Re: Error after updating to latest version
« Reply #4 on: November 25, 2020, 19:26:01 pm »
Then you probably be having a 3rd party extension which is generating this issue. First try out by switching to another template.

dogmansa

  • Beginner
  • *
  • Posts: 31
Re: Error after updating to latest version [solved]
« Reply #5 on: November 26, 2020, 07:20:42 am »
Good morning

Thank you for your help. I managed to resolve the problem. Found the code on plugins/system/vm2_cart

removed the line as you recommended and the site is back

Many thanks

T

_stu

  • Beginner
  • *
  • Posts: 29
Re: Error after updating to latest version [solved]
« Reply #6 on: December 02, 2020, 16:40:40 pm »
I had the same problem with CMSMart's Ajax Drop Down Cart for Virtuemart 3.0.0. 
Problem: Everything worked normally until the customer went to the cart. Then all of VirtueMart showed a white screen with only "Error" displayed.

Solution: Turning on debug, I got the same error: Call to undefined method VirtueMartCart::getCardCategoryId().
Disabling either the plugin or the module for CMSMart's Ajax Drop Down Cart for Virtuemart corrected the error, but prevented the drop down cart module from working.
The code that Jumbo! highlighted (mega thanks!) was not in the plugin code; it was in the module code. Location: /modules/mod_virtuemart_ajax_cart/helper.php. Commenting out the single line of code fixed the problem.

Note that there is a newer version 3.0.2, but I don't have access to it at the moment (paid component) to see if it solves this problem.

jstratos

  • Beginner
  • *
  • Posts: 43
Re: Error after updating to latest version [solved]
« Reply #7 on: January 04, 2021, 00:39:34 am »
Thanks DogmanSA... it worked also for VM3_cart.php in the plugin/system/vm3_cart folder.

stawebnice

  • Jr. Member
  • **
  • Posts: 265
  • What does not kill you, makes you stronger...
    • StaWEBnice - www stránky, seo optimalizace a copywriting
  • Skype Name: peta_ze_sklepa
  • VirtueMart Version: 3.2.14
Re: Error after updating to latest version [solved]
« Reply #8 on: March 19, 2021, 23:31:15 pm »
This solution with removing the line
$categoryid = $this->cart->getCardCategoryId($product->virtuemartproductid);
from plugins/system/vm3_cart/vm3_cart.php
.
worked for me so far with all Templatemonster templates but on this site it does remove the error with VM 3.8.8, but then add to cart button stops working completely :(

e.g. here:
https://www.u-car.cz/vysledky-hledani/10426/43/aditiva/do-motoru/metabond-start-stop-spirit-do-3-5t-250ml

and in console I see this error:
POST https://www.u-car.cz/index.php?option=com_virtuemart&nosef=1&view=cart&task=addJS&format=json&lang=cz&Itemid=680   [HTTP/2 500 Internal Server Error 923ms]

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10743
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.8.8
Re: Error after updating to latest version [solved]
« Reply #9 on: March 21, 2021, 09:34:15 am »
and the 500 error is?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://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
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation