VirtueMart Forum

VirtueMart 2 + 3 + 4 => Installation, Migration & Upgrade => Topic started by: elanto75 on November 25, 2020, 16:43:49 PM

Title: [Solved] Error after the update VirtueMart 3.8.6 10373
Post by: elanto75 on November 25, 2020, 16:43:49 PM
Good morning,
after the update every time I put a product in the cart I get the following error:
Error: Call to undefined method Error :: get (): Call to undefined method VirtueMartCart :: getCardCategoryId ()
and all the pages remained blank.
How can I solve?
Thanks
Joomla: 3.9.23
VirtueMart 3.8.6 10373
Title: Re: Error after the update VirtueMart 3.8.6 10373
Post by: dogmansa on November 25, 2020, 16:46:20 PM
Hi

This has been suggested to me..

http://forum.virtuemart.net/index.php?topic=145867.0
Title: Re: Error after the update VirtueMart 3.8.6 10373
Post by: GJC Web Design on November 25, 2020, 16:46:42 PM
 ???  search?
Title: Re: Error after the update VirtueMart 3.8.6 10373
Post by: elanto75 on November 25, 2020, 16:54:49 PM
Quote from: GJC Web Design on November 25, 2020, 16:46:42 PM
???  search?

Before opening a new post I did a search, the problem that in the file mod_virtuemart_cart / default.php I do not have the code that is mentioned
Title: Re: Error after the update VirtueMart 3.8.6 10373
Post by: GJC Web Design on November 25, 2020, 18:14:38 PM
as explained in the posts .. you have "somewhere" a call to the function getCardCategoryId in an out of date extension or template, which now doesn't exist in VM..

Only you can find this as only you have access to your site files.. you can use GREP on the server to search for this string or download your likely site files ( vm related extensions and VM template files ) and search these or try with the standard template and/or disable extensions until you find it
Title: Re: Error after the update VirtueMart 3.8.6 10373
Post by: elanto75 on November 27, 2020, 11:32:37 AM
Thanks, I found the call, I deleted it and everything started working fine again!
Resolved :)
Title: Re: [Solved] Error after the update VirtueMart 3.8.6 10373
Post by: GJC Web Design on November 27, 2020, 13:41:30 PM
It would be helpful to say where you found it for other users with this problem
Title: Re: [Solved] Error after the update VirtueMart 3.8.6 10373
Post by: elanto75 on December 10, 2020, 09:57:05 AM
Quote from: GJC Web Design on November 27, 2020, 13:41:30 PM
It would be helpful to say where you found it for other users with this problem

It was in a file of my template.
in ../plugins/system/

I replaced: $category_id = $this->_cart->getCardCategoryId($product->virtuemart_product_id);
with:   $category_id = $product->virtuemart_category_id;