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

Virtuemart 3.8.6 - 0 - Call to undefined method VirtueMartCart::getCardCategoryI

Started by amlil71, November 22, 2020, 10:34:32 AM

Previous topic - Next topic

amlil71

Hello,

i have installed virtuemart 3.8.6 and i have this error : 0 - Call to undefined method VirtueMartCart::getCardCategoryId()

My mod_virtuemart_cart.php file


<?php
defined
('_JEXEC') or  die( 'Direct Access to '.basename(__FILE__).' is not allowed.' );
/*
* Best selling Products module for VirtueMart
* @version $Id: mod_virtuemart_category.php 1160 2014-05-06 20:35:19Z milbo $
* @package VirtueMart
* @subpackage modules
*
* @copyright (C) 2011-2015 The Virtuemart Team
*
*
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* VirtueMart is Free Software.
* VirtueMart comes with absolute no warranty.
*
* www.virtuemart.net
*----------------------------------------------------------------------
* This code creates a list of the bestselling products
* and displays it wherever you want
*----------------------------------------------------------------------
*/

defined('DS') or define('DS'DIRECTORY_SEPARATOR);
if (!
class_exists'VmConfig' )) require(JPATH_ROOT.DS.'administrator'.DS.'components'.DS.'com_virtuemart'.DS.'helpers'.DS.'config.php');

VmConfig::loadConfig();
VmConfig::loadJLang('mod_virtuemart_category_tf'true);
vmJsApi::jQuery();
vmJsApi::cssSite();

/* Setting */
$categoryModel VmModel::getModel('Category');
$category_id $params->get('Parent_Category_id'0);
$class_sfx $params->get('class_sfx''');
$moduleclass_sfx $params->get('moduleclass_sfx','');
$layout $params->get('layout','default');
$active_category_id vRequest::getInt('virtuemart_category_id''0');
$vendorId '1';

$enable $params->get('enable_tolltips'0);
$enableimg $params->get('enable_images'0);


$xOffset  $params->get    ('row_xOffset'50);
$yOffset  $params->get    ('row_yOffset', -150);

$categories $categoryModel->getChildCategoryList($vendorId$category_id);

// We dont use image here
//$categoryModel->addImages($categories);

if(empty($categories)) return false;

$level $params->get('level','2');
//print_r($level);
if($level>1){
foreach ($categories as $i => $category) {
$categories[$i]->childs $categoryModel->getChildCategoryList($vendorId$category->virtuemart_category_id) ;
// No image used here
//$categoryModel->addImages($category->childs);
//Yehyeh, very cheap done.
if($level>2){
foreach ($categories[$i]->childs as $j => $cat) {
$categories[$i]->childs[$j]->childs $categoryModel->getChildCategoryList$vendorId$cat->virtuemart_category_id );
}
}
}
}
//vmdebug('my categories',$categories);


$parentCategories $categoryModel->getCategoryRecurse($active_category_id,0);

/* Load tmpl default */
require(JModuleHelper::getLayoutPath('mod_virtuemart_category_tf',$layout));
?>


Thank you for your help.


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

amlil71

Thank you Jhon for your answer. Indeed i delete this function in vm2_cart plugin and now it's work fine :)

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

afentiko2000

Hi because i have the same problem could you please tell me where to find the fuction and delete it ( the path)??? I use vp onepage checkout plugin.

pinochico

connect to ftp by terminal and use function grep for find function in code
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

GJC Web Design

It will be in an old 3rd party extension as this function is no longer in the VM core.. it used to be in the cart helper
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

afentiko2000

thank you all for your responses. I erase line 6 $category_id = $cart->getCardCategoryId($product->virtuemart_product_id);
in html/mod_virtuemart_cart/default.php and now everything works fine. Thanks again

Jumbo!

Quote from: afentiko2000 on November 23, 2020, 15:32:15 PM
Hi because i have the same problem could you please tell me where to find the fuction and delete it ( the path)??? I use vp onepage checkout plugin.

This has no relation with VP One Page Checkout plugin. The plugin is fully compatible to VirtueMart 3.8.6.

It is a problem with VM cart module's layout override in your template.

jenkinhill

I got confused by this - the OP wrote My mod_virtuemart_cart.php file but then shows the code of mod_virtuemart_category.php

Would be good to know which template contains the module overrides with the code error. It's likely to cause problems for other users.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

jeanette

Hi,
i know this is an old thread but for anyone looking for answers:

I could not find the function getCardCategoryId in the template/html/mod_virtuemart_cart/default.php
What i did was to change the language from norwegian to english and it worked again. Maybe there was a lack of translations in the norwegian file that was the cause of this... ?  Anyways the english file was 100% translated and worked.

Correction: it did not after all help with the language file. But what did help was to change the joomla standard template to the home3 newly installed template.

GJC Web Design

Therefore -- as explained above .. your template has an old over ride which is still calling the now deleted function  getCardCategory()
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