Jump to content

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

How can I make search only show products with all words Rate Topic   - - - - -

 
  • adders
  • Member
  • Members
  • Join Date: 16-Nov 07
  • 78 posts

Posted 20 November 2007 - 12:09 PM #1

Hello All

I think my users are getting annoyed as they seem to be coming up with a large number of results for their searches.

If there anyway to set search in the from end to only show results for matches with all words rather than any words.

Cheers

 
  • adders
  • Member
  • Members
  • Join Date: 16-Nov 07
  • 78 posts

Posted 18 January 2008 - 04:23 PM #2

I'm getting a bit more used to CS-Cart now so can word this slightly better.

I would like the default customer search to be the same as "all of these words" in advanced search.

Does anyone know how to do this?

Cheers

 
  • DELTA9000
  • Senior Member
  • Authorized Reseller
  • Join Date: 17-Apr 07
  • 356 posts

Posted 18 January 2008 - 05:02 PM #3

adders

why not just change the search.tpl file

CURRENT:
<select name="match">
<option value="any">{$lang.any_words}</option>
<option value="all">{$lang.all_words}</option>
<option value="exact">{$lang.exact_phrase}</option>
</select>

and remove the 1st drop down option.
All would then be the default

good luck

 
  • YouRockDaddy
  • Senior Member
  • Members
  • Join Date: 11-Apr 06
  • 319 posts

Posted 18 January 2008 - 05:02 PM #4

Go to /skins/your-skin/customer/search_pages/search.tpl

And look for the code below, the selected within the option tag is what determines the default.


		<select name="match" class="valign">
			<option value="any">{$lang.any_words}</option>
			<option value="all" [COLOR="Red"]selected[/COLOR]>{$lang.all_words}</option>
			<option value="exact">{$lang.exact_phrase}</option>
		</select>


 
  • YouRockDaddy
  • Senior Member
  • Members
  • Join Date: 11-Apr 06
  • 319 posts

Posted 18 January 2008 - 05:04 PM #5

DELTA9000,

Wow we posted the same thing the exact same minute :P

 
  • DELTA9000
  • Senior Member
  • Authorized Reseller
  • Join Date: 17-Apr 07
  • 356 posts

Posted 18 January 2008 - 09:01 PM #6

great minds think alike :-)

your option might be better than removing it like I did, just in case he wants to change in the future

 
  • adders
  • Member
  • Members
  • Join Date: 16-Nov 07
  • 78 posts

Posted 19 January 2008 - 02:22 PM #7

Cool -thanks guys.

If it's a simple change like that it should pose no problem.

Thanks a lot.

Cheers

 
  • adders
  • Member
  • Members
  • Join Date: 16-Nov 07
  • 78 posts

Posted 19 January 2008 - 03:02 PM #8

Sorry just taken a look at it and I think I didn't word my request very well.

What I actually wanted to ask was how to get the search box that is permanently at the top of the screen to search using match type all.

Applying the info you gave me I have got it working now, so thanks again, but thought I'd post to let others know what I did.

I added this line as a hidden field to skins/basic/customer/side_boxes/search.tpl

<input type="hidden" name="match" value="all" />


Pretty simple but I just need pointing it the right direction.

Cheers

 
  • russ1106
  • Member
  • Members
  • Join Date: 09-Oct 07
  • 54 posts

Posted 04 February 2008 - 09:00 PM #9

God this little quark was annoying me, thanks for the fix I added the

<input type="hidden" name="match" value="all" />

and it fixed it. I was having the same problem where it would pull up hundreds of products rather than what they were searching for.

 

Posted 05 February 2008 - 01:14 AM #10

Using "Basic" skin

skins/basic/customer/search_pages/search.tpl

Line 17
        <select name="match" class="valign">
            [COLOR=DarkOrchid]<option value="any">{$lang.any_words}</option>[/COLOR]
            [COLOR=Red]<option value="all">{$lang.all_words}</option>[/COLOR]            
            <option value="exact">{$lang.exact_phrase}</option>
        </select>  

Change to

        <select name="match" class="valign">
            [COLOR=Red]<option value="all">{$lang.all_words}</option>[/COLOR]            
            [COLOR=DarkOrchid]<option value="any">{$lang.any_words}</option>[/COLOR]
            <option value="exact">{$lang.exact_phrase}</option>
        </select>  

This has seemed to GREATLY improved my search listings from both the customer side and "advanced search"

Thanks for bringing this to my attention adders. :)
I've moved on from CS-Cart to WooC******** - If you need anything I can be of little help.

 
  • adders
  • Member
  • Members
  • Join Date: 16-Nov 07
  • 78 posts

Posted 06 February 2008 - 03:17 PM #11

No problem - I think I'll change the search page as you have as well.

At the moment I've just changed skins/basic/customer/side_boxes/search.tpl to search match type "all".

