template cookbook

Custom Product Templates: Subproducts

There are two separate parts of a custom product template for subproducts: defining how subproducts will look, and setting where subproducts will be displayed in the current template.

Defining the Look of Subproducts
At the top of your custom product template -- before the [-- DEFINE PRODUCT --] tag -- you must put a [-- DEFINE SUBPRODUCT --] section to define how subproducts will look. This includes what product attributes will be displayed (name, price, etc.) and the layout of those attributes.

Putting Subproducts in the Product Template
As a general rule, if a product has subproducts, most of the information for the main product is not displayed. You can stick to this rule or ignore it, but the built-in ShopSite templates only display a product's name, graphic and description if it has subproducts. You can use an IF tag to test whether a product has subproducts.

Placing subproducts in your product template is done with a loop:

[-- LOOP SUBPRODUCTS --]
<br>[-- SUBPRODUCTS --]
[-- END_LOOP SUBPRODUCTS --]

Subproduct Example
This example defines the subproduct to display the subproduct name, price, and an Add to Cart button. It does not display sale prices or alternate currency prices for subproducts. In the product definition, there is a test for whether a product has subproducts, and if it does, only the product name, graphic and description are displayed before the subproducts.

Rose Bouquet
1doz Roses $29.99 Add To Cart
2doz Roses $44.99 Add To Cart
3doz Roses $59.99 Add To Cart
Return To: Product Template Home Page

Top Template Tips

New v11 SP1 Template Tags Check out the new template tags available in ShopSite version 11 SP1. Custom Cart - No Template Get your own custom shopping cart look without learning how to create a shopping cart template. Quick & Easy Templates Copy and paste ready-made tables into your design to quickly create your own custom templates. Divided Customer Text-Entry Create multiple text fields for your customers to enter in product specific information. Multi-Add-To-Cart Template Setup a form where customers can add multiple items to the cart at the same time. View More Most Popular

Custom Template Forum

Check out the Custom Template Forum in the list of ShopSite User Forums. This forum is specifically for template questions and is monitored by two designers and is frequently viewed by other companies and designers. Post questions about custom templates and post unique tricks you have done with your custom templates.

Custom Template Forum
© 2012 ShopSite, Inc.|ShopSite Shopping Cart Software|Questions?|Site Map