template cookbook

Custom Product Templates: Ordering Options

Product ordering options allow merchants to display product sizes, colors, etc. for customers to choose from. Including them in your product template is relatively simple because there aren't many custom template tags that you need to work with.

Example 1: Ordering Options
This example shows how to test whether ordering options are enabled for a product. If they are, the example uses an HTML form to display the ordering options and an Add to Cart button. If not, it just displays a simple Add to Cart button.

Product Name

[-- IF PRODUCT.DisplayOrderingOptions --]
<form action="[-- SHOPPING_CART_URL Base --]/order.cgi" method="post">
<input type="hidden" name="storeid" value="[-- STORE.ID --]">
<input type="hidden" name="dbname" value="products">
<input type="hidden" name="function" value="add">
[-- PRODUCT.OptionText --]
[-- Order_Option_Menu Line --]
<input type="hidden" name="itemnum" value="[-- PRODUCT.RecordNumber --]">
<input type="submit" value="[-- PRODUCT.AddToCartButton --]">
</form>
[-- ELSE --]
<a href="[-- PRODUCT.AddToCartURL --]">Add to Cart</a>
[-- END_IF --]


Example 2: Ordering Options In A Column
You can change Line to Column to display the ordering option pull down menus in a single column rather than in a line.

Product Name

[-- IF PRODUCT.DisplayOrderingOptions --]
<form action="[-- SHOPPING_CART_URL Base --]/order.cgi" method="post">
<input type="hidden" name="storeid" value="[-- STORE.ID --]">
<input type="hidden" name="dbname" value="products">
<input type="hidden" name="function" value="add">
[-- PRODUCT.OptionText --]
[-- Order_Option_Menu Column --]
<input type="hidden" name="itemnum" value="[-- PRODUCT.RecordNumber --]">
<input type="submit" value="[-- PRODUCT.AddToCartButton --]">
</form>
[-- ELSE --]
<a href="[-- PRODUCT.AddToCartURL --]">Add to Cart</a>
[-- END_IF --]

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