+ Reply to Thread
Page 1 of 3 123 LastLast
Results 1 to 10 of 28

Thread: Sellers phone number

  1. #1

    Sellers phone number

    I have tried adding the sellers number to the listings details sidebar tpl file using the code.

    Code:
    Only registered members can view the code.
    But it keeps returning the number like this a:031|n:131313 where it should be (031) 1313133.

    I also want to hide like putting xxxxxxx over last 7 digits until someone clicks on the number then it will be shown. Like the immage attache.
    attachment.jpg

    Thanks
    Aiden

  2. #2
    It's ok I got it.

  3. #3
    Guru
    Join Date
    Jan 2013
    Location
    Australia
    Posts
    1,949
    ? so how did you get it to hide the numbers ?

  4. #4
    I used the following.

    <!-- show hide phone number -->

    <div id="flip" style=" cursor:pointer; background-image: url(http://www.cheapdeals.ie/images/phone-icon.png); background-repeat: no-repeat; margin-top: 15px; height: 48px; background-color: white; font-size: 16px; font-weight: bold; color: #666;">


    <div style="padding-top:12px; background-image:url(http://www.cheapdeals.ie/images/arrow-down.png); background-position:right; background-repeat:no-repeat; text-align:center;">Show Phone Number</div>
    </div>
    <div id="panel" style="height: 50px; background-color: white; font-size: 24px; font-weight: bold; color: #666;"><div style="margin-top:10px;"><a href="tel:{$listing_data.mobile|replace:'a:':''|re place:'n:':''|replace:'|':''}">Ph: {$listing_data.mobile|replace:'a:':'('|replace:'n: ':') '|replace:'|':''}</a></div></div>

    <!-- show hide phone numbere end -->

    I also used the following js.

    $(document).ready(function(){
    $("#flip").click(function(){
    $("#panel").slideToggle("slow");
    });
    });
    The code uses jquery but Flynax already includes jquery so there was no need to add it.

  5. #5
    I also used this css

    #flip {
    text-align:center;
    background-color: white;
    border-left:solid 2px #c3c3c3;
    border-right:solid 2px #c3c3c3;
    border-top:solid 2px #c3c3c3;
    border-bottom:solid 2px #c3c3c3;
    b
    }

    #panel {
    display: none;
    text-align: center;
    }

  6. #6
    Quote Originally Posted by Niall Boylan View Post
    I also used this css

    #flip {
    text-align:center;
    background-color: white;
    border-left:solid 2px #c3c3c3;
    border-right:solid 2px #c3c3c3;
    border-top:solid 2px #c3c3c3;
    border-bottom:solid 2px #c3c3c3;
    b
    }

    #panel {
    display: none;
    text-align: center;
    }
    Hi Niall,

    Would you mind guide me how to make the horizontal search show on all pages? I saw you achieve that on your site and really want to know how.

    Thanks

  7. #7
    In your home_content.tpl file

    Remove the following:


    <section class="horizontal-search{if $aHooks.search_by_distance} sbd-exists{/if}">
    <div class="point1">
    {assign var='spage_key' value=$listing_types.listings.Page_key}

    <form method="post" action="{$rlBase}{if $config.mod_rewrite}{$pages.$spage_key}/{$search_results_url}.html{else}?page={$pages.$spa ge_key}&{$search_results_url}{/if}">
    <input type="hidden" name="action" value="search" />
    <input type="hidden" name="post_form_key" value="listings_advanced" />

    <div id="search_area">{strip}
    <div class="search-group">
    {assign var='any_replace' value=`$smarty.ldelim`field`$smarty.rdelim`}
    <input class="tags-autocomplete" type="text" placeholder="{$lang.keyword_search_hint}" name="f[keyword_search]" />
    <select name="f[Category_ID]">
    <option value=""></option>
    </select>

    <script>
    {literal}

    $('select[name="f[Category_ID]"]').categoryDropdown({
    listingTypeKey: 'listings',//TODOOOOOOOOOOOOOOO
    //default_selection: category_selected,
    phrases: { {/literal}
    no_categories_available: "{$lang.no_categories_available}",
    select: "{$lang.any_field_value|replace:$any_replace:$lang .category}",
    select_category: "{$lang.any_field_value|replace:$any_replace:$lang .category}"
    {literal} }
    });

    {/literal}
    </script>
    </div>

    {if $aHooks.search_by_distance}
    <script src="//maps.googleapis.com/maps/api/js?libraries=places{if $smarty.const.RL_LANG_CODE != '' && $smarty.const.RL_LANG_CODE != 'en'}&language={$smarty.const.RL_LANG_CODE}{/if}"></script>
    <div class="location-group">
    <input type="text" placeholder="{if $config.sbd_search_mode == 'mixed'}{$lang.sbd_location_search_hint}{else}{$la ng.sbd_zipcode}{/if}" name="f[{$config.sbd_zip_field}][zip]" id="location_search" />
    <select name="f[{$config.sbd_zip_field}][distance]">
    {foreach from=','|explode:$config.sbd_distance_items item='distance'}
    <option {if $smarty.post.block_distance == $distance}selected="selected"{elseif $distance == $config.sbd_default_distance}selected="selected"{/if} value="{$distance}">{$distance} {if $config.sbd_default_units == 'miles'}{$lang.sbd_mi}{else}{$lang.sbd_km}{/if}</option>
    {/foreach}
    </select>

    <input type="hidden" name="f[{$config.sbd_zip_field}][lat]" />
    <input type="hidden" name="f[{$config.sbd_zip_field}][lng]" />
    </div>
    {/if}

    <div class="submit-group">
    <input type="submit" value="{$lang.search}" />
    </div>
    {/strip}</div>
    </form>
    </div>
    </section>



    then paste the code you removed into your content.tpl below the wrapper div.

  8. #8
    Hi Niall,

    Thank you so much for sharing your work. Much appreciate it.

    Regards,
    Wei

  9. #9
    Thank you Niall for sharing

  10. #10
    Many thanks Niall for sharing

    1. i have followed your how to show and hide phone number and after some changes it works fine Thanks
    2. but moving main search bar to all pages is not moving the code from home block to content block it didn't worked like that, you need to make another changes too cause it is related to Categories ! could you please tell more steps?

    Regards
    Ameer

+ Reply to Thread