Loop Product problem

General ShopSite user discussion

Loop Product problem

Postby bobthebuilder » Tue Oct 07, 2008 3:14 pm

I'm having an issue with the Loop Product tag, at least that's what I think. I created a custom page template off of the "tab_page_template". I have specified that there should be 5 products displayed per page. The products should be displayed three across. So on the web page you should see:

Product1 | Product2 | Product3
Product4 | Product5

I have currently assigned 10 products to the page. When I view this web page the first page is correct and looks like the following:

Product1 | Product2 | Product3
Product4 | Product5

However, when I go to the second page it looks like the following:

Product6
Product7 | Product8 | Product9
Product10

When I look at the html code for the second page it appears the <tr></tr> tags are completely missing for the first row. The template code for the Products table is as follows:

<!--*************************-->
<!-- Begin Table of Products -->
<!--*************************-->
<table width="[-- PAGE.PageWidth --]" align="center" border="[-- VAR.border --]" cellpadding="3">
[-- LOOP PRODUCTS 3 --]
<td valign="top" align="[-- VAR.align --]">&nbsp;[-- PRODUCT --]</td>
[-- END_LOOP PRODUCTS --]
</table>
<!-- End Table of Products -->
[-- END_IF --]

[-- IF PAGE.Text2 --]
<table width="[-- PAGE.PageWidth --]" align="center">
<tr>
<td>[-- PAGE.Text2 --]</td>
</tr>
</table>
[-- END_IF --]

--------------------------

Any help would be appreciated. Thanks in advance.
bobthebuilder
 
Posts: 35
Joined: Mon Sep 29, 2008 9:36 am

Postby loren_d_c » Tue Oct 07, 2008 3:21 pm

If you are going to have multiple pages with a multi-column product listing, then you should make the number of products per-page a multiple of the number of columns you are using in your template. For example, for a 3-columns of products layout, set the number of products per page in your page settings to 3, 6, 9, 12, 15, 18, or 21, etc.

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

Postby bobthebuilder » Tue Oct 07, 2008 3:51 pm

Thanks. That fixed the problem.
bobthebuilder
 
Posts: 35
Joined: Mon Sep 29, 2008 9:36 am


Return to User Forum

Who is online

Users browsing this forum: No registered users and 61 guests