Search Results Pages

General ShopSite user discussion

Search Results Pages

Postby malljess » Mon Dec 12, 2011 3:57 pm

Is it possible to use a different search results template depending on the category of products. For example - I have two pages that are used to search for different products - one page for books and one for ebooks. The instructions and layout on the ebooks results page is different from the books page. So I want to go to a different results page depending on if they searched for ebooks or books. The search on the ebook page will only look for ebooks.

Am I explaining this clearly? Is this possible?
malljess
 
Posts: 50
Joined: Sat Oct 22, 2011 7:38 am

Re: Search Results Pages

Postby Jim » Mon Dec 12, 2011 4:36 pm

Only one template may be specified for each of the following , the search results page, product layout and links.

It might be possible to make some changes to the product look based on a field in the product, such as Extra Field 1, through using [-- IF ...--} statements but there would be no way to change the overall look of the page.

Working with search results is more difficult than working with just pages or products because the search feature returns the product and links to all the pages the product is found on. For example you might have a product (product a) that is only on one page and another one (product b) that is on 5 pages.
The [-- SEARCHRESULT --] that are returned when you go through the [-- loop search --] for the these two products would be
product a, link a
product b, link b1, link b2, link b3, link b4, link b5
So for the first product you would be going through the [-- loop search --] twice and for the second product you would be going through the loop 6 times.

So you need to be aware of whether the [-- SEARCHRESULT --] being worked on is a product or the links for that product. But you might be able to setup IF statements to evaluate a product field and do some layout (css, table, etc) that would change the look of the basic product look, you could also use that some IF to set a VAR that would be used in the Page link template to do similar formatting on the way the links, to pages the product is found on, look.

The best way to work at this would be to look at some of the ShopSite provided search templates and see if something in them could help you create the layout you are looking for.
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 156 guests