Shopping Cart Template: Required Form Tags

This example shows only the essential tags for a Shopping Cart Page; it is not a functional cart template and produces no visible output. Your template must have these tags in this order for the Shopping Cart Page to function. Of course, your template will also have tags for displaying the products in the cart and other elements, but you must have the framework shown here to get started.

  • A shopping cart template must start with [-- DEFINE ShoppingCart --] and it must end with [-- END_DEFINE ShoppingCart --]. (Note that the other cart pages are defined in the same file below the [-- END_DEFINE ShoppingCart --] tag, but that isn't shown in this example.)
  • The opening <html> and closing </html> tags are inside the [-- DEFINE ShoppingCart --] and [-- END_DEFINE ShoppingCart --] tags.
  • The shopping cart uses JavaScript for some functions, so you must include the [-- SC_JAVASCRIPT extras --] tag inside <script> tags in the <head> section of the template.
  • The shopping cart is an HTML form. You must include the [-- SC_Form --] tag -- which produces the opening <form> tag with the necessary attributes -- near the top of the <body> section of the template, and you must put a </form> tag near the end.
  • The [-- ShopSiteMessages --] tag will produce any error messages, such as telling the customer that they must select a shipping option. It will not produce anything if there are no errors or messages for the customer.
    [-- DEFINE ShoppingCart --]
    <html>
    <head>
    <script type="text/javascript" language="JavaScript">
    <!--
    [-- SC_JAVASCRIPT extras --]
    // -->
    </script>

    </head>
    <body>
    [-- ShopSiteMessages --]
    [-- SC_Form --]

    <!------------------------------------>
    <!-- THE BODY OF THE CART GOES HERE -->
    <!------------------------------------>
    </form>
    </body>
    </html>
    [-- END_DEFINE ShoppingCart --]
Next: SC Colors