AbanteCart Community

AbanteCart Development => Customization help => Topic started by: sliverin on September 14, 2016, 07:47:10 PM

Title: Edit search Block
Post by: sliverin on September 14, 2016, 07:47:10 PM
I would like to essentially make the Search criteria page, the one that lists search + categories + search model a permanent HTML block that will replace the little search block. Can this be done as I cannot find were the search criteria form is located.
Title: Re: Edit search Block
Post by: abolabo on September 16, 2016, 03:35:35 AM
What exactly do you mean?
Search block at the top goes to pages/product/search.php controller.
Title: Re: Edit search Block
Post by: sliverin on September 21, 2016, 11:50:08 PM
Sorry, after looking at what I wrote, even I am confused by what I wanted :D. Essentially I want the search block in the corner to also search models as well as names.
Title: Re: Edit search Block
Post by: VE3SLO on December 12, 2016, 12:19:32 AM
Was there ever an answer to this?  I have the exact same request.

I am trying to change the default search behaviour to search whatever it's current default is and to include  "Search in product descriptions" and "Search in product model" from the "search key words" box.

Reason for this is the search system finds almost nothing on my site unless one knows exactly what to search for.
Title: Re: Edit search Block
Post by: eCommerce Core on December 12, 2016, 08:06:09 AM
Just FYI, model is already part of the standard search.
To give you an idea where to start, you need to look into these files:

Template file for search block
public_html/storefront/view/default/template/blocks/search_top.tpl

Search result controller:
public_html/storefront/controller/pages/product/search.php

Model:
public_html/storefront/model/catalog/product.php

The rest is pure PHP. Please share what you achieve or post questions.
Title: Re: Edit search Block
Post by: jsitges on August 19, 2017, 06:21:42 PM
I have the same question,

I have already ticked search product descriptions by default, in search block.

But I need the search top to search through product descriptions as a default.  any help is gratly appreciated.  I supose i will fiddle around some more to see if I can achieve this, but i am no programmer.

thanks again.
Title: Re: Edit search Block
Post by: jsitges on August 20, 2017, 01:43:40 PM
Sorry, after looking at what I wrote, even I am confused by what I wanted :D. Essentially I want the search block in the corner to also search models as well as names.


FOUND SOLUTION YAY

in the product.php file in the public_html/storefront/model/catalog/ directory edit 504 where it says
if (!$model){
and take away the '!'

that's it.

I did it for the descriptions and it worked.
Title: Re: Edit search Block
Post by: Nuno Neff on May 23, 2020, 07:46:55 PM
Thanks jsitges