OS Property support center

Modifying the property details template

  • Jaime
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
11 years 4 months ago #40139 by Jaime
Hello...

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.

More
11 years 4 months ago #40143 by Mr. Dam
Replied by Mr. Dam on topic Re: Modifying the property details template
Hi,
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
  • Junior Member
More
11 years 4 months ago - 11 years 4 months ago #40145 by Jaime
Thanks...

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
Last edit: 11 years 4 months ago by Jaime.

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

  • Jaime
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
11 years 4 months ago #40149 by Jaime
I have found that you did not add the following instruction before JFile usage:

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
  • Junior Member
More
11 years 4 months ago - 11 years 4 months ago #40154 by Jaime
Problems and more problems.

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:
Code:
<div id="currency_div" style="padding:0px;"> .... </div>

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
Last edit: 11 years 4 months ago by Jaime.

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

More
11 years 4 months ago #40169 by Mr. Dam
Replied by Mr. Dam on topic Re: Modifying the property details template
Hi Jaime,
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
  • Junior Member
More
11 years 4 months ago #40177 by Jaime
Thanks for your reply Dam... in fact, I found where to change the code in order to solve this, however, I prefered to use strip_tags function call, because it will not degrade performance and I don't like to modify core files because it may be affected by future software upgrades. In fact, even to change some translation texts, I created my own ini files in my template folder, which overwrite some predefined translations, keeping the original ini files intact.

Best regards,
Jaime

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

More
11 years 3 months ago #40821 by Aydın
Replied by Aydın on topic Re: Modifying the property details template
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.

More
11 years 3 months ago #40870 by JOYCE
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

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

More
11 years 3 months ago #40914 by Aydın
Replied by Aydın on topic Re: Modifying the property details template

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
The following user(s) said Thank You: JOYCE

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

Moderators: Mr. DamNguyen Phu Quan