ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Customizing ProductCart
  New Posts New Posts RSS Feed - Making a field non-searchable??
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Making a field non-searchable??

 Post Reply Post Reply Page  <1234>
Author
Message
Hamish View Drop Down
Admin Group
Admin Group


Joined: 12-October-2006
Location: United Kingdom
Status: Offline
Points: 56
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hamish Quote  Post ReplyReply Direct Link To This Post Posted: 03-June-2008 at 6:38pm
OK -
  I've taken a look at the patch version of the files - There's more to this search code than I thought.

I'd start by commenting out lines 395 & 486 in showsearchresults.asp, both read :

    strSQL=strSQL & " OR " & tmpSQL2

A see what difference that makes - I need to get an understanding of what the XML_ and inc_ members are up to.

OK - A quick look reveals very similar code in inc_srcPrdQuery.asp - So I would comment out line  477 in that as well.
That's my starter for ten - but I'll look at it further.
Back to Top
Hamish View Drop Down
Admin Group
Admin Group


Joined: 12-October-2006
Location: United Kingdom
Status: Offline
Points: 56
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hamish Quote  Post ReplyReply Direct Link To This Post Posted: 03-June-2008 at 6:45pm
I see there is also an includes/languages.asp - I assume you have both already got custom versions of that file in place. Just in case you hadn't spotted it :-)  
Back to Top
Hamish View Drop Down
Admin Group
Admin Group


Joined: 12-October-2006
Location: United Kingdom
Status: Offline
Points: 56
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hamish Quote  Post ReplyReply Direct Link To This Post Posted: 03-June-2008 at 6:57pm
I suggest testing the new version of the code FIRST - before chopping it about by commenting the lines out.  It will give you some figures to  compare with & also prove it's working OK as delivered.
One thing I didn't look at is the count of matches etc - I didn't spot where that is done - so it's worth checking that is producing the correct values as well when you comment the lines out.



 

Back to Top
nathan View Drop Down
Newbie
Newbie


Joined: 20-April-2007
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote nathan Quote  Post ReplyReply Direct Link To This Post Posted: 03-June-2008 at 7:41pm
It seems to me the only one  I want to keep is tmpSQL2 since this is the Title? I only want to quary dbo.description.
Back to Top
Hamish View Drop Down
Admin Group
Admin Group


Joined: 12-October-2006
Location: United Kingdom
Status: Offline
Points: 56
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hamish Quote  Post ReplyReply Direct Link To This Post Posted: 03-June-2008 at 8:13pm
Hi,
  I believe you are correct - Example :
http://shop.rings-things.com/cart/pc/viewPrd.asp?idcategory=121&idproduct=8744
You just want :-
"Bead, Glass, E, Ghost (Assorted)"
To be included in the search? If so then I agree.
Back to Top
nathan View Drop Down
Newbie
Newbie


Joined: 20-April-2007
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote nathan Quote  Post ReplyReply Direct Link To This Post Posted: 03-June-2008 at 9:29pm
So I am having problems figuring out what code to comment out to only search the description.
Back to Top
nathan View Drop Down
Newbie
Newbie


Joined: 20-April-2007
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote nathan Quote  Post ReplyReply Direct Link To This Post Posted: 03-June-2008 at 9:29pm
Originally posted by Hamish Hamish wrote:

Hi,
  I believe you are correct - Example :
http://shop.rings-things.com/cart/pc/viewPrd.asp?idcategory=121&idproduct=8744
You just want :-
"Bead, Glass, E, Ghost (Assorted)"
To be included in the search? If so then I agree.
 
Yes, only the title.
Back to Top
Hamish View Drop Down
Admin Group
Admin Group


Joined: 12-October-2006
Location: United Kingdom
Status: Offline
Points: 56
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hamish Quote  Post ReplyReply Direct Link To This Post Posted: 04-June-2008 at 1:42pm
Hi Nathan, 
    I'll take another look  at the code.
Back to Top
nathan View Drop Down
Newbie
Newbie


Joined: 20-April-2007
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote nathan Quote  Post ReplyReply Direct Link To This Post Posted: 04-June-2008 at 2:18pm
Thanks
Back to Top
Hamish View Drop Down
Admin Group
Admin Group


Joined: 12-October-2006
Location: United Kingdom
Status: Offline
Points: 56
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hamish Quote  Post ReplyReply Direct Link To This Post Posted: 04-June-2008 at 7:14pm
OK - There's lots to this code & I'm certain it would be possible to amend it fairly radically to focus it on just the bits you want.

First thing some of the code runs via AJAX on the search page - to indicate the number of hits you will get - which is great, but maybe not for 18,000 prods - from memory (it's a few hrs since I looked, it's switched on/off depending on whether the AJAX Tooltip is enabled. I don't recall if this is the new or current version. That code will also need amending - if it IS enabld as it will give a different count from the actual search.

Anyway, onto code changes...

Look for Lines 394 & 485  :-

    strSQL=strSQL & tmpSQL
    strSQL=strSQL & " OR " & tmpSQL2
    if tIncludeSKU="true" then
        strSQL=strSQL & " OR " & tmpSQL3
        strSQL=strSQL & " OR " & tmpSQL4 & "))"
    else    
        strSQL=strSQL & " OR " & tmpSQL3 & "))"
    end if

And try :-

' HAM -    strSQL=strSQL & tmpSQL
' HAM -    strSQL=strSQL & " OR " & tmpSQL2
    strSQL=strSQL & tmpSQL2
    if tIncludeSKU="true" then
' HAM -        strSQL=strSQL & " OR " & tmpSQL3
        strSQL=strSQL & " OR " & tmpSQL4 & "))"
    else   
' HAM -        strSQL=strSQL & " OR " & tmpSQL3 & "))"
        strSQL=strSQL & "))"  ' HAM - Added line
    end if

- Where  'HAM are lines I commented out - Note the EXTRA line after the last commented out line.

tmpSQL  - Search of "Details"
tmpSQL2 - Search of "Description"
tmpSQL3 - Search of "Short  Description"
tmpSQL4 - Search by SKU

I've NOT tested this code change and, of course (by design) it limits the breadth of the search.

 
Back to Top
 Post Reply Post Reply Page  <1234>
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.063 seconds.