OS Property support center

Add field to 'most viewed' in agent edit profile

  • Jim
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
10 years 6 months ago #52610 by Jim
I am wanting to add another field into the Agent Edit Profile template (agent.html.php)

Under the 'most viewed' table i want to add an additional column with the property reference.

any ideas how to add this?


Attachments:

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

More
10 years 6 months ago #52614 by Mr. Dam
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

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

  • Jim
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
10 years 6 months ago #52622 by Jim
Thanks Dam,
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.

More
10 years 6 months ago #52633 by Mr. Dam
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

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

Moderators: Mr. DamNguyen Phu Quan