- Posts: 28
- Thank you received: 0
OS Property support center
Extra field groups as amenities
- Davor
- Topic Author
- Offline
- Junior Member
-
Less
More
10 years 9 months ago #54035
by Davor
Extra field groups as amenities was created by Davor
Hello I would like to create an extra field group that would be identical to the amenities. So that I add a feature and have a checkmark there. How can I do this?
Thank you,.
Thank you,.
Please Log in or Create an account to join the conversation.
- Dang Thuc Dam
-
- Offline
- Administrator
-
Less
More
- Posts: 13244
- Thank you received: 1729
10 years 9 months ago #54058
by Dang Thuc Dam
Replied by Dang Thuc Dam on topic Extra field groups as amenities
Hi Davor,
Even you use the extra field groups and extra fields, you still don't have feature to add icons beside the value as you want.
I think the solution for you is
1. Modify the db table #__osrs_amenities and add column "icons", and then, you can add the class icon name into that field. Because number of amenities are limited, so you can add the value through PHPMyAdmin easily.
2. Modify the property details layout. And add the <icon> tags beside the amenities.
file is in
components > com_osproperty > classes > listing.php
find this code
$query = "Select a.* from #__osrs_amenities as a"
." inner join #__osrs_property_amenities as b on b.amen_id = a.id"
." where a.published = '1' and b.pro_id = '$property->id' order by a.ordering";
$db->setQuery($query);
$amens = $db->loadObjectList();
$amens_str1 = "";
if(count($amens) > 0){
$amens_str = "";
$j = 0;
$k = 0;
for($i=0;$i<count($amens);$i++){
$j++;
$amen = $amens[$i];
$amens_str .= OSPHelper::getLanguageFieldValue($amen,'amenities').", ";
}
$amens_str = substr($amens_str,0,strlen($amens_str)-2);
$k = 0;
for($i=0;$i<count($amens);$i++){
$k++;
$amen = $amens[$i];
$amens_str1 .= "<div class='span4' style='margin-left:0px;'><i class='osicon-ok'></i> ".OSPHelper::getLanguageFieldValue($amen,'amenities')."</div>";
if($k == 3){
$k = 0;
$amens_str1.= "<div class='clearfix'></div>";
}
}
}else{
$amens_str = JText::_('OS_NO_AMENITIES');
$amens_str1 = JText::_('OS_NO_AMENITIES');
}
You can find <i class='osicon-ok'> and replace by the code to show the icons of amenities
Thanks
Dam
Even you use the extra field groups and extra fields, you still don't have feature to add icons beside the value as you want.
I think the solution for you is
1. Modify the db table #__osrs_amenities and add column "icons", and then, you can add the class icon name into that field. Because number of amenities are limited, so you can add the value through PHPMyAdmin easily.
2. Modify the property details layout. And add the <icon> tags beside the amenities.
file is in
components > com_osproperty > classes > listing.php
find this code
$query = "Select a.* from #__osrs_amenities as a"
." inner join #__osrs_property_amenities as b on b.amen_id = a.id"
." where a.published = '1' and b.pro_id = '$property->id' order by a.ordering";
$db->setQuery($query);
$amens = $db->loadObjectList();
$amens_str1 = "";
if(count($amens) > 0){
$amens_str = "";
$j = 0;
$k = 0;
for($i=0;$i<count($amens);$i++){
$j++;
$amen = $amens[$i];
$amens_str .= OSPHelper::getLanguageFieldValue($amen,'amenities').", ";
}
$amens_str = substr($amens_str,0,strlen($amens_str)-2);
$k = 0;
for($i=0;$i<count($amens);$i++){
$k++;
$amen = $amens[$i];
$amens_str1 .= "<div class='span4' style='margin-left:0px;'><i class='osicon-ok'></i> ".OSPHelper::getLanguageFieldValue($amen,'amenities')."</div>";
if($k == 3){
$k = 0;
$amens_str1.= "<div class='clearfix'></div>";
}
}
}else{
$amens_str = JText::_('OS_NO_AMENITIES');
$amens_str1 = JText::_('OS_NO_AMENITIES');
}
You can find <i class='osicon-ok'> and replace by the code to show the icons of amenities
Thanks
Dam
Please Log in or Create an account to join the conversation.
Moderators: Dang Thuc 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.