- Posts: 12
- Thank you received: 3
OS Property support center
Rearrange how the Address is displayed
- Marley Man
- Topic Author
- Offline
- New Member
-
Less
More
12 years 2 months ago #24661
by Marley Man
Rearrange how the Address is displayed was created by Marley Man
Hi,
I'm using the Layout: Property listing layout on my website.
The Property Address is displaying in this order:
Zip Code, Address, City, State
I need to rearrange it so that it is displaying like this:
Address, City, State, Zip Code
Can anyone tell me which file I could make this change in?
And what code to change?
Thank you!
I'm using the Layout: Property listing layout on my website.
The Property Address is displaying in this order:
Zip Code, Address, City, State
I need to rearrange it so that it is displaying like this:
Address, City, State, Zip Code
Can anyone tell me which file I could make this change in?
And what code to change?
Thank you!
Please Log in or Create an account to join the conversation.
- Mr. Dam
-
- Offline
- Administrator
-
Less
More
- Posts: 13020
- Thank you received: 1688
12 years 2 months ago #24680
by Mr. Dam
Replied by Mr. Dam on topic Re: Rearrange how the Address is displayed
Hi,
You can edit in 2 files
components > com_osproperty > templates > default > listing.html.tpl.php
and
components > com_osproperty > templates > default > grid.html.tpl.php
from line
if($configClass == 1){
Thanks
Dam
You can edit in 2 files
components > com_osproperty > templates > default > listing.html.tpl.php
and
components > com_osproperty > templates > default > grid.html.tpl.php
from line
if($configClass == 1){
Thanks
Dam
Please Log in or Create an account to join the conversation.
- Mr. Dam
-
- Offline
- Administrator
-
Less
More
- Posts: 13020
- Thank you received: 1688
12 years 2 months ago #24681
by Mr. Dam
Replied by Mr. Dam on topic Re: Rearrange how the Address is displayed
Replace
if($configClass == 1){
if($row->show_address == 1){
?>
<p class="address">
<?php
if($row->postcode != ""){
echo $row->postcode;
if($row->address != ""){
echo ", ";
}
}
if($row->address != ""){
echo $row->address;
}
if($row->region != ""){
echo ", ".$row->region;
}
if($row->city != ""){
echo ", ".$row->city;
}
if($row->state_name != ""){
echo ", ".$row->state_name;
}
if(HelperOspropertyCommon::checkCountry()){
echo ", ".$row->country_name;
}
?>
</p>
<?php
}
}
by
if($configClass == 1){
if($row->show_address == 1){
?>
<p class="address">
<?php
if($row->address != ""){
echo $row->address;
}
if($row->city != ""){
echo ", ".$row->city;
}
if($row->state_name != ""){
echo ", ".$row->state_name;
}
if($row->region != ""){
echo ", ".$row->region;
}
if($row->postcode != ""){
", ".echo $row->postcode;
}
if(HelperOspropertyCommon::checkCountry()){
echo ", ".$row->country_name;
}
?>
</p>
<?php
}
}
if($configClass == 1){
if($row->show_address == 1){
?>
<p class="address">
<?php
if($row->postcode != ""){
echo $row->postcode;
if($row->address != ""){
echo ", ";
}
}
if($row->address != ""){
echo $row->address;
}
if($row->region != ""){
echo ", ".$row->region;
}
if($row->city != ""){
echo ", ".$row->city;
}
if($row->state_name != ""){
echo ", ".$row->state_name;
}
if(HelperOspropertyCommon::checkCountry()){
echo ", ".$row->country_name;
}
?>
</p>
<?php
}
}
by
if($configClass == 1){
if($row->show_address == 1){
?>
<p class="address">
<?php
if($row->address != ""){
echo $row->address;
}
if($row->city != ""){
echo ", ".$row->city;
}
if($row->state_name != ""){
echo ", ".$row->state_name;
}
if($row->region != ""){
echo ", ".$row->region;
}
if($row->postcode != ""){
", ".echo $row->postcode;
}
if(HelperOspropertyCommon::checkCountry()){
echo ", ".$row->country_name;
}
?>
</p>
<?php
}
}
Please Log in or Create an account to join the conversation.
- Marley Man
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 12
- Thank you received: 3
12 years 2 months ago #24730
by Marley Man
Replied by Marley Man on topic Re: Rearrange how the Address is displayed
Dam, I followed your instructions exactly and this change in Code breaks the page. It's just white now with nothing showing.
Please Log in or Create an account to join the conversation.
- Mr. Dam
-
- Offline
- Administrator
-
Less
More
- Posts: 13020
- Thank you received: 1688
12 years 2 months ago #24731
by Mr. Dam
Replied by Mr. Dam on topic Re: Rearrange how the Address is displayed
Hi Marley,
Can you send your site information with super admin account, ftp account to damdt@joomservices.com. i will check the problem for you.
Thanks
Dam
Can you send your site information with super admin account, ftp account to damdt@joomservices.com. i will check the problem for you.
Thanks
Dam
Please Log in or Create an account to join the conversation.
- Marley Man
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 12
- Thank you received: 3
12 years 2 months ago #24732
by Marley Man
Replied by Marley Man on topic Re: Rearrange how the Address is displayed
Just did thank you Dam!
Please Log in or Create an account to join the conversation.
- ovi
- Offline
- Senior Member
-
Less
More
- Posts: 41
- Thank you received: 1
12 years 2 months ago #24737
by ovi
Replied by ovi on topic Re: Rearrange how the Address is displayed
Did you make a backup of the file before modifying it and you left it in the same folder?
I had the same issue while modifying files... getting blank page.
Download the backup file on your machine and leave only the modified file on the folder and try again. I hope it works.
I had the same issue while modifying files... getting blank page.
Download the backup file on your machine and leave only the modified file on the folder and try again. I hope it works.
Please Log in or Create an account to join the conversation.
- Barry Sullivan
- Offline
- New Member
-
Less
More
- Posts: 2
- Thank you received: 0
12 years 2 months ago - 12 years 2 months ago #25718
by Barry Sullivan
Replied by Barry Sullivan on topic Re: Rearrange how the Address is displayed
As I have the same issue with the order of address fields being displayed (ie zip code) I'd like to know if the code hack above worked or not before trying it?
thanks
Well, just tried the code hack above to correct the zip code placement issue and I too got only white pages returned. I did remove the originals as suggested above but to no avail.
Is there a fix for the US zip code placement issue? Does every element in OS Prop that uses the full address need to be modified?
thanks
Well, just tried the code hack above to correct the zip code placement issue and I too got only white pages returned. I did remove the originals as suggested above but to no avail.
Is there a fix for the US zip code placement issue? Does every element in OS Prop that uses the full address need to be modified?
Last edit: 12 years 2 months ago by Barry Sullivan. Reason: adding results of testing suggested code change
Please Log in or Create an account to join the conversation.
- Mr. Dam
-
- Offline
- Administrator
-
Less
More
- Posts: 13020
- Thank you received: 1688
12 years 2 months ago #25719
by Mr. Dam
Replied by Mr. Dam on topic Re: Rearrange how the Address is displayed
Hi Barry,
You can use that way, but you need to know, if you backup the files before modify them. Please create the folder backup and copy files to that folder, please DONOT change name like bak.filename.php and put it the same folder with modified file.
Thanks
Dam
You can use that way, but you need to know, if you backup the files before modify them. Please create the folder backup and copy files to that folder, please DONOT change name like bak.filename.php and put it the same folder with modified file.
Thanks
Dam
Please Log in or Create an account to join the conversation.
Moderators: Mr. 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.