Jump to content
Sign in to follow this  
Guest beatriz pedreira de vargas

changing the order of properties

Recommended Posts

Guest beatriz pedreira de vargas

Hi;

 

By default properties are arranged by publication date... how could I change this value to cheapest first???

 

Pls help!

 

Regards

 

Maria

Share this post


Link to post
Share on other sites
Guest robbert

Hi,

 

Which version do you use?

 

It is somewhere in the components/com_jomestate/models/search.php

 

look for the following code somewhere at line 72.

 

$sort = $filter->clean($mainframe->getUserStateFromRequest('sort', 'sort', 0, 'int'), 'INT');

if (!$sort) $sort = 1;

if ($sort == 1) $sort = 'ads.featured DESC, ads.date_modified DESC';

if ($sort == 2) $sort = 'ads.featured DESC, ads.id DESC';

if ($sort == 3) $sort = 'ads.featured DESC, ads.ad_price DESC';

if ($sort == 4) $sort = 'ads.featured DESC, ads.ad_price ASC';

 

and change it in:

 

$sort = $filter->clean($mainframe->getUserStateFromRequest('sort', 'sort', 0, 'int'), 'INT');

if (!$sort) $sort = 1;

if ($sort == 1) $sort = 'ads.featured DESC, ads.ad_price ASC';

if ($sort == 2) $sort = 'ads.featured DESC, ads.id DESC';

if ($sort == 3) $sort = 'ads.featured DESC, ads.ad_price DESC';

if ($sort == 4) $sort = 'ads.featured DESC, ads.date_modified DESC';

 

could be that your $sort is defined a bit different.

 

Let me know or this works for you.

 

Robbert

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×