PDA

View Full Version : Remove seller info tab



Hans
November 24, 2012, 01:03 PM
Hi,

is it possible to remove the seller info tab when looking at a listing?
or actually inactivate is maybe better

Thanks

Vladimir
November 26, 2012, 04:19 AM
Hello,

You can fix it the following way:

- open file: includes/controllers/listing_details.inc.php

- find this code:



$tabs = array(
'listing' => array(
'key' => 'listing',
'name' => $lang['listing']
),
'seller' => array(
'key' => 'seller',
'name' => $lang['seller_info']
),
'video' => array(
'key' => 'video',
'name' => $lang['video']
),
'map' => array(
'key' => 'map',
'name' => $lang['map']
),
'tell_friend' => array(
'key' => 'tell_friend',
'name' => $lang['tell_friend']
),
'nearby' => array(
'key' => 'nearby',
'name' => $lang['nearby']
)
);

and change it to:



$tabs = array(
'listing' => array(
'key' => 'listing',
'name' => $lang['listing']
)
'video' => array(
'key' => 'video',
'name' => $lang['video']
),
'map' => array(
'key' => 'map',
'name' => $lang['map']
),
'tell_friend' => array(
'key' => 'tell_friend',
'name' => $lang['tell_friend']
),
'nearby' => array(
'key' => 'nearby',
'name' => $lang['nearby']
)
);

Chris Brown
November 27, 2012, 05:16 PM
Hi Vladimir

Is there a way to hide it for a certain account type. For example i have 3 types of dealer accounts and 1 account type for general public. I would want it visable for the dealer accounts but not the public account.

Thanks

Vladimir
November 28, 2012, 04:06 AM
Hello Chris,

I suggest that you solve it in the following way:

- open file: includes/controllers/listing_details.php
- find the code:



$sql = "SELECT `T1`.*, `T2`.`Path`, `T2`.`Type` AS `Listing_type`, `T2`.`Key` AS `Cat_key`, `T2`.`Type` AS `Cat_type`, ";


and change it to:



$sql = "SELECT `T1`.*, `T2`.`Path`, `T2`.`Type` AS `Listing_type`, `T2`.`Key` AS `Cat_key`, `T2`.`Type` AS `Cat_type`, `T5`.`Type` AS `Account_type`, ";


- add this code after array of tabs (in this case the seller tab will be available only for the dealer account type):



if($listing_data['Account_type'] != 'dealer')
{
unset($tabs['seller']);
}

Tonci Ercegovic
December 24, 2012, 09:41 AM
Hi

I use my site as real estate agency and all listings are mine. I would like also to remove the seller info tab. But there is a feature that I want to keep: CONTACT THE OWNER. It is very usefull and I don`t want to lose it. That way users don`t need to send me email or message in contact form. They can do that directly from the listing they are interested in, including the listing details.
Can this be done? Maybe that button can be removed from seller info tab and added somewhere else in the listing. Look my image in attachment (photoshop). I have removed the seller info tab and add the button on listing details page.
That would be the best! Is it possible that way?
I would order this in ticket as I am not good in coding.268

Viktor
December 24, 2012, 10:46 AM
Hello Tonci Ercegovic,

Of course it's possible and will take 20 min maximum for us. Create a ticket and we will do it ASAP free for you I promise. ;)

Tonci Ercegovic
December 26, 2012, 04:24 PM
Thank you Viktor, I have sent the ticket.

Hans
January 8, 2013, 05:18 AM
Thank you for the code for removing the info seller tab.

I also want to keep the contact button. Same as Tonci
Should I also make a ticket? Or can you give me the code in this topic? Maybe more people are interested in this option.

Viktor
January 8, 2013, 06:00 AM
Hello Hans,

I can write code and you may insert it in your listing_details.tpl



<ul class="info">
{if $config.messages_module && ($isLogin || (!$isLogin && $config.messages_allow_free))}<li><input id="contact_owner" type="button" value="{$lang.contact_owner}" /></li>{/if}
{if $seller_info.Own_page}
<li><a title="{$lang.visit_owner_page}" href="{$seller_info.Personal_address}">{$lang.visit_owner_page}</a></li>
{if $seller_info.Listings_count > 1}<li><a title="{$lang.other_owner_listings}" href="{$seller_info.Personal_address}#listings">{$lang.other_owner_listings}</a> <span class="counter">({$seller_info.Listings_count})</span></li>{/if}
{/if}
</ul>
<!-- contact owner form template -->
<div class="hide" id="contact_owner_form">
<div class="caption">{$lang.contact_owner}</div>

