OS Property support center

Sort Ascending on Category properties

  • William Heafner
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 3 months ago #56467 by William Heafner
Sort Ascending on Category properties was created by William Heafner
I need to sort Ascending on my properties is this possible? And, can I change the property ID’s? I am confident I can change this via the OS Property database but I’m not sure which table and will this have an effect on any other aspects of OS Property component?

Please Log in or Create an account to join the conversation.

More
10 years 3 months ago #56497 by Mr. Dam
Replied by Mr. Dam on topic Sort Ascending on Category properties
Hi,
You can't change the Property IDs, the existing ID of properties are being used to connect several MySQL Tables, if you change it, the system won't work properly anymore.
By the way, can you please explain more details this question "I need to sort Ascending on my properties", what is the layout that you mentioned?
Thanks
Dam

Please Log in or Create an account to join the conversation.

  • William Heafner
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 3 months ago #56500 by William Heafner
Replied by William Heafner on topic Sort Ascending on Category properties
The category properties or listing view is what I would like to change. Here is a link to see the page brplodging.freesite.host/index.php/lodging/cabins
I believe OS Property by default is sorting by most recent property entered at top and first property entered at the bottom. I need the opposite. I understand the ID is most likely a primary key but it would be nice to have a potion order Id as well, so I could arrange the order the properties are listed manually.

Please Log in or Create an account to join the conversation.

More
10 years 3 months ago #56502 by Mr. Dam
Replied by Mr. Dam on topic Sort Ascending on Category properties
Hi,
To change the Sorting ID by ascending, please follow these steps
- Open file: components > com_osproperty > classes > category.html.php
- find:
$ordertype = JRequest::getVar('ordertype','desc');
and replace by
$ordertype = JRequest::getVar('ordertype','asc');

Good luck
Dam

Please Log in or Create an account to join the conversation.

  • William Heafner
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 3 months ago #56543 by William Heafner
Replied by William Heafner on topic Sort Ascending on Category properties
Worked perfectly
thank you very much
William Heafner

Please Log in or Create an account to join the conversation.

Moderators: Mr. DamNguyen Phu Quan