VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: pixelgeek on February 15, 2013, 21:40:46 PM

Title: Error with 2.0.18a and Ajax Login
Post by: pixelgeek on February 15, 2013, 21:40:46 PM
We are using the Ajax Login plugin on our site and since I have updated to 2.0.18a I am unable to use the plugin.

The error we get it

Call to a member function _() on a non-object in <path clipped>modules/mod_improved_ajax_login/mod_improved_ajax_login.php on line 76

The line in question is

$mycart = $VM_LANG->_('PHPSHOP_CART_SHOW');

Is there a way to work around this bug or has support for $VM_LANG been removed?

TIA
Title: Re: Error with 2.0.18a and Ajax Login
Post by: jjk on February 17, 2013, 16:58:17 PM
Looks like you are trying to use a VM1 plugin in VM2.0.18a. That won't work! VM2 is coded completly different.
Title: Re: Error with 2.0.18a and Ajax Login
Post by: pixelgeek on February 17, 2013, 19:04:21 PM
The Ajax Login isn't a VM plugin.

Are there some sort of developer docs I can read to determine what the correct way to access the language settings are so I can rewrite this? Currently I have hard-coded the text
Title: Re: Error with 2.0.18a and Ajax Login
Post by: jjk on February 17, 2013, 19:45:13 PM
Perhaps you just need to update your 'Improved Ajax Login' to the latest version. Your "$mycart = $VM_LANG->_('PHPSHOP_CART_SHOW');" certainly is code for VM1.
VM2 normally uses the Joomla login module.
Title: Re: Error with 2.0.18a and Ajax Login
Post by: pixelgeek on February 17, 2013, 19:51:35 PM
I have the latest version.They just didn't update it for VM2.

As I mentioned, are their docs that I can use to make the required changes to the plugin?
Title: Re: Error with 2.0.18a and Ajax Login
Post by: jjk on February 17, 2013, 21:29:42 PM
Not shure if this is what you are looking for: http://dev.virtuemart.net/projects/virtuemart/wiki/Writing_translation
Maybe you can just comment out the line(s). If your plugin works on Joomla content pages, it should work on VirtueMart pages too, because VM2 now uses the Joomla login and also the Joomla language file rules.