Tag Archives: order

Search by specific price related to purpose

By default search by price works based on defined purpose “Sale “or “Rent”

By default Sale price is used, field ID #36

If user select purpose which contains word “Rent” then field ID #37 (Rent is used)

Only Rent price (excl.) is used for search, other is only used for information, to show on property preview page.

If you want to add new prices for search or customize this functionality, probably you should look into application\controllers\frontend.php, ajax method, code inside comment block:

/* Define purpose */
/* End define purpose */

Currently there is code to automatically change from sale price to rent if user select purpose which contain word “Rent”. You should do same thing for your new price/purpose.

Also don’t forget to enable filtering for your new price field in administration, guide: http://iwinter.com.hr/support/?p=5804

If you are not familiar with PHP I can provide customization for you (cost additional). Details: http://iwinter.com.hr/support/?page_id=1870

Related posts:

http://iwinter.com.hr/support/?p=322

http://iwinter.com.hr/support/?p=5804

Add additional sort / order on homepage

Some PHP + HTML knowledge is required for this.

For version >= 1.5.5.:

This feature is only available for this type of fields: ‘INPUTBOX’, ‘DECIMAL’, ‘INTEGER’

For example that you want to enable filtering by: “Energy efficient”

Go to Admin->Real estates->Fields->Edit “Energy efficient” and click on “Enable numerical filtering”:

numeric_filtering

Now you need to add additional field in dropdown on homepage.

For realocation template for example open templates\{your-template}\widgets\center_recentproperties.php (or another if you using) add additional option in:

<select class="form-control pull-right selectpicker-small" placeholder="<?php _l('Sort'); ?>">
    <option value="id ASC" <?php _che($order_dateASC_selected); ?>><?php _l('DateASC'); ?></option>
    <option value="id DESC" <?php _che($order_dateDESC_selected); ?>><?php _l('DateDESC'); ?></option>
    <option value="price ASC" <?php _che($order_priceASC_selected); ?>><?php _l('PriceASC'); ?></option>
    <option value="price DESC" <?php _che($order_priceDESC_selected); ?>><?php _l('PriceDESC'); ?></option>
</select>

For example:

<option value="field_59_int ASC" <?php _che($order_field_59_int_ASC_selected); ?>><?php _l('Energy efficient'); ?></option>

Also you should add it in: templates\{your-template}\results.php

if value is not numeric then you should:

into property_lang database table add:

varchar(200)utf8_unicode_ci

Add this:

<option value=”field_7 ASC”>Your option name</option>

7 in that case represents field ID

One example:

ordering_default

ordering_example_selection