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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...