Cheers

 
  • mdekok3000
  • Senior Member
  • Members
  • Join Date: 06-Feb 08
  • 883 posts

Posted 16 March 2008 - 08:54 PM #12

Go to /skins/your-skin/customer/search_pages/search.tpl

And look for the code below, the selected within the option tag is what determines the default.


        <select name="match" class="valign">
            <option value="any">{$lang.any_words}</option>
            <option value="all" [COLOR=red]selected[/COLOR]>{$lang.all_words}</option>
            <option value="exact">{$lang.exact_phrase}</option>
        </select>


Instead of doing just selected I would write it instead as selected="selected". Otherwise it's not XHTML.
[SIZE=2]
[/SIZE]

 
  • widget
  • Junior Member
  • Members
  • Join Date: 22-Nov 07
  • 21 posts

Posted 16 March 2008 - 09:15 PM #13

I added this line as a hidden field to skins/basic/customer/side_boxes/search.tpl

<form action="{$index_script}" name="search_form" method="get">
<input type="hidden" name="{$target_name}" value="products" />
<input type="hidden" name="{$mode_name}" value="search" />
<input type="hidden" name="subcats" value="Y" />
<input type="hidden" name="type" value="extended" />
<input type="hidden" name="avail" value="Y" />
<input type="hidden" name="pshort" value="Y" />
<input type="hidden" name="pfull" value="Y" />
<input type="hidden" name="pname" value="Y" />
<input type="hidden" name="pkeywords" value="Y" />
[COLOR="Red"]<input type="hidden" name="match" value="all" />[/COLOR]

However, this did not change the behavior of the search. The searches continue to act as if 'any of these words' is being used instead of 'all of these words'.

I am using V1.3.5 SP2. Any ideas on why this is not working?
Gary
Cs-Cart v1.3.5 SP2

 
  • bahcaci
  • Junior Member
  • Members
  • Join Date: 01-Apr 08
  • 14 posts

Posted 04 April 2008 - 03:19 PM #14

I have same problem too.


I added this line as a hidden field to skins/basic/customer/side_boxes/search.tpl

<form action="{$index_script}" name="search_form" method="get">
<input type="hidden" name="{$target_name}" value="products" />
<input type="hidden" name="{$mode_name}" value="search" />
<input type="hidden" name="subcats" value="Y" />
<input type="hidden" name="type" value="extended" />
<input type="hidden" name="avail" value="Y" />
<input type="hidden" name="pshort" value="Y" />
<input type="hidden" name="pfull" value="Y" />
<input type="hidden" name="pname" value="Y" />
<input type="hidden" name="pkeywords" value="Y" />
[COLOR="Red"]<input type="hidden" name="match" value="all" />[/COLOR]

However, this did not change the behavior of the search. The searches continue to act as if 'any of these words' is being used instead of 'all of these words'.

I am using V1.3.5 SP2. Any ideas on why this is not working?



 

Posted 10 April 2008 - 06:43 PM #15

Bahcaci,

It works just fine, i am running the same version........

I have same problem too.



 
  • clips
  • Aged Resident Loon
  • Members
  • Join Date: 14-Jan 07
  • 1650 posts

Posted 29 July 2008 - 04:02 AM #16

I was wondering why so many of our customers were complaining about not being able to find things in the "search." It is because if they put "playing card holder" in our search they are going to pull up just about every item on our site! I'm not really for sure I understand the logic in why they set it up like this.

I will make the change and report back.
Regards,
Jim

 

Posted 29 July 2008 - 06:17 PM #17

Yea my site does the same thing also

 
  • clips
  • Aged Resident Loon
  • Members
  • Join Date: 14-Jan 07
  • 1650 posts

Posted 30 July 2008 - 01:02 AM #18

I have now changed both the general search and the advanced search on the newtsgames.com. GREAT JOB! I think this will help folks find things a lot faster. I know it helps us!

Now when a customer searches something like...
"card shuffler"
...it only pulls up the card shufflers instead of every thing in our database! This may be one of the big reasons we saw a huge decline in orders from our old shopping cart and the new one using CS.

This is something that CS needs to have set from the get-go or "out of the box". We have a lot of searches being done on our site and this is probably why our oders were lower....and have already seen a BIG increase in just a day! I know I usually search when I shop at sites, so I'm sure others do the same. If the search either brings up nothing or too much "generic" I usually just leave the site. The setting that CS has this set at is too generic and usually the way anyone would want to search at first or most of the time.

So again, thanks for this HUGE improvement!
Regards,
Jim

 

Posted 30 July 2008 - 03:02 AM #19

Not working for me. and i am using the newest version of cscart

 
  • pbradish
  • Senior Member
  • Members
  • Join Date: 03-Apr 08
  • 119 posts

Posted 22 August 2008 - 06:10 PM #20

Thanks for this!

Before, a random three word search phrase brought up over 50 products by default. Now, it brings up only the one exact match that it should.