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

BUG FIX: ShopperGroups not translated in Account Maintenance frontend page

Started by mgworld, July 07, 2015, 18:19:29 PM

Previous topic - Next topic

mgworld

Hi, I discovered a bug in the file edit_vmshopper.php. If you use virtuemart in a multilanguage scenario, the string of the shoppergroups is not translated in the "Account Maintenance" frontend page.

I fixed it by replacing the line 68:

<?php echo $this->lists['shoppergroups']; ?>

with this code:

<?php 
$sgArray explode(", "$this->lists['shoppergroups']);
$shoppergroups "";
foreach ($sgArray as $sg)
{
   $shoppergroups .= vmText::_($sg) . ", ";
}
$shoppergroups substr($shoppergroups0, -2);
echo $shoppergroups;
?>


Now all the shoppergroups strings are correctly translated and displayed.  ;)

Milbo

Thank you for the advice, but what you did is quickndirty fix not useable for the core. Furthermore you do not write your version. In the current version the problem is imho fixed.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

mgworld

Sorry, I'm using Virtuemart version 3.0.9.4 and Joomla 3.4.3.

The problem is that if you use a string like COM_VIRTUEMART_SHOPPERGROUP_DEFAULT for the Shopper Group Name field of a shopper group, then, in the user profile that a normal user (not admin or superadmin... A simple registered user) could see from a normal page of the site, without my fix the user see the untranslated string COM_VIRTUEMART_SHOPPERGROUP_DEFAULT, instead of "Default Shopper Group" or similar.

Maybe you already fixed the bug in a beta in development?

Milbo


public static function genericlist($data, $name, $attribs = null, $optKey = 'value', $optText = 'text', $selected = null, $idtag = false,
$translate = false)

We use as last parameter "true", so it should be translated. The shoppergroups are translated for me. Just tested, works on j2.5.28, j3.4.1 and j3.4.3.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

mgworld

Hi, I just tried a new clean installation of joomla 3.4.1, updated to 3.4.3, installed virtuemart 3.0.9, activated multilanguage plugins, and I have always the problem I mentioned in the previous post, as you can see from the attached image...

Are you sure you activated the multi-language plugins in joomla ("System - Language Filter" and "System - Language Code") ?

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

mgworld