OS Property support center

Display "city field" instead of "Category field"

  • DimitrisTEI
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 1 week ago #62502 by DimitrisTEI
Hello Dang,

Could you please help me with that?

I want to replace "Category" with "City" display.
Which file should i edit?

Thanks a lot
Attachments:

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

More
10 years 1 week ago #62513 by Mr. Dam
Hi,
To change the Category to City name, you can modify file: components > com_osproperty > templates > theme3 > listing.html.tpl.php and result.html.tpl.php
Thanks
Dam

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

  • DimitrisTEI
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 1 week ago #62516 by DimitrisTEI
Replied by DimitrisTEI on topic Display "city field" instead of "Category field"
Could you please what change should i make?

Thaaanks my friend!

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

More
10 years 4 days ago #62642 by Mr. Dam
Hi,
Please open file
components > com_osproperty > templates > theme3 > listing.html.tpl.php and result.html.tpl.php
<a rel="tag" href="<?php echo JRoute::_('index.php?option=com_osproperty&task=category_details&id='.$row->category_id);?>" title="<?php echo JText::_('OS_CATEGORY_DETAILS');?>">
<?php echo $row->category_name_short;?>
</a>
and replace by
<?php
$db = Jfactory::getDbo();
$db->setQuery("Select city from #__osrs_cities where id = '$row->city'");
$city = $db->loadResult();
echo $city
?>

Good luck
Dam

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

  • DimitrisTEI
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 3 days ago #62672 by DimitrisTEI
Replied by DimitrisTEI on topic Display "city field" instead of "Category field"
Thanks Dam,

It worked fine.
However, this works only in one language (english).
If i switch my website to another language (greek) the city name remains on english
www.greekhotel365.com is my link

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

  • DimitrisTEI
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 3 days ago #62673 by DimitrisTEI
Replied by DimitrisTEI on topic Display "city field" instead of "Category field"
I would also like to replace "Category" with "City" display on OS Content Slider module

Thanks a lot for your great support!

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

  • DimitrisTEI
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 3 weeks ago #79994 by DimitrisTEI
Replied by DimitrisTEI on topic Display "city field" instead of "Category field"
Hi Dam,

Could you please help me with that issue?
I have made the changes you told me, Cities have appeared (instead of categories)
However i have the following problems:
  1. Cities appear only on english language, even though i have translation for cities in greek
  2. When i visit my website from smartphone, it does not work in both english and greek

One last question is, how i make this change work also to mod os contentslider?

Thanks a lot in advance,

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

More
9 years 3 weeks ago #80024 by Mr. Dam
Hi,
With this kind of problem, i advise you to submit ticket and send your site url with super admin account. We will check and solve the issue for you.
By the way, on Smart phone (small screens), we disable that information, because if we show the City name, user won't able to see the pictures of properties.
Thanks
Dam

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

Moderators: Mr. DamNguyen Phu Quan