By default, if you set a permutation as 'not valid' that option will not appear. We can create a custom layout that will allow the invalid option to still appear in the list so you can create a 'Please select...' option.
- take a backup of your site before making these changes
- go to the 'Design' menu and select 'Library'
- expand the 'Permutation Row Layout' group (click the '+')
- double-click on the 'PermutationRow' selector
- set the 'Place of Setting' at 'Component'
- click 'OK'
- right-click on the 'Drop Down Permutation Entry' layout and select 'copy'
- this will put a new entry into the library as 'Drop Down Permutation Entry (copy)' - you can rename this to something more meaningful if you wish
- double-click on this layout and replace the contents with:
Code:
<option value="<actinic:variable name="PermutationChoiceList" value="Permutation Choice ID List" />"> <actinic:block if="%3cactinic%3avariable%20name%3d%22PermutationAssociatedNameIsUsed%22%20%2f%3e%20%3d%3d%20FALSE"> <actinic:variable name="PermutationChoiceList" value="Permutation Choice Name List" /> </actinic:block> <actinic:block if="%3cactinic%3avariable%20name%3d%22PermutationAssociatedNameIsUsed%22%20%2f%3e"> <actinic:variable name="AssociatedProduct::ProductName" /> </actinic:block> <actinic:block if="%3cactinic%3avariable%20name%3d%22ListIndex%22%20%2f%3e%20%3e1" > <actinic:variable name="PermutationPrice" /> </actinic:block> </option>
- click 'OK'
- expand the 'Permutations Lists' group
- double-click on the 'Drop Down Permutation List' layout
- there should only be one variable in this layout. If is is anything other than 'PermutationRow', then right-click on the variable and select 'Edit Appearance'. Change the 'Use fixed layout' field to 'No()'
- click 'OK' and 'OK' again on the layout window
- close the library
- on one of your product attributes create a new choice called 'Please select' (make sure it is at the top of the list)
- on the component permutation tab delete the current permutations and click the 'fill list' button
- un-tick the 'valid' option for the 'Please select' choice
- click 'Apply'
- on the 'Layout' tab change the 'Permutation Row Layout' to the new layout you created above
- click 'Apply Changes'
- you should see the 'Please select' option in the preview pane and when you upload the site and try adding the product to basket without changing the 'Please select' option, it will tell you that it's not valid.