Jump to content

CC4 Search engine problem


Guest thanh1081

Recommended Posts

Guest thanh1081

My CC4 search isn't working as it supposed to be. Let's say I have to products: Apple cider and Apple Juice. When I try to search for 'apple juice' then 'apple cider' also show up in the search result. So, let's say i have 50 items that have the word 'apple' in it then it will show all 50 items in the research result eventhough I was searching 'apple' + "something else". It seems that it's using "OR" instead of "AND" to search.

Can someone help me with how to modify this so that the rearch result can be limited? Thanks!

Link to comment
Share on other sites

My CC4 search isn't working as it supposed to be. Let's say I have to products: Apple cider and Apple Juice. When I try to search for 'apple juice' then 'apple cider' also show up in the search result. So, let's say i have 50 items that have the word 'apple' in it then it will show all 50 items in the research result eventhough I was searching 'apple' + "something else". It seems that it's using "OR" instead of "AND" to search.

I'm trying to fix this as well. Had it sorted it CC3.

The code in CC4 is proving a lot harder for me to figure out. If I crack it soon I'll let you know.

I'm struggling with so many things.

Cheers.

Chris

Link to comment
Share on other sites

Just fixed it!

Open "includes/viewCat.in.php"

Go to about line 107 and comment out the following line:

$orderSort = sprintf(' ORDER BY name ASC');

It has been fixed in CC 4.2.2 but I can't run that on my server.

A list of other changes are here: http://forums.cubecart.com/index.php?act=a...ost&id=1276

Cheers,

Chris

Link to comment
Share on other sites

Guest thanh1081

I"m currently running v4.2.2 and it's giving the same problem as of v4.1

Just fixed it!

Open "includes/viewCat.in.php"

Go to about line 107 and comment out the following line:

$orderSort = sprintf(' ORDER BY name ASC');

It has been fixed in CC 4.2.2 but I can't run that on my server.

A list of other changes are here: http://forums.cubecart.com/index.php?act=a...ost&id=1276

Cheers,

Chris

Link to comment
Share on other sites

Guest Rselbo

I"m currently running v4.2.2 and it's giving the same problem as of v4.1

Same here - I'll submit a helpdesk ticket on this one as would like to see it sorted :)

Link to comment
Share on other sites

I'm with you on this.

The search is pretty useless.

On my website:

A search for "propane regulator" does not result in a propane regulator being top of the list!

A search for "inner tent" results in several other products - many not containing the word "inner" - above an actual inner tent!

I have desperately tried to edit the way the search works but am having no luck at all.

Link to comment
Share on other sites

Guest JodieR

There's also the extra space at the end (if you've copied and pasted a code to search) which brings up everything, because the space throws it out?

Link to comment
Share on other sites

Yeah I've been battling with this over the past couple of days. I checked my database (I found somewhere that someone said this problem may be related to collated tables being set to latin_bin) unfortunately that offered no solutions. I also tried installing a few search mods but this offered no help as well.

Has anyone had any progress with trouble tickets. This is a serious problem that needs to be addressed as it really cripples peoples stores.

Link to comment
Share on other sites

Just wondering if this could have anything to do with the lines around 30-60 of the main index file? They seem to be what powers the search.

Link to comment
Share on other sites

Guest Rselbo

Hi guys,

Sorry for the delay in replying here. I received a prompt response from Cubecart (as always) but haven't had time to actually check the fix provided. Please see my reply from ticket below:

Add this line somewhere at the beginning of includes/content/viewCat.inc.php file:

$config['searchMode'] = "boolean";

It could appears like this:

if (!defined('CC_INI_SET')) die("Access Denied");

$config['searchMode'] = "boolean"; # set boolean search mode

Please don't take this response as an official Devillion response. It was in reply to my specific situation, though the fix is what you're looking for in my opinion :)

Link to comment
Share on other sites

I couldn't get this fix to work. I'm not entirely sure I'm configuring it correctly though. Please let me know if it works for you.

Link to comment
Share on other sites

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...