News:

Support the VirtueMart project and become a member

Main Menu

Error with 2.0.18a and Ajax Login

Started by pixelgeek, February 15, 2013, 21:40:46 PM

Previous topic - Next topic

pixelgeek

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

jjk

Looks like you are trying to use a VM1 plugin in VM2.0.18a. That won't work! VM2 is coded completly different.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

pixelgeek

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

jjk

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.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

pixelgeek

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?

jjk

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.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations