';
foreach ($fields as $field) {
if ($field != $orderby) {
$dotps = strrpos ($field, '.');
if ($dotps !== FALSE) {
$prefix = substr ($field, 0, $dotps + 1);
$fieldWithoutPrefix = substr ($field, $dotps + 1);
}
else {
$prefix = '';
$fieldWithoutPrefix = $field;
}
$text = vmText::_ ('COM_VIRTUEMART_' . strtoupper (str_replace(array(',',' '),array('_',''),$fieldWithoutPrefix)));
$field = explode('.',$field);
if(isset($field[1])){
$field = $field[1];
} else {
$field = $field[0];
}
$link = JRoute::_ ($fieldLink . $manufacturerTxt . '&orderby=' . $field ,FALSE);
$orderByLink .= '
';
}
}
$orderByLink .= '
';
}
if($orderDir == 'ASC'){
$orderDir = 'DESC';
} else {
$orderDir = 'ASC';
}
$orderDirConf = VmConfig::get ('prd_brws_orderby_dir');
$orderbyCfg = VmConfig::get ('browse_orderby_field');
if ($orderDir != $orderDirConf ) {
$orderDirLink = '&dir=' . $orderDir; //was '&order='
} else {
$orderDirLink = '';
}
$orderDirTxt = vmText::_ ('COM_VIRTUEMART_'.$orderDir);
$link = JRoute::_ ($fieldLink . $manufacturerTxt . $orderbyTxt . $orderDirLink,FALSE);
// full string list
if ($orderby == '') {
$orderby = $orderbyCfg;
}
$orderby = strtoupper ($orderby);
$dotps = strrpos ($orderby, '.');
if ($dotps !== FALSE) {
$prefix = substr ($orderby, 0, $dotps + 1);
$orderby = substr ($orderby, $dotps + 1);
}
else {
$prefix = '';
}
$orderby=str_replace(',','_',$orderby);
$orderByList = '