- Posts: 21
- Thank you received: 0
Modifying the property details template
- Jaime
- Topic Author
- Offline
- Junior Member
-
I need to customize completely the property details page according to my customer requierements, so I need to make a different layout.
I have seen that the PHP file that renders the layout is com_osproperty/classes/listing.html.php, At the moment, to do what I need is to modify directly that file, which is bad, because I would be hacking the osproperty core files. The ideal way is to be able to add a file to my templates folder and make the modifications there, as I do with all other Joomla components.
What is the best way to customize osproperty details page?
Thanks
Jaime
Please Log in or Create an account to join the conversation.
- Mr. Dam
-
- Offline
- Administrator
-
- Posts: 13056
- Thank you received: 1696
The details template file is in:
components > com_osproperty > templates > your_current_template > details.html.php
You can make your own template in OS Property, please read about the "theme" of OS Property in documentation: osproperty.ext4joomla.com/OS_Property_Instructions.pdf part Backend > 14. Templates management
Thanks
Dam
Please Log in or Create an account to join the conversation.
- Jaime
- Topic Author
- Offline
- Junior Member
-
- Posts: 21
- Thank you received: 0
however an error has been shown.
I have copied a templates folder into a new one. Change the XML to reflect my folder. Compressed it into a ZIP file. Finally, by using install new theme option, I select the ZIP file and press the Install button. This error appeared:
Fatal error: Class 'JFile' not found in C:\.........\htdocs\administrator\components\com_osproperty\classes\theme.php on line 216
Regards,
Jaime
Please Log in or Create an account to join the conversation.
- Jaime
- Topic Author
- Offline
- Junior Member
-
- Posts: 21
- Thank you received: 0
jimport('joomla.filesystem.file');
That is the standard way used by the extensions installer in Joomla. I am wondering if you tested it before publishing this version.
Regards,
Jaime
Please Log in or Create an account to join the conversation.
- Jaime
- Topic Author
- Offline
- Junior Member
-
- Posts: 21
- Thank you received: 0
I have found something bad in template design that does not make the template fully customizable.
I am trying to display price according to design created by my web designer. I have found that $row->price and $row->price1 has the price, however, both properties include this tag:
It is certain that I can say my web designer to change the design to consider that added tag or use strip_tags function to strip the HTML tags out, however, don't you think this is a bad practice?
There is another property, price_original, which contains the number without tags, but that property could be used to offer a discount so I cannot use at the moment.
Regards,
Jaime
Please Log in or Create an account to join the conversation.
- Mr. Dam
-
- Offline
- Administrator
-
- Posts: 13056
- Thank you received: 1696
First of all, thank you for your bug report that related to the source code to import file library of Joomla. In fact, when we tested it in several Joomla versions, it doesn't show that error because in those version, Joomla has already included the library first. But in other Joomla versions, that code line should be included. I will fix this issue and update into next version.
Second problem.
In the template, you see the tag: $row->price or $row->price1. In fact, these information have been defined in the file
components > com_osproperty > classes > listing.html.php
Please go to that file and then, function propertyDetails line 762
and find :
//price
ob_start();
echo "<span style='font-weight:bold;font-size:15px;'>";
if($row->price_call == 0){
if($row->price > 0){
?>
<div id="currency_div" style="padding:0px;">
<?php
echo JText::_('OS_PRICE');
echo ": ";
echo HelperOspropertyCommon::loadCurrency($row->curr)." ".HelperOspropertyCommon::showPrice($row->price);
if($row->rent_time != ""){
echo "/".JText::_($row->rent_time);
}
if($configClass == 1){
?>
<BR />
<span style="font-size:11px;">
<?php echo JText::_('OS_CONVERT_CURRENCY')?>: <?php echo $lists?>
</span>
<?php
}
?>
</div>
<input type="hidden" name="live_site" id="live_site" value="<?php echo JURI::root()?>" />
<input type="hidden" name="currency_item" id="currency_item" value="" />
<?php
}
}elseif($row->price_call == 1){
echo " ".JText::_('OS_CALL_FOR_DETAILS_PRICE');
}
echo "</span>";
$price = ob_get_contents();
ob_end_clean();
$row->price = $price;
In this part, you can remove the line
$row->price = $price;
And then, in the template file, you can use $row->price normally, it will show the price of property without any html tags or other text as you mentioned.
I don't think it's a problem as you complain. Reason: Very simple, one normal customer isn't able to understand about the php code, and if he want to show the price information. He only need to have <?php echo $row->price?> or <?php echo $row->price1?> instead of write above code to show the price information only.
Maybe you are expert template manager and you need a nicer layout for that information. But you can ask me where and how to change it. I am happy to answer to you.
Thanks
Dam
Please Log in or Create an account to join the conversation.
- Jaime
- Topic Author
- Offline
- Junior Member
-
- Posts: 21
- Thank you received: 0
Best regards,
Jaime
Please Log in or Create an account to join the conversation.
- Aydın
- Offline
- Senior Member
-
- Posts: 77
- Thank you received: 4
You listing and property details page looking awosome.
I need a rental web site like yor design.
When you finished the edit edit details and listing page, do you want to share with me with additional cost ?
Or If you have time you can design for me with additional cost?
I wrote this subject lots of time to Dam, but they havent got any time for thisjob.
If you interested for my offer please share with me you skype.
Thanks
Aydın
Please Log in or Create an account to join the conversation.
- JOYCE
-
- Offline
- New Member
-
- Posts: 15
- Thank you received: 4
regard
Joyce
Aydın wrote: Hi Jamie, I check your web site with os calendar.
You listing and property details page looking awosome.
I need a rental web site like yor design.
When you finished the edit edit details and listing page, do you want to share with me with additional cost ?
Or If you have time you can design for me with additional cost?
I wrote this subject lots of time to Dam, but they havent got any time for thisjob.
If you interested for my offer please share with me you skype.
Thanks
Aydın
Please Log in or Create an account to join the conversation.
- Aydın
- Offline
- Senior Member
-
- Posts: 77
- Thank you received: 4
JOYCE wrote: Hi Aydin, where did you find the link of the Jaime´s web? I would like to take a look too.
regard
Joyce
Aydın wrote: Hi Jamie, I check your web site with os calendar.
You listing and property details page looking awosome.
I need a rental web site like yor design.
When you finished the edit edit details and listing page, do you want to share with me with additional cost ?
Or If you have time you can design for me with additional cost?
I wrote this subject lots of time to Dam, but they havent got any time for thisjob.
If you interested for my offer please share with me you skype.
Thanks
Aydın
Hi Joyce, you can find here :
joomdonation.com/84-os-property/40766-ba...d-on-thumbnails.html
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
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.