- Posts: 2
- Thank you received: 0
Order by Price?
- Adam
- Topic Author
- Offline
- New Member
-
Please Log in or Create an account to join the conversation.
- Mr. Dam
-
- Offline
- Administrator
-
- Posts: 13056
- Thank you received: 1696
You can modify the source code to get the properties order by price. Please follow these steps.
1. Open file :
components > com_osproperty > classes > listing.php
2. find php function : listProperties
3. find
if($orderby == ""){
$orderby = "a.id";
}
and change to
if($orderby == ""){
$orderby = "a.price";
}
Thanks
Dam
Please Log in or Create an account to join the conversation.
- Adam
- Topic Author
- Offline
- New Member
-
- Posts: 2
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- Mr. Dam
-
- Offline
- Administrator
-
- Posts: 13056
- Thank you received: 1696
Please send your site information with super admin account, ftp account to : damdt@joomservices.com. i will help you to change it.
Thanks
Dam
Please Log in or Create an account to join the conversation.
- Tony Cline
- Offline
- Senior Member
-
- Posts: 65
- Thank you received: 0
I have changed the code as you have suggested but when using a menu type: OS Property » Layout: Property listing layout it does not make a difference. Is there something else that I need to do? It appears that it is still sorting by what the menu sort is selected to. My only options are
"Order properties by Hits" or Order properties by Latest". I want to order all of my property lists by Descending Price.
Please Log in or Create an account to join the conversation.
- Anatoly
- Offline
- New Member
-
- Posts: 4
- Thank you received: 0
Tony Cline wrote: Hi Dam,
I have changed the code as you have suggested but when using a menu type: OS Property » Layout: Property listing layout it does not make a difference. Is there something else that I need to do? It appears that it is still sorting by what the menu sort is selected to. My only options are
"Order properties by Hits" or Order properties by Latest". I want to order all of my property lists by Descending Price.
Any solution for this?
Please Log in or Create an account to join the conversation.
- Mr. Dam
-
- Offline
- Administrator
-
- Posts: 13056
- Thank you received: 1696
In version 2.1.0, in the property listing layout, we add the price ordering. You can use that feature.
Thanks
Dam
Please Log in or Create an account to join the conversation.
- Frédéric Boudet
-
- Offline
- New Member
-
- Posts: 15
- Thank you received: 0
ABB
Please Log in or Create an account to join the conversation.
- Hamlet Kraskian
- Offline
- New Member
-
- Posts: 11
- Thank you received: 1
in components/com_osproperty/classes /listing.php
if(!in_array($orderby, $orderbyArray)){
// $orderby = "a.id";
$orderby = "a.price" ;
$ordertype = "desc";
}
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.