News:

Looking for documentation? Take a look on our wiki

Main Menu

Shopper groups don´t get translated in User view

Started by Jörgen, September 17, 2016, 22:49:12 PM

Previous topic - Next topic

Jörgen

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
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Milbo

Did you tried this solution? As far as I know, that is a whole list
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Jörgen

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
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Milbo

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?
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Jörgen

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
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Milbo

oh, let it here, so all can see that we had a nice conversation :-)
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Jörgen

#6
OK

No worries  8)

regards

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.