Updating the Quick Search to use 'all' instead of exact phrase

We seem to get creamed with folks bouncing after not using the advanced search for the item they’re looking when then dont find it using the quick search.

the KB says here to make some edits, but I dont think this is quite up to date for 2.0.8 - [url]CS-Cart Documentation — CS-Cart 4.15.x documentation

can anyone with a slightly better eye thea mine suss out how to update fn.search.php for the quick search to use ‘all words’ and not ‘exact phrase’?

many thanks

If the search which you wished to enable to “search by all” is at the store front (customer area), the search area on top of the page, then this is how I do it.

I tweak the tpl instead of php files.

And I use hooks combined with “my_changes” to do it.

Alternatively, you can edit the search.tpl file directly.

I will provide both methods here for you to refer.


Recommended method → My_changes + hooks. (but slightly longer method)

In /customer/addons/my_changes folder,

create a new folder named “hooks” (if you have not)

Inside the “hooks” folder, create another folder named “search”

So the folder structure is like this:


Inside the “search” folder, create a new blank tpl file named “additional_fields.post.tpl”

Inside the “additional_fields.post.tpl” file, put this code


Quick dirty fix (directly editing tpl file, might result in conflict during upgrade if this particular tpl file is upgraded)

Go to /customer/common_templates/search.tpl

Look for this code:

{hook name="search:additional_fields"}{/hook}

and put the below code above it:

Thanks nodame

You are a superstar

this works an absolute treat - fixed a huge headache