by ShopSite Nicole » Mon Mar 18, 2013 9:59 am
The steps below are outlined in the Custom Template Cookbook (I used these steps on the Solid Block Theme, but the instructions can be used for any theme which is based on the Multi-Use templates). Editing your current theme to use checkboxes instead of a pull-down menu can be done in this way (provided you are using all of the templates associated with your chosen ShopSite theme):
First, go to Merchandising > Custom Templates > Includes > Copy ShopSite Include, and make a copy of the Multi-Use-Theme-Select.sst include file. You will need to give it a new name (i.e. Multi-Use-Theme-Select2.sst).
Second, In this include, you will find [-- VAR.SubproductDisplay "select" --]. This VAR tag determines how the subproducts are displayed for the products in your store. "Select" means that they are displayed in a pull down menu. You can change the text "select" to "radio" to have the subproducts be radio buttons, "checkbox" to have the subproducts displayed with checkboxes to add multiple subproducts to the cart at once, or "table" which will display the subproducts in a table format, each with its own add to cart button.
Third, make a copy of YOUR copy and name it the exact same name as the original once you are ready to use it in your store (using the example above, you would remove the 2) You can then remove your copy (the copy which does not have the exact same name as the original).
Once you have done that, you may need to edit the product template so that a quantity input box is displayed for each subproduct. I was able to do this in my demo store by inserting the following into the "checkbox" code for the subproduct portion of the product template:
[-- IF product.DisplayOrderQuantity? --]
<span class="pr_qty">[-- STORE.Quantity --]: <input type=text size=2 name="[-- PRODUCT.RECORDNUMBER --]:qnty" value="[-- IF PRODUCT.MinimumQuantity "0" --]1[-- ELSE_IF PRODUCT.MinimumQuantity "" --]1[-- ELSE --][-- PRODUCT.MinimumQuantity --][-- END_IF --]"></span>
You may need to work with the code further to make certain it displays how you want.
NOTE: when you edit templates, always make sure to do a complete regeneration of your store once you are ready for the templates to be used (Utilities > Publish > Renegerate).