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.
[-- 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.
[-- 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 --]