News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Error after updating to latest version [solved]

Started by dogmansa, November 25, 2020, 14:51:13 PM

Previous topic - Next topic

dogmansa

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!

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);

dogmansa

Wow... Thank you for your speedy response. I will certainly follow your instructions. Much appreciated!! :) :) :) :)

dogmansa

Hi

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

Jumbo!

Then you probably be having a 3rd party extension which is generating this issue. First try out by switching to another template.

dogmansa

#5
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

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

Thanks DogmanSA... it worked also for VM3_cart.php in the plugin/system/vm3_cart folder.

stawebnice

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

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