- Posts: 106
- Thank you received: 2
OS Property support center
Add field to 'most viewed' in agent edit profile
- Jim
- Topic Author
- Offline
- Premium Member
-
Less
More
10 years 6 months ago #52610
by Jim
Add field to 'most viewed' in agent edit profile was created by Jim
- Mr. Dam
-
- Offline
- Administrator
-
Less
More
- Posts: 13057
- Thank you received: 1696
10 years 6 months ago #52614
by Mr. Dam
Replied by Mr. Dam on topic Add field to 'most viewed' in agent edit profile
Hi,
You can modify "Most viewed properties" in Agent profile in file:
components > com_osproperty > classes > agent.html.php
function: showMostViewProperties line 463 (OS Property 2.7.3)
Thanks
Dam
You can modify "Most viewed properties" in Agent profile in file:
components > com_osproperty > classes > agent.html.php
function: showMostViewProperties line 463 (OS Property 2.7.3)
Thanks
Dam
Please Log in or Create an account to join the conversation.
- Jim
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 106
- Thank you received: 2
10 years 6 months ago #52622
by Jim
Replied by Jim on topic Add field to 'most viewed' in agent edit profile
Thanks Dam,
What is the variable in the array for the property reference.
<?php echo $row->ref; ?> doesn't work.
What is the variable in the array for the property reference.
<?php echo $row->ref; ?> doesn't work.
Please Log in or Create an account to join the conversation.
- Mr. Dam
-
- Offline
- Administrator
-
Less
More
- Posts: 13057
- Thank you received: 1696
10 years 6 months ago #52633
by Mr. Dam
Replied by Mr. Dam on topic Add field to 'most viewed' in agent edit profile
Hi,
If you want to add field (information of property), you need to retrieve it in the SQL Query first. For example, if you want to add ref into the property details, you need to change file: components > com_osproperty > classes > agent.php
find
$db->setQuery("Select id,pro_name,hits from #__osrs_properties where hits > 0 and agent_id = '$agent->id' and published = '1' and approved = '1' order by hits desc limit 5");
$lists = $db->loadObjectList();
and add "Ref" into SQL
$db->setQuery("Select id,ref,pro_name,hits from #__osrs_properties where hits > 0 and agent_id = '$agent->id' and published = '1' and approved = '1' order by hits desc limit 5");
$lists = $db->loadObjectList();
Good luck
Dam
If you want to add field (information of property), you need to retrieve it in the SQL Query first. For example, if you want to add ref into the property details, you need to change file: components > com_osproperty > classes > agent.php
find
$db->setQuery("Select id,pro_name,hits from #__osrs_properties where hits > 0 and agent_id = '$agent->id' and published = '1' and approved = '1' order by hits desc limit 5");
$lists = $db->loadObjectList();
and add "Ref" into SQL
$db->setQuery("Select id,ref,pro_name,hits from #__osrs_properties where hits > 0 and agent_id = '$agent->id' and published = '1' and approved = '1' order by hits desc limit 5");
$lists = $db->loadObjectList();
Good luck
Dam
Please Log in or Create an account to join the conversation.
Moderators: Mr. Dam, Nguyen Phu Quan
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
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.
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.