For future reference:
Edit file: oc-content/plugins/cars_attributes/search_form.php
Around line 80, after closing div ( </div> ) of the transmission section add:
<div class="row one_input">
<?php $fuel = Params::getParam('fuel') ; ?>
<h6 for="fuel"><?php _e('Fuel', 'cars_attributes'); ?></h6>
<input style="width:20px;" type="radio" name="fuel" value="DIESEL" id="diesel" <?php if($fuel == 'DIESEL') { echo 'checked="yes"'; } ?>/> <label for="diesel"><?php _e('Diesel', 'cars_attributes'); ?></label><br />
<input style="width:20px;" type="radio" name="fuel" value="GASOLINE" id="gasoline" <?php if($fuel == 'GASOLINE') { echo 'checked="yes"'; } ?>/> <label for="gasoline"><?php _e('Gasoline', 'cars_attributes'); ?></label><br />
<input style="width:20px;" type="radio" name="fuel" value="ELECTRIC-HIBRID" id="electric-hibrid" <?php if($fuel == 'ELECTRIC-HIBRID') { echo 'checked="yes"'; } ?>/> <label for="electric-hibrid"><?php _e('Electric-Hibrid', 'cars_attributes'); ?></label><br />
<input style="width:20px;" type="radio" name="fuel" value="OTHER" id="other" <?php if($fuel == 'OTHER') { echo 'checked="yes"'; } ?>/> <label for="other"><?php _e('Other', 'cars_attributes'); ?></label><br />
</div>
So, this is what it'll look like including the transmission part:
<div class="row one_input">
<?php $transmission = Params::getParam('transmission') ; ?>
<h6 for="transmission"><?php _e('Transmission', 'cars_attributes'); ?></h6>
<input style="width:20px;" type="radio" name="transmission" value="MANUAL" id="manual" <?php if($transmission == 'MANUAL') { echo 'checked="yes"'; } ?>/> <label for="manual"><?php _e('Manual', 'cars_attributes'); ?></label><br />
<input style="width:20px;" type="radio" name="transmission" value="AUTO" id="auto" <?php if($transmission == 'AUTO') { echo 'checked="yes"'; } ?>/> <label for="auto"><?php _e('Automatic', 'cars_attributes'); ?></label>
</div>
<div class="row one_input">
<?php $fuel = Params::getParam('fuel') ; ?>
<h6 for="fuel"><?php _e('Fuel', 'cars_attributes'); ?></h6>
<input style="width:20px;" type="radio" name="fuel" value="DIESEL" id="diesel" <?php if($fuel == 'DIESEL') { echo 'checked="yes"'; } ?>/> <label for="diesel"><?php _e('Diesel', 'cars_attributes'); ?></label><br />
<input style="width:20px;" type="radio" name="fuel" value="GASOLINE" id="gasoline" <?php if($fuel == 'GASOLINE') { echo 'checked="yes"'; } ?>/> <label for="gasoline"><?php _e('Gasoline', 'cars_attributes'); ?></label><br />
<input style="width:20px;" type="radio" name="fuel" value="ELECTRIC-HIBRID" id="electric-hibrid" <?php if($fuel == 'ELECTRIC-HIBRID') { echo 'checked="yes"'; } ?>/> <label for="electric-hibrid"><?php _e('Electric-Hibrid', 'cars_attributes'); ?></label><br />
<input style="width:20px;" type="radio" name="fuel" value="OTHER" id="other" <?php if($fuel == 'OTHER') { echo 'checked="yes"'; } ?>/> <label for="other"><?php _e('Other', 'cars_attributes'); ?></label><br />
</div>
Edit file: oc-content/plugins/cars_attributes/index.php
Around line 47 after the transmission "break;" line add:
case 'fuel':
if( $value == 'DIESEL' || $value == 'GASOLINE' || $value == 'ELECTRIC-HIBRID' || $value == 'OTHER' ) {
Search::newInstance()->addConditions(sprintf("%st_item_car_attr.e_fuel = '%s'", DB_TABLE_PREFIX, $value));
$has_conditions = true;
}
break;
So it should now look like this:
case 'transmission':
if( $value == 'AUTO' || $value == 'MANUAL' ) {
Search::newInstance()->addConditions(sprintf("%st_item_car_attr.e_transmission = '%s'", DB_TABLE_PREFIX, $value));
$has_conditions = true;
}
break;
case 'fuel':
if( $value == 'DIESEL' || $value == 'GASOLINE' || $value == 'ELECTRIC-HIBRID' || $value == 'OTHER' ) {
Search::newInstance()->addConditions(sprintf("%st_item_car_attr.e_fuel = '%s'", DB_TABLE_PREFIX, $value));
$has_conditions = true;
}
break;
default:
break;
Note: This code is using the spelling "Electric-Hibrid" as in the original source code. If you've changed yours to reflect the North American spelling then then make sure this code reflects it. If you've added other fuel types then you'll need to add those options to this example.