View Full Version : Seller Info
Omar Barkawi
January 30, 2013, 01:21 PM
Hello,
Can I show the seller info along with listing details (on the same page)?
Thanks,
Viktor
January 30, 2013, 02:13 PM
Hello Omar,
Yes you can show it
go to ftp://templates>>your_template>>tpl>>controllers>>listing_deteils.tpl
find code:
<!-- seller info -->
<div id="area_seller" class="tab_area hide">
<table class="seller_info">
<tr>
<td valign="top" class="side_bar">
<div>
{if $seller_info.Own_page}
<a title="{$lang.visit_owner_page}" href="{$seller_info.Personal_address}">
{/if}
<img {if !empty($seller_info.Photo)}class="photo"{/if} title="" alt="{$lang.seller_thumbnail}" src="{if !empty($seller_info.Photo)}{$smarty.const.RL_URL_H OME}files/{$seller_info.Photo}{else}{$rlTplBase}img/no-account.png{/if}" />
{if $seller_info.Own_page}
</a>
{/if}
</div>
<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>
</td>
<td valign="top" class="details">
<div class="highlight">
<div class="username">{$seller_info.Full_name}</div>
<table class="table" style="margin: 0 0 15px;">
<tr id="si_field_join_date">
<td class="name">{$lang.join_date}:</td>
<td class="value first">{$seller_info.Date|date_format:$smarty.const.RL_DA TE_FORMAT}</td>
</tr>
{if $seller_info.Own_page && $seller_info.Personal_address}
<tr id="si_field_personal_address">
<td class="name">{$lang.personal_address}:</td>
<td class="value"><a title="{$lang.visit_owner_page}" href="{$seller_info.Personal_address}">{$seller_info.Personal_address}</a></td>
</tr>
{/if}
{if $seller_info.Display_email}
<tr id="si_field_mail">
<td class="name">{$lang.mail}:</td>
<td class="value">{encodeEmail email=$seller_info.Mail}</td>
</tr>
{/if}
</table>
{if $seller_info.Fields}
<table class="table">
{foreach from=$seller_info.Fields item='item' name='sellerF'}
{if !empty($item.value)}
<tr id="si_field_{$item.Key}">
<td class="name">{$item.name}:</td>
<td class="value {if $smarty.foreach.sellerF.first}first{/if}">{$item.value}</td>
</tr>
{/if}
{/foreach}
</table>
{/if}
</div>
</td>
</tr>
</table>
<!-- 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>
</div>
<!-- seller info end -->
cut this code and insert into div:
<div id="area_listing" class="tab_area">
code code code
<!-- and insert your code here -->
<div>
save and close and then check ;)
Omar Barkawi
January 30, 2013, 02:50 PM
Hi Viktor,
Thanks for the quick reply. I was trying to change the template before applying this code change but I had an issue where the Simple Blue template is not listed under my templates in Admin panel.
I tried to go to www.flynax.com >> Customer Area >> Download >> Templates.
But could not find a link to Downloads. Can you please advise on this one also?
Thansk,
Viktor
January 31, 2013, 03:15 AM
Hello Omar,
Please see attached screenshot. I have checked in FireFox.
Maaz Surchy
February 4, 2013, 02:36 PM
Is that possible for Auto Modern template too Viktor?
Cuz I tried to add the Seller Info text you provided and it does@t works for me, I got two "ff" on listing page under stats.
Andreas_M
March 24, 2013, 12:22 PM
Hello Viktor,
where should we exactly put the code into?
Tried so many ways, buts its not working.
Thanks & best regards
Andreas
Viktor
March 25, 2013, 03:35 AM
Hello Maaz and Andreas,
For each template need little bit different code. You should take it from your template:
<!-- seller info -->
code code code ...
<!-- seller info end -->
and remove class 'hide' in div:
'<div id="area_seller" class="tab_area hide">' for show all data about seller info.
Andreas_M
April 1, 2013, 06:00 PM
Hello Viktor,
now its working. The class hide was the key.
Thanks and best regards
Andreas
Marina Charalampous
December 11, 2013, 04:41 PM
Hello I want to erase the seller info from the details of the listing. I used the above method to cut the code and works but the problem i that the tab title "seller info'' still exist but it's empty! how I can hide or delete it?
Viktor
December 12, 2013, 03:39 AM
Hello Marina,
Please find code in listing_details.tpl file in top of the file:
{foreach from=$tabs item='tab' name='tabF'}
<li {if $smarty.foreach.tabF.first}class="active first"{/if} id="tab_{$tab.key}">
<span class="left"> </span>
<span class="center"><span>{$tab.name}</span></span>
<span class="right"> </span>
</li>
{/foreach}
and replace to:
{foreach from=$tabs item='tab' name='tabF'}
{if $tab.key != 'seller'}
<li {if $smarty.foreach.tabF.first}class="active first"{/if} id="tab_{$tab.key}">
<span class="left"> </span>
<span class="center"><span>{$tab.name}</span></span>
<span class="right"> </span>
</li>
{/if}
{/foreach}
save and check again.
Marina Charalampous
December 12, 2013, 10:30 AM
Thank you! Works!
Abraham Adeyemi
May 5, 2015, 11:50 PM
Can I transfer that information to listing.tpl instead of listing_details.tpl? How do I go about it please? Does anyone know??
Viktor
May 6, 2015, 10:04 AM
Hello Abraham,
If you want to insert some info from seller into listings on categories you should change mysql query in files: ftp://includes>>classes>>rlListings.class.php and rlSearch.class.php and then using in smarty.
Abraham Adeyemi
May 6, 2015, 02:50 PM
I understand that but I don't know how to do that, I don't know what to write in the sql parameters I keep getting mysql errors when I try edit it...please help :(
Powered by vBulletin® Version 4.1.9 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.