Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

How To Add Advanced Search Link To Homepage Near By Search Box Rate Topic   - - - - -

 
  • truvakitap
  • Member
  • Members
  • Join Date: 07-Apr 15
  • 29 posts

Posted 14 April 2015 - 04:14 PM #1

Hi expers,
I am using version 4.2.4 and responsive greeny template. I want to add advanced search link nearby to search inputbox on the right side of it.
How can I put it?

Thank you.

 
  • Magpie Don
  • Senior Member
  • Members
  • Join Date: 01-Apr 09
  • 835 posts

Posted 14 April 2015 - 04:57 PM #2

I just created an HTML Block and added it to the header. The block's content is:
<div class="float-right">
<a href="/index.php?dispatch=products.search&advanced_filter=Y" rel="nofollow">Advanced Search</a>
</div>

Apply your own CSS as needed.

CS-Cart Ultimate ver 4.11.3


 

Posted 14 April 2015 - 05:04 PM #3

in "design/themes/THEME/templates/common/search.tpl" after the code:

        {capture name="search_input_id"}{$block.snapping_id}{/capture}

    </form>

add this:
<a href="{"products.search?advanced_filter=Y"|fn_url}" rel="nofollow">{__("advanced_search")}</a>

after that clean up the template cache.

 
  • truvakitap
  • Member
  • Members
  • Join Date: 07-Apr 15
  • 29 posts

Posted 14 April 2015 - 09:48 PM #4

Thanks for sharing this method. I did work well.

I just created an HTML Block and added it to the header. The block's content is:

<div class="float-right">
<a href="/index.php?dispatch=products.search&advanced_filter=Y" rel="nofollow">Advanced Search</a>
</div>

Apply your own CSS as needed.



 
  • truvakitap
  • Member
  • Members
  • Join Date: 07-Apr 15
  • 29 posts

Posted 14 April 2015 - 09:49 PM #5

Thanks for the answer.

in "design/themes/THEME/templates/common/search.tpl" after the code:


		{capture name="search_input_id"}{$block.snapping_id}{/capture}

	</form>

add this:
<a href="{"products.search?advanced_filter=Y"|fn_url}" rel="nofollow">{__("advanced_search")}</a>

after that clean up the template cache.



 
  • Beads
  • Junior Member
  • Members
  • Join Date: 12-Nov 07
  • 92 posts

Posted 12 June 2015 - 12:30 AM #6

Hello I would like a latest version for HTML Block

thanking you

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 20913 posts

Posted 12 June 2015 - 09:18 AM #7

Please use the solution from post #3 + open the design/themes/YOUR_THEME/templates/views/products/search.tpl file and add

{if $search || $smarty.request.advanced_filter}
	    {assign var="_title" value=__("search_results")}
	    {assign var="_collapse" value=true}
{else}
	    {assign var="_title" value=__("advanced_search")}
	    {assign var="_collapse" value=false}
{/if}
{include file="views/products/components/products_search_form.tpl" dispatch="products.search" collapse=$_collapse}

after this line:

<div id="products_search_{$block.block_id}">

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • truvakitap
  • Member
  • Members
  • Join Date: 07-Apr 15
  • 29 posts

Posted 26 June 2015 - 05:28 AM #8

Hi ecomLabs, when I apply this after post3 only price and product code etc are shown but my own features like author is not shown.
Also advanced search is collapsed how could I make it expanded? (I have deleted all the cache /var/cache/*)
Thank you.

Please use the solution from post #3 + open the design/themes/YOUR_THEME/templates/views/products/search.tpl file and add

{if $search || $smarty.request.advanced_filter}
		{assign var="_title" value=__("search_results")}
		{assign var="_collapse" value=true}
{else}
		{assign var="_title" value=__("advanced_search")}
		{assign var="_collapse" value=false}
{/if}
{include file="views/products/components/products_search_form.tpl" dispatch="products.search" collapse=$_collapse}

after this line:

<div id="products_search_{$block.block_id}">



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 20913 posts

Posted 26 June 2015 - 09:30 AM #9

Please replace:

{assign var="_collapse" value=true}

with

{assign var="_collapse" value=false}

to expand the search form. As for second question, please check answer in another thread
GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)