Search Results - Don't want products to show?

General ShopSite user discussion

Search Results - Don't want products to show?

Postby Wezza007 » Sun Sep 24, 2006 4:49 am

Can somebody tell me how to stop products showing up in the search results? I know there is a tick box to stop pages displaying in the results, but what about products?

I've tried creating product templates that produce no output, but the loop function still spits out nothing and creates a table for it, so it throws out the formatting. I've tried a few work arounds but can't get it right.

Surely there is a simple solution?
Wezza007
 
Posts: 38
Joined: Wed Sep 06, 2006 5:41 am
Location: Melbourne, Australia

Postby loren_d_c » Sun Sep 24, 2006 8:56 am

If you have ShopSite Pro, each product has a Search Destination setting. If you don't want certain products even found in the search, set this setting to None for those certain products.

-Loren
loren_d_c
 
Posts: 2572
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere

Postby Wezza007 » Sat Sep 30, 2006 6:19 pm

Hi Loren,

Thanks for the response. It sounded perfect so I tried implementing it, but it didn't really solve my problem (mainly because I didn't describe my problem properly to you).

Some of my products require a very informative page and then an even more informative page as the 'more info' page. So when I need to, I create a page for this product and then add the product which gives me 2 pages as I need. However, then to link the thumbnail image to the product list page, I have to use the page link, because I've already used two large photos in the product area, and also I want customer to click into the page with the product on it, not the more info page.

This is fine, however with many other products, I don't need such detail, so I just create a product, where my product image is my thumbnail which links to the product list page and then the more info page is the one with all the detail.

This all works fine.

However, now I am trying to set up the search template and it always draws the product image which in some cases is a large image and in others it's a thumbnail.

So what I need to do is get the search template to only show the page link for the products where I have a large image and the product link for the other products where I do have a thumbnail as the image.

So I tried what you suggested, but for some reason, when I make any change to the Search Destination Settings (ie, make it none), I lose the page as well, so the product simply doesn't show up. Also, when I try not making a page indexable, it seems to remove the products that link to that page disappear from the search results as well.

I'm getting really confused. It's confusing just writing this. I hope you understand what I mean. Have you got any solution for this?

Thanks in advance for your help.
Goodbye Agassi!
Wezza007
 
Posts: 38
Joined: Wed Sep 06, 2006 5:41 am
Location: Melbourne, Australia

Search Destination setting

Postby craig » Tue Oct 03, 2006 1:01 pm

I have a similar problem. I am using certain products for category listings and I do not want these products along with their subproducts to show up in the search results. I have set the Search Destination setting to none for these products but they still show up. Is there some code that needs to be in a template that checks for this setting? Thanks for your help.

Craig
craig
 
Posts: 7
Joined: Sun Aug 13, 2006 2:54 am

Postby Wezza007 » Sat Oct 07, 2006 1:02 am

Loren,

Do you have more information that could help me out with this problem? It just seems very difficult to choose which pages and products I want listed. By setting a product to none, I lose the page also.

Help!
Goodbye Agassi!
Wezza007
 
Posts: 38
Joined: Wed Sep 06, 2006 5:41 am
Location: Melbourne, Australia

Postby Jim » Sat Oct 07, 2006 6:08 am

If you want a subproduct to display in search but not the parent product then you will need to assign the subproduct itself as a product to some other page so that it is not a subproduct on that page.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby Wezza007 » Sat Oct 07, 2006 4:50 pm

Hi Jim,

No, I do not have any subproducts. Subproducts are not my problem.

At the moment, some products are assigned to their own page just dedicated to that product which has detailed information and a large photo. In order to link these pages to a page showing multiple products, I use the page link. The product image is very large (not a thumbnail - but the page link graphic is). The more info image is massive. (TYPE A)

Other products are assigned to a page where multiple products are displayed on that same page (using a thumbnail). By clicking on the product it goes to the more info page to get the full details with the larger photo. (TYPE B)

So if I use the standard search for products and page links, I usually get 2 listings of the product TYPE A, once as a page link and once as a product. The product image is too large as it is not a thumbnail. So for TYPE A products I only want the page link to show.

