Search Results Problem - Doule Results

General ShopSite user discussion

Search Results Problem - Doule Results

Postby redwolf3 » Sun May 06, 2007 10:38 pm

Hey Guys-
I moved a customers site from an older shopping cart. Overall, the process when fairly smooth, but I haven't been able to figure out one specific issue, and that is the search results.

Presently, the customer ONLY wants products displayed in the results, no pages. I have gotten this working by setting the Search page of each product to be set to "MoreInfo" instead of "Store". The problem I am running into is every single product is returned twice.

I have hunted through all the templates, etc, and it appears that the double results are being returned by the [searchresults] tag. Is there any way to override this so that I only get each link once instead of twice?

Any help is greatly appreciated.
redwolf3
 
Posts: 4
Joined: Thu May 03, 2007 9:20 am

Postby Jim » Mon May 07, 2007 12:28 pm

The product will be returnedby a search for each page it is found on, so if it is assigned to 2 pages you will get 2 results. Also if the product is a subproduct it will be returned once listed with the parent product and once as the subproduct itself. You can turn off having subproducts indexed on the Preferences > Search Settings >Search Indexing screen if you have subproducts and don't want them indexed.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby redwolf3 » Mon May 07, 2007 12:57 pm

So, I guess my next question is whether there is a way to only have it display once for the MoreInfo page, or altnernatively, to have it display once for the product page it is on without displaying the product page as well?

The biggest issue is that he only wants products to be listed, and only one display per actual product on the site (presently, each product is assigned to only one product page).

Thanks again fro any help.
redwolf3
 
Posts: 4
Joined: Thu May 03, 2007 9:20 am

Postby topher » Mon May 07, 2007 1:37 pm

You may want to take a look at our free search module here:

http://www.basiclink.com/Shopsite_Modul ... earch.html

It uses the product database instead of a site search.

You can see it in action at http://www.sayitright.org
topher
 
Posts: 15
Joined: Wed Dec 06, 2006 9:39 am
Location: San Diego, CA

Postby Jim » Mon May 07, 2007 3:13 pm

What is the url for the store that you are having the problem on? What term are you searching for that shows twice?

Jim
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby redwolf3 » Mon May 07, 2007 4:40 pm

The main URL of the site can be found at: http://www.unitedtty.com/

At the top of the page is the search. You can search for "tty" which will return a number of results, but if you look at each result, there are 2 copies of each and every product listed.

I had previously had this setup by indexing a pages products. This was better in that there was only one copy of each product, but then the actual pages were listed as well, which the customer didn't want.

Again, any help would be greatly appreciated. I just can't seem to figure where in the templates I might be able to change this.
redwolf3
 
Posts: 4
Joined: Thu May 03, 2007 9:20 am

Postby Jim » Mon May 07, 2007 5:04 pm

Try changing the Search link template to include just

[--DEFINE LINK_TO_PAGE--]
# This define is used to control how the link to this page will
# look on other pages
[--END_DEFINE LINK_TO_PAGE--]

Don't put anything else in the template. Then set the Link Template Override: to that template and try a search again.

If that doesn't work please post the Search Product template that you are using.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby redwolf3 » Mon May 07, 2007 8:57 pm

Well, thanks for the help guys. I wasn't able to quite use what you had below, but it led me to find a solution (a kludge of a solution, but a solution none the less).

Here's what I did in case anyone else is curious:

Code: Select all
[-- LOOP SEARCH --]
  [-- IF SEARCHLINK --]
    <!--
  [-- END_IF --]
  [-- SEARCHRESULT --]
  [-- IF SEARCHLINK --]
    -->
  [-- END_IF --]
  [-- IF SEARCHPRODUCT --]
    <br><br>
  [-- END_IF --]
[-- END_LOOP SEARCH --]


Basically, if the output is the searchlink, I hide it in an HTML comment, otherwise I add spacing for between lines. Not the best way to solve it IMHO, but as long as it works, that's all the client cares about.

Thanks again guys.
redwolf3
 
Posts: 4
Joined: Thu May 03, 2007 9:20 am


Return to User Forum

Who is online

Users browsing this forum: No registered users and 61 guests