VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: jahan87 on April 14, 2013, 18:32:33 PM

Title: Add to cart error.
Post by: jahan87 on April 14, 2013, 18:32:33 PM
Joomla Version: 1.5.26
Virtuemart version: 2.0.20b

Error:
<br />
<b>Fatal error</b>:  Call to undefined method JComponentHelper::filterText() in <b>/home/content/86/8616886/html/jaguarworks/alqamees/components/com_virtuemart/helpers/cart.php</b> on line <b>432</b><br />

I get this error in request when i have added customer input field. If remove it from product then add to cart link works fine.

link to website is:  http://www.jaguarworks.com/alqamees/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=10&virtuemart_category_id=2

tried a plugin too but still same error.



Title: Re: Add to cart error.
Post by: jenkinhill on April 14, 2013, 20:19:04 PM
I believe you need to be using Joomla 2.5 for the function JComponentHelper::filterText() to work.

As reported in October 2012,  Joomla 1.5 is no longer supported for VirtueMart. http://virtuemart.net/news/list-all-news/426-end-of-life-for-virtuemart-11-heidelpay-now-in-virtuemart-2012    "the version 2 of VirtueMart is not any longer maintaining joomla 1.5 compatibility."
Title: Re: Add to cart error.
Post by: Marcus Hjortsberg on May 25, 2013, 23:48:36 PM
Ok, now I updated VM...

Everything worked before I updated, now nothing works...

I run Joomla 1.5 and VM 2.0.20b...

How do I back to VM 2.0.18?

Can I just upload the files from 2.0.18 and all will work? Or do I have to do anything else?

And please spare me the lecture about Joomla version, I won't upgrade, I simply can't at the moment...

Thanx for a good component:)
Title: Re: Add to cart error.
Post by: Milbo on May 26, 2013, 04:05:43 AM
simply install the old version over it. But I would use the new version and copy paste the missing function into the j1.5 file. The function is important to filter the input of your customers, so you should use it, really.
Title: Re: Add to cart error.
Post by: Marcus Hjortsberg on May 26, 2013, 10:20:39 AM
Ok, if that will make everything work, that is fine with me:)

Could you please give me some pionters to what files it is about?
I could search for my self but you could spare me some hours:)

Thanx in advance!
Title: Re: Add to cart error.
Post by: Marcus Hjortsberg on May 26, 2013, 12:13:07 PM
Ok, found the file and function, now I get

Fatal error: Class 'JAccess' not found in /libraries/joomla/application/component/helper.php on line 105

on that line I find

$userGroups   = JAccess::getGroupsByUser($user->get('id'));

What do I do about that?

--Update--

Ok, the getGroupsByUser fetches the groups that a user has...(?)
I use Juga to have multiple groups to a user, how do I get the groups from that??

--Update--

Ok!

Now it works:)

I simply did, in the filterText function

//$userGroups   = JAccess::getGroupsByUser($user->get('id'));
$userGroups   = array($user->get('id'));

I thought that my users only have one user group, in Juga I use it to show some different content, nothing crutial...

Now I hope nothing else screws up at a later time:)