Ecommerce Samples

by Justin Bodeutsch | Last edited: 3/5/2010

This article will display code for some common ecommerce content.

List of products or families

This will display a list of families unless on a family page. At that point it will show a list of products associated with that family.
tag="products"
display="auto"

show_familylist="<li><a href=__familytitlelink__>__familytitle__</a></li>"

before_show_productlist="<h2>__familytitle__</h2>"
before_show_productlist="<p>__familycategory__ > __familytitle__</p>"
before_show_productlist="<div id='product-thumbs'>"

show_productlist="<div class='product-thumb'>"
show_productlist="<h3><a href='__producttitlelink__'>"
show_productlist="<img src='__productimageURL__' alt='__producttitle__' width='94' />"
show_productlist="__producttitle__"
show_productlist="</a></h3>"
show_productlist="<p>__productprice__</p>"
show_productlist="</div>"

after_show_productlist="</div>"

A list of family categories with associated families listed.


tag="products"
display="list"
family="all"
product="none"
sku="none"
groupby="category"
group_show="</ul></li><li><a href='#' class='category'>__title__</a><ul class='familyul' id='__slug__'>"
show_familylist="<li><a href='__familytitlelink__'>__familytitle__</a></li>"

List of Families

getContent("products",
    "display:list",
    "family:all",
    "show_familylist:<h2>Family: <a href=__familytitlelink__>__familytitle__</a></h2>"
);

A list of families and products together

getContent("products",
    "display:list",
    "family:all",
    "product:all",
    "show_familylist:<h2>Family: <a href=__familytitlelink__>__familytitle__</a></h2>",
    "show_productlist:<p>__producttitlelink__</p>",
);

A List of Products in a specified family

getContent("products",
    "display:list",
    "family:family-slug",
    "product:all",
    "show_productlist:<p>__producttitlelink__</p>",
);