RSS
Home Forum v3
Welcome, Guest
Please Login or Register.    Lost Password?

Customize the print page.
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Customize the print page.
#2008
Customize the print page. 1 Year, 9 Months ago Karma: 26
Hi guys
I'm trying to insert the details of the agent to the print page.
With this code, I can display the logo.


Code:


<?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 }?> 




But how to display the name, address, telephone ...
sigouil
New job => Less time :(
Platinum Boarder
Posts: 411
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: France Birthday: 12/31
The administrator has disabled public write access.
Sorry for my English. It is a Google translation.
 
#5159
Re:Customize the print page. 1 Year, 5 Months ago Karma: 0
Have you resolved how to showagent info (name, phone number ...) in print page? thanks for the reply.
Tommi
Fresh Boarder
Posts: 19
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#5225
Re:Customize the print page. 1 Year, 5 Months ago Karma: 0
This would be really handy to know.

The script for inserting the logo didn't work for me though. Does the image need to be a specific name?

Thanks
bvirtual
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#5228
Re:Customize the print page. 1 Year, 5 Months ago Karma: 59
for list

components\com_properties\views\properties\view.html.php

uncoment or add this code line 55

$ThisAgent=& $this->getThisAgent();
$this->assignRef('ThisAgent', $ThisAgent);

add this function

function getThisAgent()
{
$user =& JFactory::getUser();
$db =& JFactory::getDBO();
$query = 'SELECT pf.* FROM #__properties_profiles as pf WHERE pf.show = 1';
$db->setQuery($query);
$Agents = $db->loadObjectList();
if($Agents)
{
foreach($Agents as $Agent)
{
$dataAgent[$Agent->mid]=$Agent;
}
}
//print_r($dataAgent);
return $dataAgent;

}





and in default.php in for function
after
$k = 0;
for ($i=0, $n=count( $this->items ); $i < $n; $i++)
{
$row = &$this->items[$i];

add

$DataAgent=$this->ThisAgent[$row->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>';
administrator
Admin
Posts: 544
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#5246
Re:Customize the print page. 1 Year, 5 Months ago Karma: 0
Thanks for the reply administrator.

Didn't get much luck from this coding, is possible I didn't embed it correctly.

I'm trying to customize the print page and have had better luck using file: components\com_properties\views\property\tmpl\default_print.php

Was able to insert the logo as described by sigouil but still attempting to include the agents details.

Also just to say awesome component and pretty good support! Many Thanks!
bvirtual
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#5446
Re:Customize the print page. 1 Year, 4 Months ago Karma: 0
Where can I view information about the agent in default_print.php.
You can write the solution?
Thanks.
Tommi
Fresh Boarder
Posts: 19
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#5594
Re:Customize the print page. 1 Year, 4 Months ago Karma: 0
Hello, do you have any solution for this problem?
Thanks for your reply.
Tommi
Fresh Boarder
Posts: 19
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#6325
Re:Customize the print page. 1 Year, 3 Months ago Karma: 0
Hello,

I need to see data on page default_print.php agent. (Name, phone, email ...).
Have you help me please?
Tommi
Fresh Boarder
Posts: 19
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#6333
Re:Customize the print page. 1 Year, 3 Months ago Karma: 14
insert this where you want the informatione to be shown

Code:

<?php
$db =& JFactory::getDBO();
$query = 'SELECT * FROM #__properties_profiles WHERE mid ='.$row->agent_id;
$db->setQuery($query);
$agent = $db->loadObject();

if($agent->company){echo '<div class="list-company">'.JText::_('Company').' : '.$agent->company.'</div>';} 

if($agent->name){echo '<div class="list-name">'.JText::_('Name').' : '.$agent->name.'</div>';} 

if($agent->phone){echo '<div class="list-phone">'.JText::_('Phone').' : '.$agent->phone.'</div>';} 

if($agent->fax){echo '<div class="list-fax">'.JText::_('Fax').' : '.$agent->fax.'</div>';} 

if($agent->mobile){echo '<div class="list-tel">'.JText::_('Mobile').' : '.$agent->mobile.'</div>';} 
?>



EDIT: forgot to mention where

/components/com_properties/views/property/tmpl/default_print.php
wulfseidel
i simply love this component :D
Gold Boarder
Posts: 258
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: Hamburg GER Birthday: 08/28
Last Edit: 2010/10/20 16:47 By wulfseidel.
The administrator has disabled public write access.
 
#6353
Re:Customize the print page. 1 Year, 3 Months ago Karma: 0
Waw, thank you!!!
Tommi
Fresh Boarder
Posts: 19
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1