by ShopSite Lauren » Wed Jun 20, 2012 11:53 am
In your page template, you will want to have the loop tags without the column tags and without the table cell options. Something very simplified like:
[-- IF PAGE.NumProducts "0" --]
[-- ELSE --]
[-- LOOP PRODUCTS --]
[-- PRODUCT --]
[-- END_LOOP PRODUCTS --]
[-- END_IF --]
In your product template, within the DEFINE PRODUCT section, you will want to have something basic as well, similar to:
<div class="product-loop">
[-- IF PRODUCT.DisplayMoreInformationPage --]
[-- IF PRODUCT.Graphic --]<a href="[-- PRODUCT.MoreInfoURL --]">[-- PRODUCT.Graphic --]</a>[-- END_IF --]
<a href="[-- PRODUCT.MoreInfoURL --]">[-- PRODUCT.Name --]</a>
[-- ELSE --]
[-- IF PRODUCT.Graphic --]<span>[-- PRODUCT.Graphic --]</span>[-- END_IF --]
<span>[-- PRODUCT.Name --]</span>
[-- END_IF --]
[-- END_IF --]
[-- IF PRODUCT.Sku --]
<span>[-- PRODUCT.Sku --]</span>
[-- END_IF --]
<span>
[-- IF PRODUCT.SaleAmount --]
<strike>[-- PRODUCT.Price --]</strike> [-- PRODUCT.SaleAmount --]
[-- ELSE --]
[-- PRODUCT.Price --]
[-- END_IF --]
</span>
</div>
Next, for the columns. Are all your product DIVs going to be exactly the same height? If so, then you can just set the height and the width and let the divs wrap. Your CSS would be similar to the following:
<style type="text/css">
div.product-loop {
height: 300px;
width: 33%;
float: left;
clear: none;
padding: 0px;
margin: 0px;
}
div.product-loop a, div.product-loop span {
display: block;
text-align: center;
}
</style>
If your product information/divs is/are not all the same height (some might have longer names, some might have longer descriptions, etc), then you will want to add some VAR tags in so that you create your own row rather than just let the divs fit where they fit. If this is the case, add a little code to your CSS,
.clear {clear: both;}
and add some var tags to your page template loop section so that after every 3rd product, a div that clears the row will be added:
[-- IF PAGE.NumProducts "0" --]
[-- ELSE --]
[-- VAR.ProductCounter "0" --]
[-- LOOP PRODUCTS --]
[-- PRODUCT --][-- VAR.ProductCounter INC --]
[-- IF VAR.ProductCounter "3" --]<div class="clear"></div>[-- VAR.ProductCounter "0" --][-- END_IF --]
[-- END_LOOP PRODUCTS --]
[-- END_IF --]
- ShopSite Lauren
Contact me for help with any of your
custom ShopSite template questions.