News:

AbanteCart v1.4.2 is released.

Main Menu

Edit search Block

Started by sliverin, September 14, 2016, 07:47:10 PM

Previous topic - Next topic

sliverin

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.

abolabo

#1
What exactly do you mean?
Search block at the top goes to pages/product/search.php controller.
"No one is useless in this world who lightens the burdens of another."
― Charles Dickens

sliverin

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.

VE3SLO

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.

eCommerce Core

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.
"If you're in the luckiest one per cent of humanity, you owe it to the rest of humanity to think about the other 99 per cent."
― Warren Buffett

jsitges

#5
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.

jsitges

Quote from: 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.


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.

Nuno Neff

#7
Thanks jsitges

Forum Rules Code of conduct
AbanteCart.com 2010 -