For example; A product is only available in 1000gram, so that's the only option. Yet there are two options: "choose an option" and "1000 gram" IF there is only one option to select, then I want that option to be automatically selected.
(I use configurable products, even if there is only one product configuration available because most of our products do have multiple options, bu this way the customer knows where to look for the color or size.)
1. Admin > System > configuration > select appropriate store > select developer in the last section in left navigation panel > enable template hints
2. you can now identify the specific phtml file these dropdowns are appearing from.
3. Edit that phtml and notice that the dropdown first shows this default option and then adds the options passed through an array using a foreach loop.
4. Place a condition around the first option tag like this :
<?php if(count($array_with_valid_options) > 1): ?> <option>choose an option</option> <?php endif; ?>