Unable to group Items

General ShopSite user discussion

Unable to group Items

Postby RedSyntax » Thu Feb 12, 2009 8:26 am

I have new question how can I group products on a page with a heading above them. My client wants to group products on a page three times, ie three groups. This seems reasonable and fairly easy to accomplish on the surface -- the technique at the moment eludes me. Any Thoughts suggestions? Thank you in advanced!
RedSyntax
 
Posts: 51
Joined: Mon Nov 17, 2008 7:29 am

Postby Jim » Thu Feb 12, 2009 8:52 am

You need to have multiple Loop Products sections on the page template and use some VAR to check which product in the product template to display in a particular location.
here is some really simplified code showing how to do it.

Note that in this case extra product field 1 contains the value used to determine where the product is displayed.


======This is on the page template
VAR.Group first
Loop Products
...
End_Loop Products

VAR.Group second
Loop Products
...
End_Loop Products

VAR.Group third
Loop Products
...
End_Loop Products


======This is in the product template
if product.field1 VAR.Group
output the product
else
don't do anything
end if
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Thank you

Postby RedSyntax » Thu Feb 12, 2009 9:03 am

Thank you
RedSyntax
 
Posts: 51
Joined: Mon Nov 17, 2008 7:29 am


Return to User Forum

Who is online

Users browsing this forum: No registered users and 118 guests