Regarding the currency, please edit the file "administrator/components/com_hikashop/classes/filter.php" and replace the function display() of the class "hikashopCursorClass" by:
function display($filter, $divName, &$parent, $datas=''){
$selected = parent::display($filter, $divName, $parent);
if(!empty($selected) && !empty($selected[0])){
$values=parent::display($filter, $divName, $parent, '_values');
if(!is_array($values)){
$values = explode(' - ', $values);
}
if($filter->filter_deletable && $values[0] != 'none' && ( isset($values[0]) && !in_array($selected[0],array(" ",'')))){
$html = parent::displayInList($filter, $divName, $values);
return $html;
}
}
$cursorStep='';
$html='';
$cursorMin=0;
$cursorMax=1000;
$cursorEffect='';
$cursorWidth='width:250px;';
$float='';
$deleteButton='';
//try to get the min and max dynamically based on the other filters (does that really work Oo ?)
if(!empty($datas) && $filter->filter_dynamic){
$nameMax='max_'.$filter->filter_namekey;
$nameMin='min_'.$filter->filter_namekey;
$array = $datas['limits'];
if(!empty($array->$nameMax)){
$cursorMax=(float)$array->$nameMax;
}else{
$cursorMax=1000;
}
if(!empty($array->$nameMin)){
$cursorMin=(float)$array->$nameMin;
}else{
$cursorMin=0;
}
}
//force the min and max based on the settings of the filter
if($cursorMin==0 && $filter->filter_options['cursor_min']!='none' && isset($filter->filter_options['cursor_min']) && !in_array($filter->filter_options['cursor_min'],array(" ",''))){
$cursorMin=$filter->filter_options['cursor_min'];
}
if($cursorMax==1000 && !empty($filter->filter_options['cursor_max'])){
$cursorMax=$filter->filter_options['cursor_max'];
}
$minVal=$cursorMin;
$maxVal=$cursorMax;
if(!empty($filter->filter_options['cursor_effect'])){
$cursorEffect='animate: true,';
}
if(!empty($filter->filter_options['cursor_width'])){
$cursorWidth='width:'.$filter->filter_options['cursor_width'].'px;';
}
if(!empty($filter->filter_options['cursor_step'])){
$cursorStep='step:'.$filter->filter_options['cursor_step'].',';
}
if(isset($values)){
if(is_array($values) && count($values)!=2){
$data =& $values[0];
}else{
$data =& $values;
}
if( isset($data) && (is_array($data) || !in_array($data,array(" ",'')))){
if(!is_array($data)){
$data=explode(' - ',$data);
}
$minVal=(float)@$data[0];
$maxVal=(float)@$data[1];
}
}
if($minVal>$maxVal){
$tmp = $maxVal;
$maxVal = $minVal;
$minVal = $tmp;
}
if($cursorMin>$cursorMax){
$tmp = $cursorMax;
$cursorMax = $cursorMin;
$cursorMin = $tmp;
}
$onClick='';
if($filter->filter_direct_application){
$onClick='document.getElementById(\'slider_'.$filter->filter_namekey.'_'.$divName.'\').value="";document.forms[\'hikashop_filter_form_'.$divName.'\'].submit();';
}
$currency = '';
if($filter->filter_data=='price'){
$currencyClass = hikashop_get('class.currency');
$currencies = null;
$crurency_id = hikashop_getCurrency();
$currencies = $currencyClass->getCurrencies($crurency_id, $currencies);
$format = $currencies[$crurency_id]->currency_format;
if(strpos($format,'%n')!==false){
$currency.= ' '.$currencies[$crurency_id]->currency_symbol;
}
if(strpos($format,'%i')!==false){
$currency.= ' '.$currencies[$crurency_id]->currency_code;
}
}
$js = '
if(!hkjQuery) window.hkjQuery = window.jQuery;
hkjQuery(document).ready(function(){
hkjQuery("#slider_'.$filter->filter_namekey.'_'.$divName.'").prop(\'slide\',null).slider({
'.$cursorEffect.'
range: true,
min: '.$cursorMin.',
max: '.$cursorMax.',
'.$cursorStep.'
values: ['.$minVal.', '.$maxVal.'],
slide: function( event, ui ) {
hkjQuery( "#filter_'.$filter->filter_namekey.'_'.$divName.'_values" ).val( ui.values[ 0 ] + " - " + ui.values[ 1 ] );
hkjQuery( "#filter_'.$filter->filter_namekey.'_'.$divName.'" ).val(1);
';
if($currencies[$crurency_id]->currency_locale['p_cs_precedes']){
$js .= '
hkjQuery( "#filter_span_'.$filter->filter_namekey.'_'.$divName.'" ).html( "'.$currency.' " + ui.values[ 0 ] + " - '.$currency.' " + ui.values[ 1 ] );
';
}else{
$js .= '
hkjQuery( "#filter_span_'.$filter->filter_namekey.'_'.$divName.'" ).html( ui.values[ 0 ] + "'.$currency.' - " + ui.values[ 1 ] + "'.$currency.'" );
';
}
$js .= '
},
change: function( event, ui ) {' .
$onClick .'
}
});
hkjQuery( "#filter_'.$filter->filter_namekey.'_'.$divName.'_values" ).val( hkjQuery( "#slider_'.$filter->filter_namekey.'_'.$divName.'" ).slider( "values", 0 ) + " - " + hkjQuery( "#slider_'.$filter->filter_namekey.'_'.$divName.'" ).slider( "values", 1 ) );
';
if($currencies[$crurency_id]->currency_locale['p_cs_precedes']){
$js .= '
hkjQuery( "#filter_span_'.$filter->filter_namekey.'_'.$divName.'" ).html( "'.$currency.' " + hkjQuery( "#slider_'.$filter->filter_namekey.'_'.$divName.'" ).slider( "values", 0 ) + " - '.$currency.' " + hkjQuery( "#slider_'.$filter->filter_namekey.'_'.$divName.'" ).slider( "values", 1 ) );
';
}else{
$js .= '
hkjQuery( "#filter_span_'.$filter->filter_namekey.'_'.$divName.'" ).html( hkjQuery( "#slider_'.$filter->filter_namekey.'_'.$divName.'" ).slider( "values", 0 ) + "'.$currency.' - " + hkjQuery( "#slider_'.$filter->filter_namekey.'_'.$divName.'" ).slider( "values", 1 ) + "'.$currency.'" );
';
}
$js .= '
hkjQuery(\'#dialog_link, ul#icons li\').hover(
function() { hkjQuery(this).addClass(\'ui-state-hover\'); },
function() { hkjQuery(this).removeClass(\'ui-state-hover\'); }
);
});';
if(HIKASHOP_PHP5){
$doc = JFactory::getDocument();
}else{
$doc =& JFactory::getDocument();
}
$doc->addScriptDeclaration("\n<!--\n".$js."\n//-->\n");
hikashop_loadJslib('jquery');
hikashop_loadJslib('jquery-ui');
$hasValue='';
if(!empty($selected) && $selected[0]==1 && $values[0]!='none' && ( isset($data) && !in_array($data,array(" ",'')))) {
$deleteButton = ' ' . parent::getDeleteButton($filter, $divName, '11', $html, '', true);
$hasValue='1';
}
if($filter->filter_options['title_position']=='left'){
$float='float:left;';
}
$html = '<div style="'.$cursorWidth.' '.$float.' margin-top:10px; margin-bottom:10px;" id="slider_'.$filter->filter_namekey.'_'.$divName.'"></div>';
$html = $this->cursorTitlePosition($filter, $html, $cursorWidth, $divName,$deleteButton,$hasValue);
return $html;
}