Forcing a break in matrix product listing

General ShopSite user discussion

Forcing a break in matrix product listing

Postby johnbiggscr » Thu May 27, 2010 1:13 pm

Is it possible to force a break of a line (or more) in a matrix list of products?

We have 22 products on one page. 10 of type 'A', 6 of type 'A2' and 6 of type 'A3'.

They are on the same page because they are variations of product type 'A' but we would prefer it if there was a break between each of the different subtypes to highlight that there is a difference.

Is there an easy way of doing this?
johnbiggscr
 
Posts: 68
Joined: Mon Mar 01, 2010 12:41 pm
Location: Cedar Rapids

Postby Jim » Thu May 27, 2010 2:49 pm

You can do multiple [-- Loop Products --] and use a var to specify which parameter you are using and check that against a custom field that specifies the A, A2, A3.


If you always have a set number of products in each group 10, 10, 10 you could include a VAR that you increment and when the count gets to that certain level put in the extra breaks.
Code: Select all
[-- var.lines 0--]
[-- loop products --]
[-- var.lines INC --]
[-- products --]
  [-- if var.lines 10]
   <p><p>
   [-- var.lines 0--]
  [-- end_if --]
[-- end_loop products --]


If the number is known but not always the same you could implement multiple VARs and increment them and reset similar to the above but it would be more complicated.
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 18 guests