+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Dynamic Block for Quick Search

  1. #1

    Dynamic Block for Quick Search

    Hello

    Is there a way to make a dynamic box with the contents of the Quick Search form in it?

    screenshot1.jpg

    Many thanks,
    Troy.

  2. #2
    Hello Troy,

    Yes it's possible but this block may mess up pages with search forms. If you will show this new search block on search pages it will be with empty fields. But if you will show this block on other pages it will be ok.

    create new file for example new_search_block.tpl and insert this code in:

    Code:
    Only registered members can view the code.
    save it and upload in ftp://templates>>your_tepmplate>>tpl>>blocks

    then go to Admin Panel >> Content Boxes and create new block with:
    Key for example 'new_search_block'
    Name - any
    Box side: any
    Box Type : smarty
    Content: {include file='blocks'|cat:$smarty.const.RL_DS|cat:'new_sea rch_block.tpl'}

    Show on Pages: where do you want to see this block for example Home

    and save it.

    Remember block key foe me it's: 'new_search_block'

    Then go to: ftp://includes>>controllers>>common.inc.php

    find code:

    PHP Code:
    Only registered members can view the code
    and after that add new code:

    PHP Code:
    Only registered members can view the code
    here you should write your block key

    save it and check.
    Viktor,
    Flynax technical department,
    Best wishes.

  3. #3
    That's great - thanks Viktor.

  4. #4
    Hi, I have just did this example and show the search form on a category, how can I use a custom search form instead of quick search form??? lets say I want the description and price fields for this search on this category...

    Thank You

  5. #5
    Hello Abelardo Leal,

    Quote Originally Posted by Abelardo Leal View Post
    Hi, I have just did this example and show the search form on a category, how can I use a custom search form instead of quick search form??? lets say I want the description and price fields for this search on this category...
    I checked your site and saw 3.2 version of script but Viktor describe the work for version 4.

    Thanks.

  6. #6
    Quote Originally Posted by Dmitry View Post
    Hello Abelardo Leal,



    I checked your site and saw 3.2 version of script but Viktor describe the work for version 4.

    Thanks.
    Hi Dmitry, I'm working on localhost with version 4, and I was able to execute the Viktor's example, but I want to use a custom search on every category.

    Thanks

  7. #7
    Hello Abelardo,

    Quote Originally Posted by Abelardo Leal View Post
    Hi Dmitry, I'm working on localhost with version 4, and I was able to execute the Viktor's example, but I want to use a custom search on every category.
    Do you want to have one custom search form or few for categories or it will by listing type?
    Waiting your reply.
    Thanks.

  8. #8
    Hello Abelardo,

    I think it will be customization because take many times and needs many changes for it.
    If you want you may create a new ticket with your request and we will do it for you for a some fee.
    Viktor,
    Flynax technical department,
    Best wishes.

  9. #9
    Quote Originally Posted by Dmitry View Post
    Hello Abelardo,



    Do you want to have one custom search form or few for categories or it will by listing type?
    Waiting your reply.
    Thanks.
    Yes, I need one custom search form for a category, lets say when I click on category CAMERAS I will show a Content Box on top with this search form.

    Thank You

  10. #10
    Hello Abelardo,

    Quote Originally Posted by Abelardo Leal View Post
    Yes, I need one custom search form for a category, lets say when I click on category CAMERAS I will show a Content Box on top with this search form.
    1) Create new search form

    admin panel > search forms > add new form.
    add new form with key form example 'search_for_category' and select listing type then save and build new form

    2) create new file for example search_form.tpl and insert this code in:
    Code:
    Only registered members can view the code.
    save it and upload in ftp://templates>>your_tepmplate>>tpl>>blocks

    3) add box in admin panel
    then go to Admin Panel >> Content Boxes and create new block with:
    Key for example 'search_box_for_category'
    Box Type : smarty
    Content: {include file='blocks'|cat:$smarty.const.RL_DS|cat:'search_ form.tpl' search_forms=$search_for_category type="listings"}

    You need to add your listing type like it - type="listings"


    4) Add code in common.inc.php
    Then go to: ftp://includes>>controllers>>common.inc.php
    You need to add code like say Viktor before:

    Code:
    Only registered members can view the code.
    // buildSearch( 'search_for_category', 'listings');
    'search_for_category' - it is 'Key' your custom form.
    'listings' - it is 'Key' of listing type

    It is all.
    Thanks.

+ Reply to Thread