|
Agent Information in Details Page 3 Years, 2 Months ago
|
Karma: 0
|
|
I have been trying for days on end to find a way to put agent information into the details page. Even if it is just the logo, that will work. The logo is visible in the property listings page, but no agent information appears on the details page. All other aspects of this component work great, but there needs to be information on the listing about who to contact.
I have tried removing the
<?php
//if($ShowContactLink==1){
$statusC = 'status=no,toolbar= no,scrollbars=yes,titlebar=no,menubar= no,resizable=yes,width=500,height=600,directories=no,location=no';
that makes the whole detail page white
I copied the code from the property list page which shows the logo...
if($ShowLogoAgent==1){
$imgAgent=1;
if($row->logo_image_profile){
?>
<div class="agent">
<img src="images/properties/profiles/<?php echo $row->logo_image_profile;?>" width="140" height="45" alt="<?php echo $row->agent;?>" />
</div>
<?php }?>
and pasted that into the details page, and nothing happens...
Does anyone have any ideas I could try. I will take all suggestions at this point!!!!
Thanks
|
|
|
|
Last Edit: 2010/03/04 11:30 By administrator.
|
|
|
Re:Agent Information in Details Page 3 Years, 2 Months ago
|
Karma: 59
|
\components\com_properties\views\property\view.html.php
replace for attach file 'rename to 'view.html.php'
in your detail page
\components\com_properties\views\templates\details.php
add this code in top into <?php tag
$DataAgent=$this->MyAgent[$Product->agent_id];
echo '<pre>';
print_r($DataAgent);
echo '</pre>';
//Show Agent Name
echo 'Agent Name: '.$DataAgent->name;
echo '<br>';
//Show Agent phone
echo 'Agent Phone: '.$DataAgent->phone;
echo '<br>';
maybe you understand to continue
|
|
|
|
|
|
|
Re:Agent Information in Details Page 3 Years, 2 Months ago
|
Karma: 0
|
|
Ok, I have tried downloading the attached and replacing details.php, I have also tried just replacing the patch of code you placed above. Both of these solutions make the entire details page appear completely white with nothing on it...... That is the same problem I was having when removing the // mentioned above. I will look back over these but it seems somehow adding the agent info is causing the whole page to be blank?
|
|
|
|
|
|
|
Re:Agent Information in Details Page 3 Years, 2 Months ago
|
Karma: 0
|
|
Anyone else had this issue that could offer some advice, or even point me in a direction. I will do the leg work of figuring it out and testing it. I am just lost. Seems like any modifications I do to any agent or contact info create a completely blank details page for all listings... I am not sure if something somewhere else in the coding is causing this... Or if this is an impossible request for this application, which is fine b/c it was free anyway, if someone could let me know I may need to move on to another solution. I was just hoping it would be a fairly easy fix, since adding state and location were. Even if I could just get a name or a logo in that would work fine, just some form of reference to the agent. THANKS for any help anyone can offer!!!!!
|
|
|
|
|
|
|
Re:Agent Information in Details Page 3 Years, 2 Months ago
|
Karma: 5
|
|
Este8an con esto funciona perfecto. Ahora voy a ver la mejor forma para dirigir la details a la agentlisting, creo que no me va a costar mucho.
elliott1 i thing that you are not radding fine. You are renamming the grong file. the attached file is view.html.php, not the list.php in my case is details_tab1.php pay attention to this. this work fine now y you will see a surprise when apli this changes.
|
|
|
|
|
|
|
Re:Agent Information in Details Page 3 Years, 2 Months ago
|
Karma: 0
|
|
I am not sure if I understand what you are saying. I am using
Default_3 as my layout template properties list
Default_1 as my layout template properties detail
I am not sure what I do with the file that was attached previously called view.html.php.
I have tried updating all the details.php files in the templates as well as the list.php file and the details_tab files. I am not getting a blank screen with the changes anymore but am seeing no change. I have also added the code above into all the detail pages just to make sure I was using the right one, but nothing. Can you be more specific with the information give above as to which files I need to be editing?? Should the info from the above view.html.php be pasted into a different named file?? Thanks so much for trying to help me!!!
|
|
|
|
|
|
|
Re:Agent Information in Details Page 3 Years, 2 Months ago
|
Karma: 5
|
|
attached file >> is \components\com_properties\views\property\view.html.php
now in your default_1 property details put this on top of all code:
<?php
$DataAgent=$this->MyAgent[$Product->agent_id];
echo '<pre>';
print_r($DataAgent);
echo '</pre>';
//Show Agent Name
echo 'Agent Name: '.$DataAgent->name;
echo '<br>';
//Show Agent phone
echo 'Agent Phone: '.$DataAgent->phone;
echo '<br>';
?>
see that here the code is into the php tag.
Must to work
i have php 5 joomla 1.5.15 y com_propety 3.0
|
|
|
|
|
|
|
Re:Agent Information in Details Page 3 Years, 2 Months ago
|
Karma: 0
|
|
Alright, so far no luck.
I downloaded the above file - saved it as view.html.php and replaced the current file located at
/components/com_properties/views/property/view.html.php
I also opened the current file
/components/com_properties/views/properties/tmpl/default_1.php
and added the code:
<?php
$DataAgent=$this->MyAgent[$Product->agent_id];
echo '<pre>';
print_r($DataAgent);
echo '</pre>';
//Show Agent Name
echo 'Agent Name: '.$DataAgent->name;
echo '<br>';
//Show Agent phone
echo 'Agent Phone: '.$DataAgent->phone;
echo '<br>';
?>
on top of all the original code.
Nothing changes on my layout.
Thanks for all your help, it is very appreciated!!! I will have some time tomorrow I may try to reinstall the extension to see if I have a file somewhere that is messed up and making the code not work...
THANKS AGAIN!!!
L
|
|
|
|
|
|
|
Re:Agent Information in Details Page 3 Years, 2 Months ago
|
Karma: 5
|
|
Download the new version
|
|
|
|
|
|
|
Re:Agent Information in Details Page 3 Years, 1 Month ago
|
Karma: 0
|
|
Thank you Thank you Thank you!!! Thanks so much for the direction, I was able to figure it out finally. I am still manipulating the code slightly to show the information I want and will post a code update shortly for others interested in this same fix. TuteMdz you just saved me tons of work, every month. I really appreciate it! Great component, a tiny bit more tweaking and it will be exactly like I want. Thanks to the developers for such a great component!!
|
|
|
|
|
|
|
Re:Agent Information in Details Page 2 Years, 12 Months ago
|
Karma: 0
|
|
May I see your website with the new code including the agent's info in the listings?
|
|
|
|
|
|
|
Re:Agent Information in Details Page 2 Years, 12 Months ago
|
Karma: 0
|
Ok, I used the template details2 to display my properties page, but am assuming it would work the same for all...
components/com_properties/views/templates/
Add this code at the top of your chosen template (details.php, details1.php, details2.php, details3.php)
<strong><?php
$DataAgent=$this->MyAgent[$Product->agent_id];
echo '<pre>';
//print_r($DataAgent);
echo '</pre>';
//Show Agent Name
echo 'Agent: '.$DataAgent->name;
echo '<br>';
//Show Agent Company
echo 'Company: '.$DataAgent->company;
echo '<br>';
//Show Agent Email
echo 'Email: '.$DataAgent->email;
echo '<br>';
//Show Agent phone
echo 'Phone: '.$DataAgent->phone;
echo '<br>';
?></strong>
You can remove the strong if you don't want it bold, I just wanted this information to stand out.
Here is an example of what mine looks like now (info is above picture),
High Mountain Real Estate Listing Pageshttp://highmountainrealestate.net/index.php?option=com_properties&view=properties&task=showproperty&sid=1:admin&lid=1:admin&cid=1:admin&tid=1:admin&id=8:admin&Itemid=34
still needs some tweaking but I got in the information I want at least. Hope this helps!
|
|
|
|
|
|
|
Re:Agent Information in Details Page 2 Years, 8 Months ago
|
Karma: 3
|
|
Hi! It worked very good for me! Thanks a lot.
I have a question: When i'm in the ad of any property, in the top of the page appears a blank space all over the page. What could it be? Thanks.-
|
|
|
|
|
|
|
Re:Agent Information in Details Page 2 Years, 6 Months ago
|
Karma: 0
|
|
I need to download the view.html.php file so as to use the instruction on my own development site. However, I have tried many times and it never downloads. What is the problem? Do I need to have special rights to download the file? Please help.
Thanks
|
|
|
|
|
|
|
Re:Agent Information in Details Page 2 Years, 6 Months ago
|
Karma: 2
|
|
Hi,
Thanks to the previous posters for giving the code to add the agent details to the property details page.
How do I now add the agent's logo also to the property details page?
|
|
Chris
Expert Boarder
Posts: 109
|
|
|
|
|
Re:Agent Information in Details Page 2 Years, 6 Months ago
|
Karma: 11
|
|
<?php
if($ShowLogoAgent==1){
$imgAgent=1;
if($row->logo_image_profile){
?>
<div class="agent">
<img src="images/properties/profiles/<?php echo $row->logo_image_profile;?>" width="140" height="45" alt="<?php echo $row->agent;?>" />
</div>
<?php }?>
<?php }?>
|
|
|
|
|
|
|
Re:Agent Information in Details Page 2 Years, 6 Months ago
|
Karma: 2
|
|
Thanks for you help.
I see the code is already in my details.php, but for some reason no logo is displayed.
Any ideas how I could fix it? The agent logo displays OK in the agent listing.
Thanks,
Chris
|
|
Chris
Expert Boarder
Posts: 109
|
|
|
|
|
Re:Agent Information in Details Page 2 Years, 6 Months ago
|
Karma: 0
|
|
Ok, I am not much help this morning. Sorry ahead of time.
I was also unable to get the agent logo to show on the individual listings pages. I can get their name and contact info but couldn't get the logo to display at all on that page.
I also couldn't find the cause of the extra whitespace, It's been a few months but the templates all seemed to have odd spacing. Once I get back to my main machine I will attempt some cleanups to try to make that top section look nicer. I would prefer the title appeared first too since that is what the customer cares about so give me a day or two on that.
Let me know if you discover anything before I do and I will be back in touch. It's nice to know I am not the only one banging my head against the wall with this one!!
L
|
|
|
|
|
|
|
Re:Agent Information in Details Page 2 Years, 6 Months ago
|
Karma: 2
|
|
You are not alone!
I have struggled for ages using trial and error to get things how I want them. I have failed with the agent logo. I hope you can find a way.
I am no great expert but I am concerned that during my trial and error stuff I can delete whole chunks of code and it seems to make no difference to the page.
This makes me wonder how much of the code is not needed.
Is there a way, or an extension, or something, that will tidy up code and tell you what code is needed and what can be safely removed?
Chris
|
|
Chris
Expert Boarder
Posts: 109
|
|
|
|
|
Re:Agent Information in Details Page 2 Years, 6 Months ago
|
Karma: 26
|
For the agent informations you can use this code :
<?php
//Show Agent Logo
if ($DataAgent->logo_image) { ?>
<img src="<?php echo '/images/properties/profiles/'.$DataAgent->logo_image;?>" alt="<?php echo $DataAgent->name;?>" >
<?php echo '<br>';
}
//Show Agent Name
if ($DataAgent->name) {
echo JText::_('Name').' : '.$DataAgent->name;
echo '<br>';
}
//Show Agent phone
if ($DataAgent->phone) {
echo JText::_('Agent Phone').' : '.$DataAgent->phone;
echo '<br>';
}
//Show Agent Company
if ($DataAgent->company) {
echo JText::_('Company').' : '.$DataAgent->company;
echo '<br>';
}
//Show Agent address1
if ($DataAgent->address1) {
echo JText::_('address').' : '.$DataAgent->address1;
echo '<br>';
}
//Show Agent address2
if ($DataAgent->address2) {
echo JText::_('address').' : '.$DataAgent->address2;
echo '<br>';
}
//Show Agent locality
if ($DataAgent->locality) {
echo JText::_('locality').' : '.$DataAgent->locality;
echo '<br>';
}
//Show Agent state
if ($DataAgent->state) {
echo JText::_('state').' : '.$DataAgent->state;
echo '<br>';
}
//Show Agent country
if ($DataAgent->country) {
echo JText::_('country').' : '.$DataAgent->country;
echo '<br>';
}
/* End Agent Informations */
@Chris:
All code are necessary.
I sort the code of 'details.php' with somes corrections and some additions.
I put it inline when I finish.
|
|
|
|
Last Edit: 2010/11/22 18:59 By sigouil.
Sorry for my English. It is a Google translation. 
|
|
|