For TYPE B products I am happy for the thumbnail to come up as the product link, but I wouldn't want the page to come up which has multiple products on it.

In the case of TYPE A, I tried setting the 'Search Destination Setting' to none, but not only does it stop the product showing, it also stops the Page link from appearing. How can I make on the product stop listing but allow the page link to still show up?
Goodbye Agassi!
Wezza007
 
Posts: 38
Joined: Wed Sep 06, 2006 5:41 am
Location: Melbourne, Australia

Postby Jim » Sat Oct 07, 2006 7:23 pm

I don't under stand what you are trying to do. If you want the search results to look the same for both type of products just define a custom product templlate and a custom link template that is used on the search results page. Then both types of products would look the same on the search results page. You configure which templates are used for the search results page under Preferences > Search Settings > Search Layout.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby Wezza007 » Sun Oct 08, 2006 3:38 am

Sorry... I'm having a lot of trouble trying to explain my problem.

So far I've tried to explain the whole problem, but I'll simplify it by just explaining the simple problem.

How do I stop the search results from showing a product, but I still want it to show the page that the product sits on? I have tried setting the 'Search Destination Settings' to none, but it makes both the product and the page it appears on disappear.
Goodbye Agassi!
Wezza007
 
Posts: 38
Joined: Wed Sep 06, 2006 5:41 am
Location: Melbourne, Australia

Postby Jim » Mon Oct 09, 2006 8:19 am

So all you want to do is have the page links display with no other product information?

I was able to do this very simply.
I went to Merchandising > Custom Templates and in the Product Templates section clicked on the New Template button. I gave the template the name search-no-product. I did not edit the template in any way.

Next I went to Preferences > Search Settings >Search Layout and in the section Product Template Override: I checked the box and selected the search-no-product template from the list and saved changes.

Next I did a search in the store and only page links were displayed. This worked for products that had either Moreinfo or Store set as the search destination.

I viewed the source of the search results page and the only html that was displayed in the link section is that which was from the Loop Links section of the search page template.

I tried this using several of the ShopSite supplied search page templates and it worked with all of them.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby Wezza007 » Thu Oct 12, 2006 3:28 am

Hi Jim,

Thanks for the tip, but I still don't think this solves my problem. The main reason is because I have some products where I want the product to display and others where I only want the page link to display. So I can't set the product template to be blank because then the products I do want to display will not show.

I need to know how I can untick a product from showing, but still allow the page it is on to show, whilst still allowing certain products to show in the listing, but turning the page link off for these products?

It seems simple to me that every page and product should have a tick box which allows it to show in the search results. Maybe I've designed my website badly, but I think I've done it correctly. As mentioned in my previous post, I've set it up so that:

At the moment, some products are assigned to their own page just dedicated to that product which has detailed information and a large photo. In order to link these pages to a page showing multiple products, I use the page link. The product image is very large (not a thumbnail - but the page link graphic is). The more info image is massive. (TYPE A)

Other products are assigned to a page where multiple products are displayed on that same page (using a thumbnail). By clicking on the product it goes to the more info page to get the full details with the larger photo. (TYPE B)


