Hello,
Here is the code you need to put in the override, in the edit view, replace this code from line 102 to 115:
<?php
switch($this->conf->single_category_selection_type) {
default:
case 'normal':
JHTMLAdsmanagerCategory::displayNormalCategories($selectid ,$this->cats,$this->catid,array("root_allowed"=>$this->conf->root_allowed,"display_price"=>true),array("required"=>"","class"=>"input-large text-center"));break;
case 'color':
JHTMLAdsmanagerCategory::displayColorCategories($selectid ,$this->cats,$this->catid,array("root_allowed"=>$this->conf->root_allowed,"display_price"=>true),array("required"=>"","class"=>"input-large text-center"));break;
case 'combobox':
JHTMLAdsmanagerCategory::displayComboboxCategories($selectid ,$this->cats,$this->catid,array("root_allowed"=>$this->conf->root_allowed,"display_price"=>true),array("required"=>"","class"=>"input-large text-center"));break;
break;
case 'cascade':
JHTMLAdsmanagerCategory::displaySplitCategories($selectid ,$this->cats,$this->catid,array("root_allowed"=>$this->conf->root_allowed,"display_price"=>true),array("required"=>"","class"=>"input-large text-center"));break;
}
?>
By this:
<?php
foreach($this->cats as $cat) {
$imgsrc = TTools::getCatImageUrl($cat->id);
echo '<input type="radio" name="category" class="'.$selectid.'" /> <img src="'.$imgsrc.'" /> '.$cat->name;
}
?>
And replace the line 123 to 147:
jQ(document).ready(function() {
<?php if ($without_page_reload == 1) {?>
jQ('#category').change(function() {
updateFields();
<?php foreach($this->fields as $field) {
if (@$field->options->is_conditional_field == 1) { ?>
dependency('<?php echo $field->name?>',
'<?php echo $field->options->conditional_parent_name?>',
'<?php echo $field->options->conditional_parent_value?>');
<?php }
}?>
});
<?php } else { ?>
jQ('#categoryselect').change(function() {
if (jQ(this).val() != "") {
url = "<?php echo $write_url?>";
if (url.indexOf("?") != -1) {
location.href = "<?php echo $write_url?>&catid="+jQ(this).val();
} else {
location.href = "<?php echo $write_url?>?catid="+jQ(this).val();
}
}
});
<?php } ?>
});
By this:
jQ(document).ready(function() {
<?php if ($without_page_reload == 1) {?>
jQ('input.category').click(function() {
updateFields();
<?php foreach($this->fields as $field) {
if (@$field->options->is_conditional_field == 1) { ?>
dependency('<?php echo $field->name?>',
'<?php echo $field->options->conditional_parent_name?>',
'<?php echo $field->options->conditional_parent_value?>');
<?php }
}?>
});
<?php } else { ?>
jQ('input.categoryselect').click(function() {
if (jQ(this).val() != "") {
url = "<?php echo $write_url?>";
if (url.indexOf("?") != -1) {
location.href = "<?php echo $write_url?>&catid="+jQ(this).val();
} else {
location.href = "<?php echo $write_url?>?catid="+jQ(this).val();
}
}
});
<?php } ?>
});
Best regards.