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
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 -
$category_id = $cart->getCardCategoryId($product->virtuemart_product_id);
Wow... Thank you for your speedy response. I will certainly follow your instructions. Much appreciated!! :) :) :) :)
Hi
Have looked but no mod_virtuemart_cart folder ... Can I perhaps do a search for getCardCategoryId to see where it's located?
Then you probably be having a 3rd party extension which is generating this issue. First try out by switching to another template.
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
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.
Thanks DogmanSA... it worked also for VM3_cart.php in the plugin/system/vm3_cart folder.
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]
and the 500 error is?