Side Note: The solution you have outlined above is great if I simply want page links to display (and if I'd made all products & pages the same way), however when you try to do this in a results page with 3 columns, it presents problems. You get a table which has an empty <td> </td> then a page link in a <td> 'page link' </td> then another empty <td> </td> followed by </tr><tr> <td>'page link'</td><td> </td><td> 'page link'</td></tr><tr><td> etc, etc.

So you get 1 product on the first line, then 2 on the next, 1 on the line after, etc etc
Goodbye Agassi!
Wezza007
 
Posts: 38
Joined: Wed Sep 06, 2006 5:41 am
Location: Melbourne, Australia

Postby Jim » Thu Oct 12, 2006 8:41 pm

All the <td></td> issues are coming from the way the templates are defined, so that should be able to be overcome using some conditional statments.

How much work do you want to go to to get this to work the way you want it to?

I have been think about this and have come up with a couple of possible ways that might work. Here is the simplist one.

You could set a VAR in the Search template and your Page template to know what template the product template is being called from. Then in your Product template you have different sections of the template depending on the VAR that is set. So it would be something like this in a page template
[-- VAR.TemplateType PAGE --]
[-- LOOP PRODUCTS --]
[-- PRODUCT --]
[-- END_LOOP PRODUCTS --]

Or in the search template
[-- VAR.TemplateType SEARCH --]
[-- LOOP SEARCH --]
[-- SEARCHRESULT --]
[-- END_LOOP SEARCH --]

Then in the product template you would have code like this

[-- DEFINE PRODUCT --]

[-- IF VAR.TemplateType PAGE --]
Put your code to display the product as you want it on your pages
[-- ELSE --]
Put your code to display the product as you want it on your search page.
You can have conditional statements using one of the custom product fields for example [-- product.field1 --] to determine whether the product is displayed in the normal fashion or just the nothing is displayed for the product itself using code like this.
[-- IF PRODUCT.FIELD1 NOSEARCH_OUTPUT --]
don't do anything
[-- ELSE --]
put all the code here to display the full product detail on the search page
[-- END_IF --]

[-- END_DEFINE PRODUCT --]

This wouldn't be simple to implement but I think it could give you the results you are looking for. The ShopSite template language gives lots of flexibility in the way things can be done once you become familiar with it.

Hope that gives you more ideas.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby Wezza007 » Fri Oct 13, 2006 4:28 am

Hi Jim,

That sounds like it could be part of the answer I'm looking for and I think it's worth the effort because at the moment I can't really use the search feature at all.

I was thinking one way around it might be to (where my products use large images and sit on their own page) use one of the extra 5 'Extra Fields' to give the location of the large photo of the product and make the template grab it from there. Then the search results could still use the regular image which I could make a thumnail and then it would be the same as all the other products and page links.

I'll see how I go.

By the way, thanks for all the responses you've made to help me with my problem. If I was the moderator of this forum I would have just deleted my post and banned me from coming back!!!! You've been a huge help!
Goodbye Agassi!
Wezza007
 
Posts: 38
Joined: Wed Sep 06, 2006 5:41 am
Location: Melbourne, Australia

Postby Wezza007 » Sun Oct 15, 2006 12:36 am

OK, I've taken the long way to fix this (but probably easiest for me to understand). In order to make all of my products consistent, I've made product.graphic always a thumbnail and whenever I want a larger image displayed then I have placed it's address in extra field 4.

So this makes all my products the same and much easier for the search results.

However, I'm still having that trouble with the the number of columns. In order to only show products, I've put the following code on my search template:

<table border="0" cellpadding="5" width="459">
[-- LOOP SEARCH 3 --]
[-- IF SEARCHPRODUCT --]
<td align="left" valign="top">
[-- SEARCHRESULT --]
</td>
[-- END_IF --]
[-- END_LOOP SEARCH--]
</table>

I've created an over-riding product template and page link template. The product template is perfect and the page link template has nothing in it.

However, it still seems to count any page links and therefore closes the row before 3 products have appeared. If I type something in the page link template like "hello", it still appears whenever a page link would have shown. So generally I get 1 product then two "hello" and the row is finished.

How do I make it so that my search results don't acknowledge page links at all and doesn't count them when looping so that the row is not closed prematurely?
Goodbye Agassi!
Wezza007
 
Posts: 38
Joined: Wed Sep 06, 2006 5:41 am
Location: Melbourne, Australia

Postby Jim » Mon Oct 16, 2006 7:10 am

Search results are returned by ShopSite as a Product and all page links that it is found on. So if a product is only on 1 page you will get 2 results (1 product and 1 page link) but if the product is on 5 pages you would get 6 results (1 product and 5 links) This makes it difficult (but not impossible) to have the results displayed in columns.

If you have ShopSite 8.1.x study the Classy search templates (classy_se_template.sst, classy_se_link_template.sst and classy_se_prod_template.sst ) to see how a multi column search result can be implemented.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah


Return to User Forum

Who is online

Users browsing this forum: No registered users and 35 guests