Creating a Custom Product Template

A product template defines the elements and layout of a product listing that appears on store pages. The content of each element comes from the values that the merchant enters for the product in the ShopSite back office. When ShopSite is publishing a store and a page includes a product, it reads the product information from the product database and formats it according to the product template. ShopSite then creates the rest of the page, which probably includes more products, each of which is formatted according to the product template that is uses.

Typically, a template contains standard HTML tags to specify the layout, and ShopSite product template tags that tell ShopSite what information from the products database to include in a product listing. A template can include HTML table tags, frame tags, and even JavaScript and other Web enhancements.

When ShopSite publishes a store that uses custom templates, the ShopSite parser finds all the custom tags and replaces them with information from the products databases.

A merchant can use the same template for all products in a store, or choose a product template for each product in the store. If a product is assigned to more than one page, it is displayed using the same product template on each page.

To create a product template and make it available to merchants:
  1. If you do not have experience with ShopSite, you should spend time configuring and viewing the ShopSite demo stores, from both the merchant and customer perspectives. You need to have a fairly solid understanding of what information is stored for pages and products, and how the built-in templates present that information.
  2.  

     

  3. Study the custom template specification, the sample product template, and the annotated screen shot of a page produced with the sample product template.
  4.  

  5. Use an HTML authoring program or a text editor to create a product template.
  6.  

  7. If you are using ShopSite Pro, you can upload the template from the Merchandising > Custom Templates screen. Or you can FTP the template to the correct directory:
  8.  

  9. Test your template:
  10.  

    1. Add a product to a test store and assign the template to the product.
    2.  

    3. Enter values for all product fields used by the template.
    4.  

    5. Assign the product to a page in the store.
    6.  

    7. Publish the store and review the Publish Results page for any error messages.
    8.  

    9. Go to the store and view the page in a browser. Verify that all the product elements are there and that the layout looks the way you planned.
    10.  

    11. View the page using other browsers that customers might use, to make sure the product listing looks okay in all browsers.
    12.  

    13. Delete the values in some product fields, then publish the store again and view the page to make sure the product listings still look okay.
    14.  

    15. Check the HTML of the page by running it through an HTML validator, such as http://www.htmlhelp.com/tools/validator or http://validator.w3.org.
    16.  

    17. View the source of the page. If the ShopSite parser did not recognize a tag, or if a database field was empty, it replaced the ShopSite custom tag with an HTML comment tag containing information about the problem.
    18.  

  11. Make any necessary changes and test the template again, then tell the merchant that it is available. The merchant should be able to select the template from the Add a Product screen (advanced editing verion) or the Edit Product Layout screen.

ShopSite Help and Resource Center
February 22, 2002
Give Feedback

Copyright © ShopSite, Inc.
http://www.shopsite.com