Looping the [-- PRODUCT --] tag in search results

General ShopSite user discussion

Looping the [-- PRODUCT --] tag in search results

Postby natez311 » Mon Nov 09, 2009 8:38 pm

Hi,

I am working on displaying products in the search results page but I am a bit confused on how it all works. What I would like to generate is a loop of 8 products resulting from a search query. Would this be possible using the [--LOOP--] and [-- PRODUCT --] tags within a search template. The [-- PRODUCT --] tag contains the exact layout I want for the thumbnails.

Would there be a combination of rules I would have to use to allow this? For instance:
[-- VAR.anyresults "yes" --]
<ul>
[-- LOOP PRODUCTS 8 --]
<li>[-- PRODUCT --]</li>
[-- END_LOOP PRODUCTS --]
</ul>

Any input input on this would help, thanks!
Thanks!

-Nate
natez311
 
Posts: 26
Joined: Fri Oct 30, 2009 10:52 am
Location: New York

Postby Jim » Mon Nov 09, 2009 9:52 pm

You need to use the search template specification for search results pages.
See: http://shopsite.com/help/10.0/en-US/sc/ ... earch.html

It will use the product template that you assign under Preferences > Search Settings > Search Layout. So you could use the same product template but the actual Search template is different than a page template as described in the help page above.
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 131 guests