<form name="contact_owner" onsubmit="flynax.contactOwnerSubmit($(this).find('input[type=submit]'), {$listing_data.ID});return false;" method="post" action="">
<table class="submit_modal">
{if $isLogin}
<tr>
<td colspan="2">
<div>{$lang.message} <span class="red">*</span></div>
<textarea id="contact_owner_message" rows="6" cols="" style="width: 97%;"></textarea>
</td>
</tr>
{else}
<tr>
<td class="name">{$lang.name} <span class="red">*</span></td>
<td class="field"><input type="text" id="contact_name" value="{$account_info.First_name} {$account_info.Last_name}" /></td>
</tr>
<tr>
<td class="name">{$lang.mail} <span class="red">*</span></td>
<td class="field"><input type="text" id="contact_email" value="{$account_info.Mail}" /></td>
</tr>
<tr>
<td class="name">{$lang.contact_phone}</td>
<td class="field"><input type="text" id="contact_phone" /></td>
</tr>
<tr>
<td class="name" colspan="2">
<div>{$lang.message} <span class="red">*</span></div>
<textarea id="contact_owner_message" rows="6" cols="" style="width: 97%;"></textarea>
</td>
</tr>
<tr>
<td colspan="2">{include file='captcha.tpl' captcha_id='contact_code' no_wordwrap=true}</td>
</tr>
{/if}
<tr>
<td colspan="2" {if !$isLogin}class="button"{/if}>
<input type="submit" name="finish" value="{$lang.send}" />
<input type="button" name="close" value="{$lang.cancel}" />
</td>
</tr>
</table>
</form>
</div>
<!-- contact owner form template end -->

<script type="text/javascript">
{literal}

$(document).ready(function(){
$('#contact_owner').flModal({
source: '#contact_owner_form',
width: 500,
height: 'auto',
ready: function(){
$('#contact_owner_message').textareaCount({
'maxCharacterSize': rlConfig['messages_length'],
'warningNumber': 20
})
}
});
});

{/literal}
</script>


insert this code in place where do you want to see contact button.

Fabio Zalpa
November 20, 2013, 09:57 PM
Thanks. It's worked for me. ;)

Petrache Nicolae
December 14, 2013, 06:26 PM
Hello Chris,

I suggest that you solve it in the following way:

- open file: includes/controllers/listing_details.php
- find the code:



$sql = "SELECT `T1`.*, `T2`.`Path`, `T2`.`Type` AS `Listing_type`, `T2`.`Key` AS `Cat_key`, `T2`.`Type` AS `Cat_type`, ";


and change it to:



$sql = "SELECT `T1`.*, `T2`.`Path`, `T2`.`Type` AS `Listing_type`, `T2`.`Key` AS `Cat_key`, `T2`.`Type` AS `Cat_type`, `T5`.`Type` AS `Account_type`, ";


- add this code after array of tabs (in this case the seller tab will be available only for the dealer account type):



if($listing_data['Account_type'] != 'dealer')
{
unset($tabs['seller']);
}


hello. How can i show in pesonal page of a seller, just the listings that he has. so hide the tabs ACCOUNT DETAILS + ACCOUNT LISTINGS + MAP?

Show just the listings, directly into the page. thanks

Robert Kranack
June 16, 2015, 12:38 AM
Has this changed in 4.4? I do not see 'seller'

$tabs = array(
'listing' => array(
'key' => 'listing',
'name' => $lang['listing']
),
'tell_friend' => array(
'key' => 'tell_friend',
'name' => $lang['tell_friend']
)
);

Viktor
June 16, 2015, 03:32 AM
Hello Robert Kranack,

Yes in version 4.4 Doesn't exist seller tab :) because seller information shows in additional right side box that's why we removed this tab and element from array.

Robert Kranack
June 16, 2015, 05:12 AM
Is there a way to remove the seller box?

Thanks

Viktor
June 16, 2015, 06:14 AM
Hello Robert,

Only through ftp in a listing_details.tpl file.

Robert Kranack
June 16, 2015, 08:28 PM
What should I remove from the listing_details.tpl file?

Viktor
June 17, 2015, 03:18 AM
Hello Robert,

What template do you use?

Curtis
June 17, 2015, 03:19 AM
What should I remove from the listing_details.tpl file?

Open this file and find the following code:



<!-- seller info --><section class="side_block stick seller-short">...
</section><!-- seller info end -->

Viktor
June 17, 2015, 03:45 AM
But for realty_map template seller information located in another file: blocks>>listing_details_sidebar.tpl

Robert Kranack
June 17, 2015, 05:09 AM
I found it in the listing_details_sidebar.tpl.

Thank you