Advertisement:

Author Topic: cars_attributes add 2 diferent fields (no sucess yet)  (Read 914 times)

Dannad_

  • Jr. Member
  • **
  • Posts: 55
cars_attributes add 2 diferent fields (no sucess yet)
« on: September 15, 2017, 04:10:46 am »
hi dudes.. the thing is... i´m trying to add 2 diferents field/items in search filter but not working.

1} add seller

it´s drive me crazy, dudes...

i read the following issues:

https://forums.osclass.org/cars-attributes/add-items-in-serch-filter/
https://forums.osclass.org/plugins/how-i-can-add-new-attributes-for-cars-attributes-plugins/msg32567/#msg32567
https://forums.osclass.org/cars-attributes/add-items-in-serch-filter/msg136846/#msg136846

and still get no answer, i´ve tryed everything .. see source below


index.php
Code: [Select]
                case 'seller':
                    if( is_numeric($value) ) {
                        Search::newInstance()->addConditions(sprintf("%st_item_car_attr.e_seller = %d", DB_TABLE_PREFIX, $value));
                        $has_conditions = true;
                    }
                break;

in search_form.php

Code: [Select]
    <div class="row one_input">
        <h6><?php _e('Seller''cars_attributes'); ?></h6>
        <select name="e_seller" id="e_seller">
            <option value=""><?php _e('Select a dealer''cars_attributes'); ?></option>
            <?php foreach($e_seller as $v) { ?>
                <option value="<?php echo $v['pk_i_id']; ?>" <?php if($seller==$v['pk_i_id']) { echo 'selected'; } ?>><?php echo $v['e_seller']; ?></option>
            <?php ?>
        </select>
    </div>

and dont work... the title shows ok but the select is empty


2} i´m trying to add "Engine(cc)" field but no sucess....

someone can help me to solve this issues?? tnks .. regards
« Last Edit: September 15, 2017, 05:04:20 am by Dannad_ »