VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Jörgen on September 17, 2016, 22:49:12 PM

Title: Shopper groups don´t get translated in User view
Post by: Jörgen on September 17, 2016, 22:49:12 PM
Hello

Shopper groups don't get translated:

VM_3.0.17.6\components\com_virtuemart\views\user\tmpl\edit_vmshopper.php

In line 67:
<?php echo $this->lists['shoppergroups']; ?>

Change to:
<?php echo vmText::_($this->lists['shoppergroups']); ?>

regards

Jörgen @ Kreativ Fotografi
Title: Re: Shopper groups don´t get translated in User view
Post by: Milbo on September 18, 2016, 22:16:31 PM
Did you tried this solution? As far as I know, that is a whole list
Title: Re: Shopper groups don´t get translated in User view
Post by: Jörgen on September 19, 2016, 00:41:12 AM
Hello Milbo

Yes, I have used this solution since 3.0.8 and was surprised to see that it still has not been implemented.

Please see attached screen shot.

regards

Jörgen @ Kreativ Fotografi
Title: Re: Shopper groups don´t get translated in User view
Post by: Milbo on September 19, 2016, 13:44:29 PM
But what is not translated? the code in view.html.php

if(vmAccess::manager('user.edit')) {
$shoppergrps = array();
foreach($_shoppergroup as $group){
$shoppergrps[] = $group['virtuemart_shoppergroup_id'];
}
if (!class_exists('ShopFunctions')) require(VMPATH_ADMIN . DS . 'helpers' . DS . 'shopfunctions.php');
$this->_lists['shoppergroups'] = ShopFunctions::renderShopperGroupList($shoppergrps);
} else {
foreach($_shoppergroup as $group){
$this->_lists['shoppergroups'] .= vmText::_($group['shopper_group_name']).', ';
}
$this->_lists['shoppergroups'] = substr($this->_lists['shoppergroups'],0,-2);
}


The first line of renderShopperGroupList is VmConfig::loadJLang('com_virtuemart_shoppers',TRUE); and any option is setup with vmText and it also works for me.

Hmm Maybe I added that after vm3.0.17.6?
Title: Re: Shopper groups don´t get translated in User view
Post by: Jörgen on September 19, 2016, 20:28:20 PM
Hello Milbo

Sorry for the confusion. I have used this "fix" in the edit_vmshopper.php and did not notice the update in the view.html.php. I was so locked on searching for a similar solution that I missed the corrected code. I Was going through the updates to see what overrides I would have to change and acted a bit to fast.

You are right, it works without my suggested fix.

Should I delete this thread ?

regards

Jörgen @ Kreativ Fotografi
Title: Re: Shopper groups don´t get translated in User view
Post by: Milbo on September 20, 2016, 12:10:33 PM
oh, let it here, so all can see that we had a nice conversation :-)
Title: Re: Shopper groups don´t get translated in User view
Post by: Jörgen on September 20, 2016, 12:44:00 PM
OK

No worries  8)

regards

Jörgen @ Kreativ Fotografi