Solved Templates

SP Property

Asked by Angel 4 years ago Last activity 4 years ago

Accepted answer

Marked as the solution
Ofi Khan Staff

You are welcome. Please accept the answer that helped you. It will be then easier to find the solution for the other users with the same issue. There is a button to accept answer after each comment.

10 more replies

Angel Asked this

Hello,
If I have seen that, what I want to know in which source can I modify that order, that is, where the query is made to the database, to be able to modify it and first show a series of properties as highlights.
Thanks.

Ofi Khan Staff

You can customize this file:

/components/com_spproperty/views/maps/tmpl/default.xml

Angel Asked this

Hello,
that's not what I need. In that XML I can add sort methods for the combo that loads the sort in the MAP tab of the menu item.
What I need is to modify the MySQL query that uploads the properties of the table and order them by a new column, featured, that I have added to the table.

Thanks!

Ofi Khan Staff

Please go to this location: components/com_spproperty/models/maps.php and check in line 170. SQL query is generating here. You can change the file but keep in mind that if you update the component, then the changes will be lost.

Angel Asked this

Perfect! this needed. Just one more thing, the ORDERING field of the #_spproperty_properties table where it is populated from. Now I'm using it to mark which are the featured properties, but I don't know if this field is used for something else...
Thanks.

Ofi Khan Staff

You are welcome. This fetches the data from xxxxx_spproperty_properties table. In this table, all the properties are stored.

Angel Asked this

Yes, I know the xxxxx_spproperty_properties table because I have already made several modifications to add the fields that I needed. My question is what, if anything, is the ORDERING field of that table used for.
Thanks.

Ofi Khan Staff

I could not get your question properly. This ordering method sorts the properties. It generates the SQL Query for ordering the properties. Now, modifications is on your hand only.

Angel Asked this

Solved.
Thanks.

Log in to reply.