template cookbook

Product Add to Cart and View Cart Buttons

You have a lot of options for the Add to Cart and View Cart buttons. Merchants with ShopSite Manager can define either text or a graphic to be used throughout the store. Merchants with ShopSite Pro stores can also define different buttons and/or text for each individual product. As the template designer, you can choose to use what the merchant defined, or completely ignore that and create your own buttons.

Example 1: Add and View Button URLs
This examples shows how to use the [-- PRODUCT.AddToCartURL --] and [-- Shopping_Cart_URL --] custom template tags to use to get the URLs for the Add to Cart and View Cart buttons. It also shows how to use hard-coded text for the links and ignores anything defined by the merchant. The template code for the product price is simplified for this example.


Example 2: Text Buttons
This examples shows how to use the merchant-defined text for the Add to Cart and View Cart buttons (links). This code does not check to see whether the merchant chose text or an image, but does check to see if the text field is blank and uses a hard-coded value if it is.


Example 3: Text or Graphic Buttons
This examples shows how to test to see if the merchant has defined an image or text for the buttons. Obviously, you'll need different HTML to display an image instead of text. The template code for the product price is simplified for this example.


Example 4: Text, Graphic, or Form Buttons
This examples shows the easiest way to display the Add to Cart and View Cart buttons for a product using the [-- PRODUCT.OrderCheckout --] tag. This tag outputs the correct HTML for the buttons, no matter what the merchant has defined -- text or an image. If a product has the options set to display ordering options or the quantity input box on the store pages, this tag will output an entire set of <form> tags so customers can select and enter information.

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